From 62acf901b3c8ff21dd65fb2938218fb4adf3f165 Mon Sep 17 00:00:00 2001 From: matthieu-crouzet Date: Fri, 22 Nov 2024 19:34:54 +0100 Subject: [PATCH] fix: test-int eslint-config and eslint-config-otter --- packages/@o3r/eslint-config-otter/package.json | 10 +++++++++- .../eslint.local.config.__extension__.template | 2 +- .../eslint.shared.config.__extension__.template | 13 +++++++++++++ 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/packages/@o3r/eslint-config-otter/package.json b/packages/@o3r/eslint-config-otter/package.json index acfd9f0c1b..57487015b4 100644 --- a/packages/@o3r/eslint-config-otter/package.json +++ b/packages/@o3r/eslint-config-otter/package.json @@ -60,7 +60,7 @@ "@o3r/schematics": "workspace:^", "@schematics/angular": "~18.2.0", "@stylistic/eslint-plugin-ts": "^2.7.0", - "@typescript-eslint/eslint-plugin": "^7.14.1", + "@typescript-eslint/eslint-plugin": "^7.14.1 || ^8.0.0", "@typescript-eslint/parser": "^7.14.1 || ^8.0.0", "@typescript-eslint/utils": "^7.14.1 || ^8.0.0", "eslint": ">=8.57.0 <9.15.0", @@ -72,6 +72,14 @@ "eslint-plugin-unicorn": "^54.0.0 || ^55.0.0", "typescript": "~5.5.4" }, + "generatorDependencies": { + "@typescript-eslint/eslint-plugin": "^8.0.0", + "@typescript-eslint/parser": "~8.12.2", + "@typescript-eslint/utils": "~8.12.2", + "eslint": "~9.14.0", + "eslint-plugin-jsdoc": "~50.2.0", + "eslint-plugin-unicorn": "^55.0.0" + }, "devDependencies": { "@angular-devkit/core": "~18.2.0", "@angular-devkit/schematics": "~18.2.0", diff --git a/packages/@o3r/eslint-config/schematics/ng-add/eslint/templates/workspace/eslint.local.config.__extension__.template b/packages/@o3r/eslint-config/schematics/ng-add/eslint/templates/workspace/eslint.local.config.__extension__.template index d0f797d6c0..aa30ddabad 100644 --- a/packages/@o3r/eslint-config/schematics/ng-add/eslint/templates/workspace/eslint.local.config.__extension__.template +++ b/packages/@o3r/eslint-config/schematics/ng-add/eslint/templates/workspace/eslint.local.config.__extension__.template @@ -13,7 +13,7 @@ const __dirname = dirname(__filename); parserOptions: { tsconfigRootDir: __dirname, project: [ -<%= detectedTsConfigs.map((tsconfig) => ` '${tsconfig}'`).join(', ') %> +<%= detectedTsConfigs.map((tsconfig) => ` '${tsconfig}'`).join(',\n') %> ] } } diff --git a/packages/@o3r/eslint-config/schematics/ng-add/eslint/templates/workspace/eslint.shared.config.__extension__.template b/packages/@o3r/eslint-config/schematics/ng-add/eslint/templates/workspace/eslint.shared.config.__extension__.template index 684404fe46..a203b2b3cf 100644 --- a/packages/@o3r/eslint-config/schematics/ng-add/eslint/templates/workspace/eslint.shared.config.__extension__.template +++ b/packages/@o3r/eslint-config/schematics/ng-add/eslint/templates/workspace/eslint.shared.config.__extension__.template @@ -12,6 +12,19 @@ const o3rTemplate = require('@o3r/eslint-config/template'); linterOptions: { reportUnusedDisableDirectives: 'error' } + }, + { + name: '<%= packageName %>/settings', + settings: { + 'import/resolver': { + node: true, + typescript: { + project: [ +<%= detectedTsConfigs.map((tsconfig) => ` '${tsconfig}'`).join(',\n') %> + ] + } + } + } }<% if (extension === 'mjs') { %>, { name: '<%= packageName %>/eslint-config',