From 7811246bccb6f99e3dfc141bea64f5c3e618994e Mon Sep 17 00:00:00 2001 From: "theo.gillet" Date: Fri, 29 May 2026 09:48:59 +0200 Subject: [PATCH] [FIX]: fix analyzer config and TypeScript workspace warnings --- .vscode/settings.json | 7 +++++++ v6y-apps/bfb-main-analyzer/eslint.config.mjs | 13 +++++++++++++ .../bfb-main-analyzer/src/config/ServerConfig.ts | 4 ++-- v6y-apps/bfb-main-analyzer/tsconfig.json | 1 + v6y-apps/bff/tsconfig.json | 4 ++++ v6y-apps/front-bo/tsconfig.json | 1 - v6y-apps/front/tsconfig.json | 1 - v6y-libs/ui-kit-front/tsconfig.json | 1 - v6y-libs/ui-kit/tsconfig.json | 1 - 9 files changed, 27 insertions(+), 6 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..44a73ec3 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,7 @@ +{ + "eslint.workingDirectories": [ + { + "mode": "auto" + } + ] +} diff --git a/v6y-apps/bfb-main-analyzer/eslint.config.mjs b/v6y-apps/bfb-main-analyzer/eslint.config.mjs index cb4f2f48..9307c3c9 100644 --- a/v6y-apps/bfb-main-analyzer/eslint.config.mjs +++ b/v6y-apps/bfb-main-analyzer/eslint.config.mjs @@ -1,8 +1,11 @@ import eslint from '@eslint/js'; import eslintConfigPrettier from 'eslint-config-prettier'; +import { fileURLToPath } from 'node:url'; import globals from 'globals'; import tsEslint from 'typescript-eslint'; +const tsconfigRootDir = fileURLToPath(new URL('.', import.meta.url)); + export default [ { name: 'eslint:recommended', @@ -14,6 +17,11 @@ export default [ { name: 'analyzer:source', files: ['src/**/*.{js,mjs,ts,tsx}'], + languageOptions: { + parserOptions: { + tsconfigRootDir, + }, + }, rules: { 'max-depth': ['error', 3], 'max-nested-callbacks': ['error', 3], @@ -27,6 +35,11 @@ export default [ { name: 'analyzer:tests', files: ['src/**/__tests__/**/*-test.{ts,js}', 'src/**/*.test.{ts,js,tsx}'], + languageOptions: { + parserOptions: { + tsconfigRootDir, + }, + }, rules: { 'max-lines-per-function': 'off', 'max-lines': 'off', diff --git a/v6y-apps/bfb-main-analyzer/src/config/ServerConfig.ts b/v6y-apps/bfb-main-analyzer/src/config/ServerConfig.ts index 92c89a8f..d50bc695 100644 --- a/v6y-apps/bfb-main-analyzer/src/config/ServerConfig.ts +++ b/v6y-apps/bfb-main-analyzer/src/config/ServerConfig.ts @@ -12,7 +12,7 @@ const SERVER_ENV_CONFIGURATION = { apiPath: process.env.V6Y_MAIN_API_PATH, staticAuditorApiPath: process.env.V6Y_STATIC_ANALYZER_API_PATH, dynamicAuditorApiPath: process.env.V6Y_DYNAMIC_ANALYZER_API_PATH, - devopsAuditorApiPath: process.env.V6Y_DEVOPS_ANALYSER_API_PATH, + devopsAuditorApiPath: process.env.V6Y_DEVOPS_API_PATH, healthCheckPath: V6Y_HEALTH_CHECK_PATH, monitoringPath: V6Y_MONITORING_PATH, serverTimeout: 900000, // milliseconds @@ -24,7 +24,7 @@ const SERVER_ENV_CONFIGURATION = { apiPath: process.env.V6Y_MAIN_API_PATH, staticAuditorApiPath: process.env.V6Y_STATIC_ANALYZER_API_PATH, dynamicAuditorApiPath: process.env.V6Y_DYNAMIC_ANALYZER_API_PATH, - devopsAuditorApiPath: process.env.V6Y_DEVOPS_ANALYSER_API_PATH, + devopsAuditorApiPath: process.env.V6Y_DEVOPS_API_PATH, healthCheckPath: V6Y_HEALTH_CHECK_PATH, monitoringPath: V6Y_MONITORING_PATH, serverTimeout: 900000, // milliseconds diff --git a/v6y-apps/bfb-main-analyzer/tsconfig.json b/v6y-apps/bfb-main-analyzer/tsconfig.json index 2f9b5952..fe459cf9 100644 --- a/v6y-apps/bfb-main-analyzer/tsconfig.json +++ b/v6y-apps/bfb-main-analyzer/tsconfig.json @@ -5,6 +5,7 @@ /* Modules */ "module": "NodeNext", /* Specify what module code is generated. */ // "rootDir": "./", /* Specify the root folder within your source files. */ + "rootDir": "./src", /* Specify the root folder within your source files. */ "moduleResolution": "NodeNext", /* Specify how TypeScript looks up a file from a given module specifier. */ "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */ /* Emit */ diff --git a/v6y-apps/bff/tsconfig.json b/v6y-apps/bff/tsconfig.json index 2f9b5952..c3791ceb 100644 --- a/v6y-apps/bff/tsconfig.json +++ b/v6y-apps/bff/tsconfig.json @@ -5,6 +5,7 @@ /* Modules */ "module": "NodeNext", /* Specify what module code is generated. */ // "rootDir": "./", /* Specify the root folder within your source files. */ + "rootDir": "./src", /* Specify the root folder within your source files. */ "moduleResolution": "NodeNext", /* Specify how TypeScript looks up a file from a given module specifier. */ "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */ /* Emit */ @@ -21,6 +22,9 @@ // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ "skipLibCheck": true /* Skip type checking all .d.ts files. */ }, + "include": [ + "src/**/*.ts" + ], "ts-node": { "experimentalSpecifierResolution": "node", "transpileOnly": true, diff --git a/v6y-apps/front-bo/tsconfig.json b/v6y-apps/front-bo/tsconfig.json index e9610706..9b812e47 100644 --- a/v6y-apps/front-bo/tsconfig.json +++ b/v6y-apps/front-bo/tsconfig.json @@ -14,7 +14,6 @@ "allowImportingTsExtensions": true, "module": "ESNext", "target": "ES2023", - "downlevelIteration": true, "moduleResolution": "bundler", "resolveJsonModule": true, "isolatedModules": true, diff --git a/v6y-apps/front/tsconfig.json b/v6y-apps/front/tsconfig.json index 0dc3feef..a7a55c67 100644 --- a/v6y-apps/front/tsconfig.json +++ b/v6y-apps/front/tsconfig.json @@ -13,7 +13,6 @@ "allowImportingTsExtensions": true, "module": "ESNext", "target": "ES2023", - "downlevelIteration": true, "moduleResolution": "bundler", "resolveJsonModule": true, "isolatedModules": true, diff --git a/v6y-libs/ui-kit-front/tsconfig.json b/v6y-libs/ui-kit-front/tsconfig.json index eec0c43e..3b18128c 100644 --- a/v6y-libs/ui-kit-front/tsconfig.json +++ b/v6y-libs/ui-kit-front/tsconfig.json @@ -13,7 +13,6 @@ "allowImportingTsExtensions": true, "module": "ESNext", "target": "ES2023", - "downlevelIteration": true, "moduleResolution": "bundler", "resolveJsonModule": true, "isolatedModules": true, diff --git a/v6y-libs/ui-kit/tsconfig.json b/v6y-libs/ui-kit/tsconfig.json index c6757c62..414255ab 100644 --- a/v6y-libs/ui-kit/tsconfig.json +++ b/v6y-libs/ui-kit/tsconfig.json @@ -13,7 +13,6 @@ "allowImportingTsExtensions": true, "module": "ESNext", "target": "ES2023", - "downlevelIteration": true, "moduleResolution": "bundler", "resolveJsonModule": true, "isolatedModules": true,