[ESLint] Add "no-unused-imports" plugin (#426)

This commit is contained in:
schroda
2023-10-27 21:19:45 +02:00
committed by GitHub
parent 76d1ba835c
commit c8f02b3b8c
3 changed files with 16 additions and 1 deletions

View File

@@ -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

View File

@@ -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",

View File

@@ -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"