From f539d79aae8a6eb7df5e8577bc0d395d32e512b3 Mon Sep 17 00:00:00 2001 From: Miguel Lehmann Date: Tue, 19 Nov 2024 10:43:46 +0100 Subject: [PATCH] put unused-imports plugin into config --- frontend/eslint.config.mjs | 5 ++++- frontend/package-lock.json | 16 ++++++++++++++++ frontend/package.json | 1 + 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/frontend/eslint.config.mjs b/frontend/eslint.config.mjs index 9345f95782..a52431b4e2 100644 --- a/frontend/eslint.config.mjs +++ b/frontend/eslint.config.mjs @@ -1,12 +1,15 @@ import eslint from '@eslint/js'; import tseslint from 'typescript-eslint'; -import {rules} from "@typescript-eslint/eslint-plugin"; +import unusedImports from "eslint-plugin-unused-imports"; export default tseslint.config( eslint.configs.recommended, ...tseslint.configs.recommended, { + plugins: { + "unused-imports": unusedImports, + }, rules: { "unused-imports/no-unused-imports": "error", } diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 1da6be2935..aa719efe7d 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -42,6 +42,7 @@ "cypress": "^13.15.0", "cypress-real-events": "^1.13.0", "eslint": "^9.14.0", + "eslint-plugin-unused-imports": "^4.1.4", "jest": "^29.7.0", "jest-preset-angular": "^14.2.4", "ngx-translate-testing": "^7.0.0", @@ -9040,6 +9041,21 @@ } } }, + "node_modules/eslint-plugin-unused-imports": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-4.1.4.tgz", + "integrity": "sha512-YptD6IzQjDardkl0POxnnRBhU1OEePMV0nd6siHaRBbd+lyh6NAhFEobiznKU7kTsSsDeSD62Pe7kAM1b7dAZQ==", + "dev": true, + "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": "8.2.0", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.2.0.tgz", diff --git a/frontend/package.json b/frontend/package.json index f082b83c8e..b4fe059a60 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -55,6 +55,7 @@ "cypress": "^13.15.0", "cypress-real-events": "^1.13.0", "eslint": "^9.14.0", + "eslint-plugin-unused-imports": "^4.1.4", "jest": "^29.7.0", "jest-preset-angular": "^14.2.4", "ngx-translate-testing": "^7.0.0",