From f30595f8d0d7501b8ce3dd2a0c862479b03fff54 Mon Sep 17 00:00:00 2001 From: Vojtech Masek Date: Thu, 5 Sep 2024 16:13:55 +0200 Subject: [PATCH] test(plugin-eslint): fix nx project graph for mocked monorepo Signed-off-by: Vojtech Masek --- .../plugin-eslint/mocks/fixtures/nx-monorepo/.gitignore | 2 +- .../mocks/fixtures/nx-monorepo/packages/cli/project.json | 6 ++---- .../mocks/fixtures/nx-monorepo/packages/core/project.json | 6 ++---- .../fixtures/nx-monorepo/packages/nx-plugin/project.json | 7 ++----- .../mocks/fixtures/nx-monorepo/packages/utils/project.json | 5 +---- .../mocks/fixtures/nx-monorepo/tsconfig.base.json | 4 ++-- 6 files changed, 10 insertions(+), 20 deletions(-) diff --git a/packages/plugin-eslint/mocks/fixtures/nx-monorepo/.gitignore b/packages/plugin-eslint/mocks/fixtures/nx-monorepo/.gitignore index 0cba03f65..f21d80021 100644 --- a/packages/plugin-eslint/mocks/fixtures/nx-monorepo/.gitignore +++ b/packages/plugin-eslint/mocks/fixtures/nx-monorepo/.gitignore @@ -1 +1 @@ -.nx/cache \ No newline at end of file +.nx diff --git a/packages/plugin-eslint/mocks/fixtures/nx-monorepo/packages/cli/project.json b/packages/plugin-eslint/mocks/fixtures/nx-monorepo/packages/cli/project.json index eaa517967..5c0452837 100644 --- a/packages/plugin-eslint/mocks/fixtures/nx-monorepo/packages/cli/project.json +++ b/packages/plugin-eslint/mocks/fixtures/nx-monorepo/packages/cli/project.json @@ -2,15 +2,13 @@ "name": "cli", "sourceRoot": "packages/cli/src", "projectType": "application", + "implicitDependencies": ["core"], "targets": { "lint": { "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { - "lintFilePatterns": [ - "packages/cli/**/*.ts", - "packages/cli/package.json" - ] + "lintFilePatterns": ["packages/cli/**/*.ts"] } } } diff --git a/packages/plugin-eslint/mocks/fixtures/nx-monorepo/packages/core/project.json b/packages/plugin-eslint/mocks/fixtures/nx-monorepo/packages/core/project.json index 238ad8866..cb8107127 100644 --- a/packages/plugin-eslint/mocks/fixtures/nx-monorepo/packages/core/project.json +++ b/packages/plugin-eslint/mocks/fixtures/nx-monorepo/packages/core/project.json @@ -2,15 +2,13 @@ "name": "core", "sourceRoot": "packages/core/src", "projectType": "library", + "implicitDependencies": ["utils"], "targets": { "lint": { "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { - "lintFilePatterns": [ - "packages/core/**/*.ts", - "packages/core/package.json" - ] + "lintFilePatterns": ["packages/core/**/*.ts"] } } } diff --git a/packages/plugin-eslint/mocks/fixtures/nx-monorepo/packages/nx-plugin/project.json b/packages/plugin-eslint/mocks/fixtures/nx-monorepo/packages/nx-plugin/project.json index faa609fb0..45c7f7f1d 100644 --- a/packages/plugin-eslint/mocks/fixtures/nx-monorepo/packages/nx-plugin/project.json +++ b/packages/plugin-eslint/mocks/fixtures/nx-monorepo/packages/nx-plugin/project.json @@ -2,16 +2,13 @@ "name": "nx-plugin", "sourceRoot": "packages/nx-plugin/src", "projectType": "library", + "implicitDependencies": ["utils"], "targets": { "lint": { "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { - "lintFilePatterns": [ - "packages/nx-plugin/**/*.ts", - "packages/nx-plugin/package.json", - "packages/nx-plugin/generators.json" - ] + "lintFilePatterns": ["packages/nx-plugin/**/*.ts"] } } } diff --git a/packages/plugin-eslint/mocks/fixtures/nx-monorepo/packages/utils/project.json b/packages/plugin-eslint/mocks/fixtures/nx-monorepo/packages/utils/project.json index 77632393b..0daa43e40 100644 --- a/packages/plugin-eslint/mocks/fixtures/nx-monorepo/packages/utils/project.json +++ b/packages/plugin-eslint/mocks/fixtures/nx-monorepo/packages/utils/project.json @@ -7,10 +7,7 @@ "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { - "lintFilePatterns": [ - "packages/utils/**/*.ts", - "packages/utils/package.json" - ] + "lintFilePatterns": ["packages/utils/**/*.ts"] } } } diff --git a/packages/plugin-eslint/mocks/fixtures/nx-monorepo/tsconfig.base.json b/packages/plugin-eslint/mocks/fixtures/nx-monorepo/tsconfig.base.json index 05d05e672..6fc9deaa6 100644 --- a/packages/plugin-eslint/mocks/fixtures/nx-monorepo/tsconfig.base.json +++ b/packages/plugin-eslint/mocks/fixtures/nx-monorepo/tsconfig.base.json @@ -8,9 +8,9 @@ "emitDecoratorMetadata": true, "experimentalDecorators": true, "importHelpers": true, - "target": "es2015", + "target": "ES2022", "module": "esnext", - "lib": ["es2020", "dom"], + "lib": ["ES2022", "dom"], "skipLibCheck": true, "skipDefaultLibCheck": true, "baseUrl": ".",