diff --git a/.eslintrc b/.eslintrc index 424de05a..340e9359 100644 --- a/.eslintrc +++ b/.eslintrc @@ -13,7 +13,7 @@ "jsx": true } }, - "plugins": ["react-hooks", "react", "header", "@eslint-react/eslint-plugin", "eslint-plugin-simple-import-sort"], + "plugins": ["react-hooks", "react", "header", "@eslint-react/eslint-plugin", "eslint-plugin-simple-import-sort", "eslint-plugin-unused-imports"], "rules": { "@typescript-eslint/interface-name-prefix": "off", "@typescript-eslint/no-explicit-any": "off", @@ -35,7 +35,8 @@ "react/prop-types": "off", "react/no-unescaped-entities": "off", "react-hooks/rules-of-hooks": "error", - "react-hooks/exhaustive-deps": "warn" + "react-hooks/exhaustive-deps": "warn", + "unused-imports/no-unused-imports": "error" }, "settings": { "react": { diff --git a/package-lock.json b/package-lock.json index b09dc7c9..fb7b8966 100644 --- a/package-lock.json +++ b/package-lock.json @@ -47,6 +47,7 @@ "eslint-plugin-react": "^7.30.1", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-simple-import-sort": "^12.1.1", + "eslint-plugin-unused-imports": "^4.2.0", "husky": "^8.0.1", "jest": "^29.7.0", "jest-environment-jsdom": "^29.7.0", @@ -3926,12 +3927,6 @@ "tslib": "2" } }, - "node_modules/@juggle/resize-observer": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/@juggle/resize-observer/-/resize-observer-3.4.0.tgz", - "integrity": "sha512-dfLbk+PwWvFzSxwk3n5ySL0hfBog779o8h68wK/7/APo/7cgyWp5jcXockbxdk5kFRkbeXWm4Fbi9FrdN381sA==", - "dev": true - }, "node_modules/@leichtgewicht/ip-codec": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.5.tgz", @@ -9798,6 +9793,22 @@ "eslint": ">=5.0.0" } }, + "node_modules/eslint-plugin-unused-imports": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-4.2.0.tgz", + "integrity": "sha512-hLbJ2/wnjKq4kGA9AUaExVFIbNzyxYdVo49QZmKCnhk5pc9wcYRbfgLHvWJ8tnsdcseGhoUAddm9gn/lt+d74w==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "@typescript-eslint/eslint-plugin": "^8.0.0-0 || ^7.0.0 || ^6.0.0 || ^5.0.0", + "eslint": "^9.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "@typescript-eslint/eslint-plugin": { + "optional": true + } + } + }, "node_modules/eslint-scope": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", diff --git a/package.json b/package.json index 8a9e2b7a..e0af7353 100644 --- a/package.json +++ b/package.json @@ -61,6 +61,7 @@ "eslint-plugin-react": "^7.30.1", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-simple-import-sort": "^12.1.1", + "eslint-plugin-unused-imports": "^4.2.0", "husky": "^8.0.1", "jest": "^29.7.0", "jest-environment-jsdom": "^29.7.0",