diff --git a/.eslintrc.json b/.eslintrc.json index 3aaa4e0c7e..c7a5d5b77f 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -21,8 +21,9 @@ "prettier/@typescript-eslint", "plugin:prettier/recommended" ], - "plugins": ["simple-import-sort"], + "plugins": ["simple-import-sort", "unused-imports"], "rules": { + "unused-imports/no-unused-imports": "error", "simple-import-sort/imports": "error", "simple-import-sort/exports": "error", "@typescript-eslint/explicit-function-return-type": "off", diff --git a/package.json b/package.json index 172235eebd..7929b322ed 100644 --- a/package.json +++ b/package.json @@ -87,6 +87,7 @@ "eslint-plugin-react": "^7.19.0", "eslint-plugin-react-hooks": "^4.0.0", "eslint-plugin-simple-import-sort": "^7.0.0", + "eslint-plugin-unused-imports": "^2.0.0", "ethers": "^5.4.6", "firebase": "^9.1.3", "graphql": "^15.5.0", diff --git a/yarn.lock b/yarn.lock index 921e2d93d3..217152fdbf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9758,6 +9758,18 @@ eslint-plugin-testing-library@^3.9.2: dependencies: "@typescript-eslint/experimental-utils" "^3.10.1" +eslint-plugin-unused-imports@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-2.0.0.tgz#d8db8c4d0cfa0637a8b51ce3fd7d1b6bc3f08520" + integrity sha512-3APeS/tQlTrFa167ThtP0Zm0vctjr4M44HMpeg1P4bK6wItarumq0Ma82xorMKdFsWpphQBlRPzw/pxiVELX1A== + 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@^4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.3.tgz#ca03833310f6889a3264781aa82e63eb9cfe7848"