Skip to content

Commit

Permalink
feat: add unused-imports plugin (#230)
Browse files Browse the repository at this point in the history
  • Loading branch information
courier-new committed Nov 16, 2021
1 parent e11aea9 commit 063a054
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .eslintrc.js
Expand Up @@ -19,7 +19,7 @@ module.exports = {
globals: {
globalThis: false, // false means not writable
},
plugins: ['ban', 'jsdoc', 'react', 'react-hooks', 'etc', 'rxjs', 'jest-dom', 'jsx-a11y'],
plugins: ['ban', 'jsdoc', 'react', 'react-hooks', 'etc', 'rxjs', 'jest-dom', 'jsx-a11y', 'unused-imports'],
settings: {
react: {
version: 'detect',
Expand Down Expand Up @@ -314,6 +314,9 @@ module.exports = {
},
},
],

'unused-imports/no-unused-imports': 'error',
'unused-imports/no-unused-vars': 'off',
},
overrides: [
{
Expand Down
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -47,6 +47,7 @@
"eslint-plugin-react": "^7.21.4",
"eslint-plugin-react-hooks": "^4.2.0",
"eslint-plugin-rxjs": "^2.1.5",
"eslint-plugin-unicorn": "^21.0.0"
"eslint-plugin-unicorn": "^21.0.0",
"eslint-plugin-unused-imports": "^1.1.5"
}
}
12 changes: 12 additions & 0 deletions yarn.lock
Expand Up @@ -2006,6 +2006,18 @@ eslint-plugin-unicorn@^21.0.0:
safe-regex "^2.1.1"
semver "^7.3.2"

eslint-plugin-unused-imports@^1.1.5:
version "1.1.5"
resolved "https://registry.yarnpkg.com/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-1.1.5.tgz#a2b992ef0faf6c6c75c3815cc47bde76739513c2"
integrity sha512-TeV8l8zkLQrq9LBeYFCQmYVIXMjfHgdRQLw7dEZp4ZB3PeR10Y5Uif11heCsHRmhdRIYMoewr1d9ouUHLbLHew==
dependencies:
eslint-rule-composer "^0.3.0"

eslint-rule-composer@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/eslint-rule-composer/-/eslint-rule-composer-0.3.0.tgz#79320c927b0c5c0d3d3d2b76c8b4a488f25bbaf9"
integrity sha512-bt+Sh8CtDmn2OajxvNO+BX7Wn4CIWMpTRm3MaiKPCQcnnlm0CS2mhui6QaoeQugs+3Kj2ESKEEGJUdVafwhiCg==

eslint-scope@^5.1.1:
version "5.1.1"
resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c"
Expand Down

0 comments on commit 063a054

Please sign in to comment.