From 2ee9117cf2934769f6db5592598826a252e78ff4 Mon Sep 17 00:00:00 2001 From: Joseph Garrone Date: Thu, 30 May 2024 08:03:30 +0200 Subject: [PATCH] Add tss eslint plugin --- .eslintrc.cjs | 8 ++++++-- package.json | 3 ++- yarn.lock | 5 +++++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index d2815e5..5d616ea 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -8,11 +8,15 @@ module.exports = { ], ignorePatterns: ["dist", ".eslintrc.cjs"], parser: "@typescript-eslint/parser", - plugins: ["react-refresh"], + plugins: [ + "react-refresh", + 'tss-unused-classes' + ], rules: { "react-refresh/only-export-components": ["warn", { allowConstantExport: true }], "@typescript-eslint/no-unused-vars": "warn", "@typescript-eslint/no-explicit-any": "off", - "@typescript-eslint/no-namespace": "off" + "@typescript-eslint/no-namespace": "off", + "tss-unused-classes/unused-classes": "warn" } }; diff --git a/package.json b/package.json index 7c5f778..89b52c0 100644 --- a/package.json +++ b/package.json @@ -25,10 +25,10 @@ "@mui/system": "^5.13.2", "@mui/x-data-grid": "^6.18.2", "@mui/x-date-pickers": "^5.0.12", - "dayjs": "^1.11.7", "@tanstack/react-query": "^5.37.1", "@tanstack/react-router": "^1.33.6", "axios": "^1.7.1", + "dayjs": "^1.11.7", "i18nifty": "^3.2.1", "oidc-spa": "^4.6.2", "react": "^18.2.0", @@ -51,6 +51,7 @@ "eslint": "^8.57.0", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-refresh": "^0.4.6", + "eslint-plugin-tss-unused-classes": "^1.0.2", "husky": "^4.3.8", "lint-staged": "^15.2.2", "orval": "^6.29.1", diff --git a/yarn.lock b/yarn.lock index 1da0bed..c657fb8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2558,6 +2558,11 @@ eslint-plugin-react-refresh@^0.4.6: resolved "https://registry.yarnpkg.com/eslint-plugin-react-refresh/-/eslint-plugin-react-refresh-0.4.7.tgz#1f597f9093b254f10ee0961c139a749acb19af7d" integrity sha512-yrj+KInFmwuQS2UQcg1SF83ha1tuHC1jMQbRNyuWtlEzzKRDgAl7L4Yp4NlDUZTZNlWvHEzOtJhMi40R7JxcSw== +eslint-plugin-tss-unused-classes@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-tss-unused-classes/-/eslint-plugin-tss-unused-classes-1.0.2.tgz#d4bc6ca40c1748bea1aaf3bc48271b96d7a1cd77" + integrity sha512-9Fs8Qs7G3cDAOBKqVhPw64Q/qRHeglu0Bm30OGWr+0Nd/2dRMD3zV5g65X/k2Y54aPvP7yVYjIl6Ql+o284ttA== + eslint-scope@^7.2.2: version "7.2.2" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.2.2.tgz#deb4f92563390f32006894af62a22dba1c46423f"