Skip to content

Commit

Permalink
[ESLint] Add "no-unused-imports" plugin (#426)
Browse files Browse the repository at this point in the history
  • Loading branch information
schroda authored Oct 27, 2023
1 parent 76d1ba8 commit c8f02b3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
module.exports = {
extends: ['airbnb', 'airbnb-typescript', 'prettier'],
plugins: ['@typescript-eslint', 'no-relative-import-paths', 'prettier', 'header'],
plugins: ['unused-imports', '@typescript-eslint', 'no-relative-import-paths', 'prettier', 'header'],
parserOptions: {
project: ['./tsconfig.json', './tsconfig.node.json', './tools/scripts/tsconfig.json'],
},
overrides: [
{
files: ['*'],
rules: {
'unused-imports/no-unused-imports': 'error',

'header/header': [
'error',
'block', // comment type
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
"eslint-plugin-prettier": "^5.0.0",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-unused-imports": "^3.0.0",
"prettier": "^3.0.3",
"syncyarnlock": "^1.0.19",
"ts-node": "^10.9.1",
Expand Down
12 changes: 12 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3036,6 +3036,18 @@ eslint-plugin-react@^7.33.2:
semver "^6.3.1"
string.prototype.matchall "^4.0.8"

eslint-plugin-unused-imports@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-3.0.0.tgz#d25175b0072ff16a91892c3aa72a09ca3a9e69e7"
integrity sha512-sduiswLJfZHeeBJ+MQaG+xYzSWdRXoSw61DpU13mzWumCkR0ufD0HmO4kdNokjrkluMHpj/7PJeN35pgbhW3kw==
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@^7.2.2:
version "7.2.2"
resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.2.2.tgz#deb4f92563390f32006894af62a22dba1c46423f"
Expand Down

0 comments on commit c8f02b3

Please sign in to comment.