[ESLint] Add "no-unused-imports" plugin (#426)
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
extends: ['airbnb', 'airbnb-typescript', 'prettier'],
|
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: {
|
parserOptions: {
|
||||||
project: ['./tsconfig.json', './tsconfig.node.json', './tools/scripts/tsconfig.json'],
|
project: ['./tsconfig.json', './tsconfig.node.json', './tools/scripts/tsconfig.json'],
|
||||||
},
|
},
|
||||||
@@ -8,6 +8,8 @@ module.exports = {
|
|||||||
{
|
{
|
||||||
files: ['*'],
|
files: ['*'],
|
||||||
rules: {
|
rules: {
|
||||||
|
'unused-imports/no-unused-imports': 'error',
|
||||||
|
|
||||||
'header/header': [
|
'header/header': [
|
||||||
'error',
|
'error',
|
||||||
'block', // comment type
|
'block', // comment type
|
||||||
|
|||||||
@@ -77,6 +77,7 @@
|
|||||||
"eslint-plugin-prettier": "^5.0.0",
|
"eslint-plugin-prettier": "^5.0.0",
|
||||||
"eslint-plugin-react": "^7.33.2",
|
"eslint-plugin-react": "^7.33.2",
|
||||||
"eslint-plugin-react-hooks": "^4.6.0",
|
"eslint-plugin-react-hooks": "^4.6.0",
|
||||||
|
"eslint-plugin-unused-imports": "^3.0.0",
|
||||||
"prettier": "^3.0.3",
|
"prettier": "^3.0.3",
|
||||||
"syncyarnlock": "^1.0.19",
|
"syncyarnlock": "^1.0.19",
|
||||||
"ts-node": "^10.9.1",
|
"ts-node": "^10.9.1",
|
||||||
|
|||||||
12
yarn.lock
12
yarn.lock
@@ -3036,6 +3036,18 @@ eslint-plugin-react@^7.33.2:
|
|||||||
semver "^6.3.1"
|
semver "^6.3.1"
|
||||||
string.prototype.matchall "^4.0.8"
|
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:
|
eslint-scope@^7.2.2:
|
||||||
version "7.2.2"
|
version "7.2.2"
|
||||||
resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.2.2.tgz#deb4f92563390f32006894af62a22dba1c46423f"
|
resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.2.2.tgz#deb4f92563390f32006894af62a22dba1c46423f"
|
||||||
|
|||||||
Reference in New Issue
Block a user