Skip to content

Commit a358568

Browse files
committed
chore: add ESLint plugin and rules to remove unused imports
- Installed eslint-plugin-unused-imports - Updated .eslintrc.json to include rules for detecting unused imports
1 parent f379865 commit a358568

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

.eslintrc.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
22
"extends": "next/core-web-vitals",
3-
"plugins": ["prettier"]
3+
"plugins": ["prettier", "unused-imports"],
4+
"rules": {
5+
"unused-imports/no-unused-imports": "warn"
6+
}
47
}

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
"eslint-config-next": "13.4.19",
6767
"eslint-config-prettier": "^8.8.0",
6868
"eslint-plugin-prettier": "^5.1.3",
69+
"eslint-plugin-unused-imports": "^3.2.0",
6970
"husky": "^8.0.0",
7071
"lint-staged": "^13.2.2",
7172
"prettier": "^3.0.2",

yarn.lock

+12
Original file line numberDiff line numberDiff line change
@@ -3367,6 +3367,18 @@ eslint-plugin-react@^7.31.7:
33673367
semver "^6.3.0"
33683368
string.prototype.matchall "^4.0.8"
33693369

3370+
eslint-plugin-unused-imports@^3.2.0:
3371+
version "3.2.0"
3372+
resolved "https://registry.yarnpkg.com/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-3.2.0.tgz#63a98c9ad5f622cd9f830f70bc77739f25ccfe0d"
3373+
integrity sha512-6uXyn6xdINEpxE1MtDjxQsyXB37lfyO2yKGVVgtD7WEWQGORSOZjgrD6hBhvGv4/SO+TOlS+UnC6JppRqbuwGQ==
3374+
dependencies:
3375+
eslint-rule-composer "^0.3.0"
3376+
3377+
eslint-rule-composer@^0.3.0:
3378+
version "0.3.0"
3379+
resolved "https://registry.yarnpkg.com/eslint-rule-composer/-/eslint-rule-composer-0.3.0.tgz#79320c927b0c5c0d3d3d2b76c8b4a488f25bbaf9"
3380+
integrity sha512-bt+Sh8CtDmn2OajxvNO+BX7Wn4CIWMpTRm3MaiKPCQcnnlm0CS2mhui6QaoeQugs+3Kj2ESKEEGJUdVafwhiCg==
3381+
33703382
33713383
version "5.1.1"
33723384
resolved "https://registry.npmmirror.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c"

0 commit comments

Comments
 (0)