diff --git a/.eslintrc.js b/.eslintrc.js index 143ffc19b..b682aa9dc 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -4,9 +4,11 @@ module.exports = { 'plugin:@next/next/recommended', 'plugin:jest/recommended', 'plugin:storybook/recommended', - 'plugin:@typescript-eslint/eslint-recommended', + "eslint:recommended", + "plugin:@typescript-eslint/eslint-recommended", + "plugin:@typescript-eslint/recommended" ], - plugins: ['testing-library', 'jest', 'react-hooks', 'react'], + plugins: ['testing-library', 'jest', 'react-hooks', 'react', 'unused-imports'], overrides: [ { files: ['**/?(*.)+(spec|test).[jt]s?(x)'], @@ -18,5 +20,12 @@ module.exports = { }, rules: { 'react/react-in-jsx-scope': 'off', + "unused-imports/no-unused-imports": "warn", + "@typescript-eslint/no-unused-vars": "off", + "@typescript-eslint/no-unused-imports": "off", + "@typescript-eslint/no-unused-expressions": "off", + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-shadow": "off", + "@typescript-eslint/no-use-before-define": "off", }, }; diff --git a/package.json b/package.json index 8be32d201..f9b72e64f 100644 --- a/package.json +++ b/package.json @@ -68,6 +68,7 @@ "eslint-plugin-react-hooks": "^4.3.0", "eslint-plugin-storybook": "^0.5.11", "eslint-plugin-testing-library": "^5.2.0", + "eslint-plugin-unused-imports": "^2.0.0", "jest": "^27.5.1", "prettier": "^2.6.2", "storybook-addon-turbo-build": "^1.1.0", diff --git a/yarn.lock b/yarn.lock index c7e71f2c7..b417903d3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5938,6 +5938,18 @@ eslint-plugin-testing-library@^5.2.0: dependencies: "@typescript-eslint/utils" "^5.13.0" +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"