From 20cc1592dfa7a93c2c43aa53970fc7825981c4e1 Mon Sep 17 00:00:00 2001 From: achour94 Date: Thu, 27 Nov 2025 15:56:02 +0100 Subject: [PATCH] Enable unused variables detection and fix ESLint violations Signed-off-by: achour94 --- eslint.config.js | 2 -- src/components/app.tsx | 2 +- src/utils/rest-api.js | 2 +- vite.config.ts | 2 +- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/eslint.config.js b/eslint.config.js index 460944f..384e364 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -187,7 +187,6 @@ const projectConfig = [ '@typescript-eslint/no-unnecessary-type-assertion': 'off', '@typescript-eslint/no-unsafe-enum-comparison': 'off', '@typescript-eslint/no-unused-expressions': 'off', - '@typescript-eslint/no-unused-vars': 'off', '@typescript-eslint/no-wrapper-object-types': 'off', // @stylistic @@ -205,7 +204,6 @@ const projectConfig = [ 'no-unneeded-ternary': 'off', 'no-unsafe-optional-chaining': 'off', 'no-unused-expressions': 'off', - 'no-unused-vars': 'off', 'no-use-before-define': 'off', 'object-shorthand': 'off', 'prefer-const': 'off', diff --git a/src/components/app.tsx b/src/components/app.tsx index 6247e7c..aa31c39 100644 --- a/src/components/app.tsx +++ b/src/components/app.tsx @@ -86,7 +86,7 @@ const App = () => { [dispatch] ); - const langDispatch = useCallback((lng: GsLang) => { + const langDispatch = useCallback((_lng: GsLang) => { /*not implemented yet*/ }, []); diff --git a/src/utils/rest-api.js b/src/utils/rest-api.js index bc5ec73..962be5e 100644 --- a/src/utils/rest-api.js +++ b/src/utils/rest-api.js @@ -31,7 +31,7 @@ export function getUrlWithToken(baseUrl, token) { function parseError(text) { try { return JSON.parse(text); - } catch (err) { + } catch { return null; } } diff --git a/vite.config.ts b/vite.config.ts index 1e7cb92..c240269 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -39,7 +39,7 @@ const serverSettings: CommonServerOptions = { }, }; -export default defineConfig((config) => ({ +export default defineConfig((_config) => ({ plugins: [ react(), checker({