diff --git a/.eslintrc.json b/.eslintrc.json index bcd0143..434173d 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -19,7 +19,12 @@ "project": "tsconfig.json", "sourceType": "module" }, - "plugins": ["@typescript-eslint", "simple-import-sort", "deprecation"], + "plugins": [ + "@typescript-eslint", + "simple-import-sort", + "deprecation", + "unused-imports" + ], "rules": { "@typescript-eslint/no-explicit-any": "off", "@typescript-eslint/no-floating-promises": ["error"], @@ -37,6 +42,7 @@ "simple-import-sort/exports": "error", "sort-imports": "off", "import/order": "off", - "deprecation/deprecation": "warn" + "deprecation/deprecation": "error", + "unused-imports/no-unused-imports": "error" } } diff --git a/package-lock.json b/package-lock.json index ed561c3..7aa9259 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4343,6 +4343,21 @@ "integrity": "sha512-U3vEDB5zhYPNfxT5TYR7u01dboFZp+HNpnGhkDB2g/2E4wZ/g1Q9Ton8UwCLfRV9yAKyYqDh62oHOamvkFxsvw==", "dev": true }, + "eslint-plugin-unused-imports": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-1.1.1.tgz", + "integrity": "sha512-EApvRx9Q3XQI96Tg7xPPqY6OuOy95wWMXAtc8RrwdIRk9bv8vkJKwOVoE4HeWJOQhHeHcI8lUbOqmup/PxjfOw==", + "dev": true, + "requires": { + "eslint-rule-composer": "^0.3.0" + } + }, + "eslint-rule-composer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/eslint-rule-composer/-/eslint-rule-composer-0.3.0.tgz", + "integrity": "sha512-bt+Sh8CtDmn2OajxvNO+BX7Wn4CIWMpTRm3MaiKPCQcnnlm0CS2mhui6QaoeQugs+3Kj2ESKEEGJUdVafwhiCg==", + "dev": true + }, "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 b0be681..c16096a 100644 --- a/package.json +++ b/package.json @@ -71,6 +71,7 @@ "eslint-plugin-deprecation": "^1.2.0", "eslint-plugin-prettier": "^3.4.0", "eslint-plugin-simple-import-sort": "^7.0.0", + "eslint-plugin-unused-imports": "^1.1.1", "espower-typescript": "^9.0.2", "graphql": "^15.5.0", "husky": "^4.3.5",