diff --git a/.eslintrc.js b/.eslintrc.js index 49093f35..6437ad3b 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,6 +1,6 @@ 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'], }, @@ -8,6 +8,8 @@ module.exports = { { files: ['*'], rules: { + 'unused-imports/no-unused-imports': 'error', + 'header/header': [ 'error', 'block', // comment type diff --git a/package.json b/package.json index d742f525..8c0018c3 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/yarn.lock b/yarn.lock index e8009634..2518297d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -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"