@lobehub/lint 1.1.2 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -80,13 +80,14 @@ curl -O https://raw.githubusercontent.com/lobehub/lobe-lint/master/.prettierigno
80
80
 
81
81
  ```text
82
82
  public-hoist-pattern[]=*@umijs/lint*
83
- public-hoist-pattern[]=*remark*
84
- public-hoist-pattern[]=*eslint*
85
- public-hoist-pattern[]=*stylelint*
86
- public-hoist-pattern[]=*prettier*
83
+ public-hoist-pattern[]=*changelog*
87
84
  public-hoist-pattern[]=*commitlint*
85
+ public-hoist-pattern[]=*eslint*
88
86
  public-hoist-pattern[]=*postcss*
87
+ public-hoist-pattern[]=*prettier*
88
+ public-hoist-pattern[]=*remark*
89
89
  public-hoist-pattern[]=*semantic-release*
90
+ public-hoist-pattern[]=*stylelint*
90
91
  ```
91
92
 
92
93
  ### ESlint
@@ -126,7 +127,7 @@ config can be found at `./src/changelog/index.ts`
126
127
  ```js
127
128
  // .changelogrc.js
128
129
 
129
- module.exports = require('@lobehub/lint/dist/commitlint');
130
+ module.exports = require('@lobehub/lint/dist/changelog');
130
131
  ```
131
132
 
132
133
  ### Remark
@@ -24,7 +24,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
24
24
  // src/eslint/index.ts
25
25
  module.exports = {
26
26
  extends: [require.resolve("@umijs/lint/dist/config/eslint")],
27
- plugins: ["simple-import-sort", "import", "typescript-sort-keys"],
27
+ plugins: ["simple-import-sort", "import", "typescript-sort-keys", "unused-imports"],
28
28
  rules: {
29
29
  "simple-import-sort/exports": "error",
30
30
  "import/first": "error",
@@ -33,6 +33,12 @@ module.exports = {
33
33
  "typescript-sort-keys/interface": "error",
34
34
  "typescript-sort-keys/string-enum": "error",
35
35
  "react/jsx-sort-props": "error",
36
- "react/jsx-no-useless-fragment": "error"
36
+ "react/jsx-no-useless-fragment": "error",
37
+ "no-unused-vars": "off",
38
+ "unused-imports/no-unused-imports": "error",
39
+ "unused-imports/no-unused-vars": [
40
+ "warn",
41
+ { vars: "all", varsIgnorePattern: "^_", args: "after-used", argsIgnorePattern: "^_" }
42
+ ]
37
43
  }
38
44
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/lint",
3
- "version": "1.1.2",
3
+ "version": "1.2.0",
4
4
  "homepage": "https://github.com/lobehub/lobe-lint",
5
5
  "bugs": {
6
6
  "url": "https://github.com/lobehub/lobe-lint/issues/new"
@@ -27,6 +27,7 @@
27
27
  "eslint-plugin-import": "latest",
28
28
  "eslint-plugin-simple-import-sort": "latest",
29
29
  "eslint-plugin-typescript-sort-keys": "latest",
30
+ "eslint-plugin-unused-imports": "latest",
30
31
  "postcss-less": "latest",
31
32
  "postcss-styled-syntax": "latest",
32
33
  "prettier-plugin-organize-imports": "latest",