From 762800c2831b1581da54b7510bc8be162349911a Mon Sep 17 00:00:00 2001 From: Miroslav Jonas Date: Mon, 9 Oct 2023 23:21:47 +0200 Subject: [PATCH 01/11] feat(linter): rename linter to eslint --- .github/workflows/e2e-matrix.yml | 8 +- .github/workflows/e2e-windows.yml | 8 +- CODEOWNERS | 6 +- docs/generated/manifests/menus.json | 135 ++++++++---------- docs/generated/manifests/nx-api.json | 112 +++++++-------- docs/generated/packages-metadata.json | 110 +++++++------- .../documents/dependency-checks.md | 2 +- .../executors/lint.json} | 10 +- .../generators/convert-to-flat-config.json | 4 +- .../generators/workspace-rule.json | 4 +- .../generators/workspace-rules-project.json | 4 +- .../packages/linter/documents/overview.md | 39 ----- .../3-task-running.md | 2 +- .../4-task-pipelines.md | 2 +- .../node-server-tutorial/3-task-running.md | 2 +- .../node-server-tutorial/4-task-pipelines.md | 2 +- .../packages/linter/dependency-checks.md | 2 +- .../reduce-repetitive-configuration.md | 8 +- .../tips-n-tricks/migrating-to-flat-eslint.md | 2 +- docs/shared/reference/sitemap.md | 16 +-- e2e/angular-core/src/config.test.ts | 4 +- e2e/angular-core/src/ng-add.test.ts | 2 +- e2e/{linter => eslint}/jest.config.ts | 2 +- e2e/{linter => eslint}/project.json | 10 +- e2e/{linter => eslint}/src/linter.test.ts | 0 e2e/{linter => eslint}/tsconfig.json | 0 e2e/{linter => eslint}/tsconfig.spec.json | 0 nx-dev/nx-dev-e2e/src/packages.spec.ts | 8 +- packages-legacy/linter-nx/README.md | 13 ++ packages-legacy/linter-nx/executors.json | 17 +++ packages-legacy/linter-nx/generators.json | 4 + packages-legacy/linter-nx/index.ts | 1 + packages-legacy/linter-nx/package.json | 37 +++++ packages-legacy/linter-nx/project.json | 38 +++++ packages-legacy/linter-nx/tsconfig.json | 6 + packages-legacy/linter/executors.json | 10 +- packages-legacy/linter/generators.json | 2 +- packages-legacy/linter/index.ts | 2 +- packages-legacy/linter/package.json | 4 +- packages-legacy/nest/project.json | 2 +- packages/angular/package.json | 2 +- .../add-linting/add-linting.spec.ts | 6 +- .../src/generators/add-linting/add-linting.ts | 6 +- .../application/application.spec.ts | 6 +- .../generators/application/lib/add-linting.ts | 2 +- .../application/lib/normalize-options.ts | 2 +- .../application/lib/normalized-schema.ts | 2 +- .../src/generators/application/schema.d.ts | 2 +- .../component-test/component-test.spec.ts | 8 +- .../angular/src/generators/host/schema.d.ts | 2 +- .../angular/src/generators/init/init.spec.ts | 2 +- packages/angular/src/generators/init/init.ts | 2 +- .../angular/src/generators/init/schema.d.ts | 2 +- .../library/lib/normalize-options.ts | 2 +- .../library/lib/normalized-schema.ts | 2 +- .../src/generators/library/library.spec.ts | 4 +- .../angular/src/generators/library/library.ts | 2 +- .../src/generators/library/schema.d.ts | 2 +- .../angular/src/generators/move/move.spec.ts | 2 +- .../builders/angular-eslint-lint.migrator.ts | 4 +- .../migrators/projects/app.migrator.spec.ts | 8 +- .../ng-add/migrators/projects/e2e.migrator.ts | 2 +- .../migrators/projects/lib.migrator.spec.ts | 8 +- .../angular/src/generators/ng-add/schema.d.ts | 2 +- .../generators/ng-add/utilities/workspace.ts | 2 +- .../angular/src/generators/remote/schema.d.ts | 2 +- .../storybook-configuration/schema.d.ts | 2 +- .../angular/src/generators/utils/testing.ts | 10 +- packages/cypress/package.json | 2 +- .../generators/configuration/configuration.ts | 2 +- .../cypress-project/cypress-project.spec.ts | 2 +- .../cypress-project/cypress-project.ts | 2 +- .../generators/cypress-project/schema.d.ts | 2 +- packages/cypress/src/utils/add-linter.ts | 6 +- packages/detox/package.json | 2 +- .../application/lib/add-linting.spec.ts | 4 +- .../generators/application/lib/add-linting.ts | 4 +- .../application/lib/add-project.spec.ts | 2 +- .../application/lib/create-files.spec.ts | 2 +- .../application/lib/normalize-options.spec.ts | 2 +- .../src/generators/application/schema.d.ts | 2 +- packages/{linter => eslint}/.eslintrc.json | 0 packages/{linter => eslint}/README.md | 0 .../docs/eslint-examples.md | 12 +- .../docs/workspace-rule-examples.md | 0 packages/eslint/executors.json | 10 ++ packages/{linter => eslint}/generators.json | 2 +- packages/{linter => eslint}/index.ts | 2 +- packages/{linter => eslint}/jest.config.ts | 2 +- packages/{linter => eslint}/migrations.json | 0 .../{linter => eslint}/migrations.spec.ts | 0 packages/{linter => eslint}/package.json | 4 +- packages/{linter => eslint}/project.json | 20 +-- .../src/executors/lint}/hasher.ts | 0 .../src/executors/lint}/lint.impl.spec.ts | 0 .../src/executors/lint}/lint.impl.ts | 0 .../src/executors/lint}/schema.d.ts | 0 .../src/executors/lint}/schema.json | 0 .../lint}/utility/eslint-utils.spec.ts | 0 .../executors/lint}/utility/eslint-utils.ts | 0 .../__snapshots__/generator.spec.ts.snap | 0 .../converters/json-converter.spec.ts | 0 .../converters/json-converter.ts | 0 .../convert-to-flat-config/generator.spec.ts | 0 .../convert-to-flat-config/generator.ts | 14 +- .../convert-to-flat-config/schema.d.ts | 0 .../convert-to-flat-config/schema.json | 0 .../init/__snapshots__/init.spec.ts.snap | 0 .../generators/init/global-eslint-config.ts | 0 .../src/generators/init/init-migration.ts | 1 + .../src/generators/init/init.spec.ts | 2 +- .../src/generators/init/init.ts | 4 +- .../lint-project/lint-project.spec.ts | 6 +- .../generators/lint-project/lint-project.ts | 2 +- .../src/generators/utils/eslint-file.spec.ts | 2 +- .../src/generators/utils/eslint-file.ts | 0 .../src/generators/utils/eslint-targets.ts | 3 + .../utils/flat-config/ast-utils.spec.ts | 0 .../generators/utils/flat-config/ast-utils.ts | 0 .../utils/flat-config/path-utils.ts | 0 .../src/generators/utils/linter.ts | 0 .../__snapshots__/workspace-rule.spec.ts.snap | 0 .../files/__name__.spec.ts__tmpl__ | 0 .../workspace-rule/files/__name__.ts__tmpl__ | 0 .../src/generators/workspace-rule/schema.json | 0 .../workspace-rule/workspace-rule.spec.ts | 2 +- .../workspace-rule/workspace-rule.ts | 0 .../workspace-rules-project.spec.ts.snap | 0 .../files/index.ts__tmpl__ | 0 .../files/tsconfig.json__tmpl__ | 0 .../files/tsconfig.lint.json__tmpl__ | 0 .../workspace-rules-project/schema.json | 0 .../workspace-rules-project.spec.ts | 2 +- .../workspace-rules-project.ts | 0 .../update-15-0-0/add-eslint-inputs.spec.ts | 0 .../update-15-0-0/add-eslint-inputs.ts | 0 .../update-15-7-1/add-eslint-ignore.spec.ts | 0 .../update-15-7-1/add-eslint-ignore.ts | 0 .../update-16-0-0-add-nx-packages.spec.ts | 4 +- .../update-16-0-0-add-nx-packages.ts | 2 +- .../update-16-8-0-add-ignored-files.spec.ts | 0 .../update-16-8-0-add-ignored-files.ts | 0 .../src/utils/flat-config.ts | 0 .../utils/rules-requiring-type-checking.ts | 0 .../{linter => eslint}/src/utils/versions.ts | 0 .../src/utils/workspace-lint-rules.ts | 0 packages/{linter => eslint}/tsconfig.json | 0 packages/{linter => eslint}/tsconfig.lib.json | 0 .../{linter => eslint}/tsconfig.spec.json | 0 packages/expo/package.json | 2 +- .../application/application.spec.ts | 2 +- .../generators/application/lib/add-detox.ts | 2 +- .../application/lib/nomalize-options.spec.ts | 2 +- .../src/generators/application/schema.d.ts | 2 +- .../generators/component/component.spec.ts | 2 +- .../src/generators/library/library.spec.ts | 8 +- .../expo/src/generators/library/schema.d.ts | 2 +- packages/expo/src/utils/add-linting.spec.ts | 4 +- packages/expo/src/utils/add-linting.ts | 4 +- packages/express/.eslintrc.json | 2 +- .../src/generators/application/schema.d.ts | 2 +- .../configuration/configuration.spec.ts | 2 +- .../js/src/generators/library/library.spec.ts | 6 +- packages/js/src/generators/library/library.ts | 8 +- packages/js/src/utils/schema.d.ts | 2 +- packages/linter/executors.json | 10 -- packages/nest/package.json | 2 +- packages/nest/project.json | 2 +- .../application/lib/normalize-options.ts | 2 +- .../src/generators/application/schema.d.ts | 2 +- .../library/lib/normalize-options.ts | 2 +- .../src/generators/library/library.spec.ts | 4 +- .../nest/src/generators/library/schema.d.ts | 2 +- packages/next/package.json | 2 +- .../src/generators/application/lib/add-e2e.ts | 2 +- .../application/lib/add-linting.spec.ts | 4 +- .../generators/application/lib/add-linting.ts | 6 +- .../application/lib/normalize-options.ts | 2 +- .../src/generators/application/schema.d.ts | 2 +- .../generators/component/component.spec.ts | 2 +- .../cypress-component-configuration.spec.ts | 2 +- .../library/lib/normalize-options.spec.ts | 2 +- .../src/generators/library/library.spec.ts | 2 +- .../next/src/generators/library/schema.d.ts | 2 +- packages/node/package.json | 2 +- .../application/application.spec.ts | 6 +- .../src/generators/application/application.ts | 4 +- .../src/generators/application/schema.d.ts | 2 +- .../src/generators/e2e-project/e2e-project.ts | 6 +- .../src/generators/library/library.spec.ts | 4 +- .../node/src/generators/library/schema.d.ts | 2 +- packages/nx/package.json | 2 +- packages/nx/src/adapter/ngcli-adapter.ts | 37 +++-- .../init/implementation/add-nx-to-nest.ts | 2 +- packages/nx/src/utils/plugins/core-plugins.ts | 2 +- packages/playwright/package.json | 2 +- .../src/generators/configuration/schema.d.ts | 2 +- packages/playwright/src/utils/add-linter.ts | 6 +- packages/plugin/package.json | 2 +- .../create-package/create-package.spec.ts | 2 +- .../src/generators/create-package/schema.d.ts | 2 +- .../src/generators/e2e-project/e2e.spec.ts | 2 +- .../plugin/src/generators/e2e-project/e2e.ts | 2 +- .../src/generators/e2e-project/schema.d.ts | 2 +- .../generators/lint-checks/generator.spec.ts | 4 +- .../src/generators/lint-checks/generator.ts | 11 +- .../src/generators/plugin/plugin.spec.ts | 4 +- .../plugin/src/generators/plugin/plugin.ts | 2 +- .../plugin/src/generators/plugin/schema.d.ts | 2 +- .../plugin/src/generators/preset/generator.ts | 2 +- .../specify-output-capture.spec.ts | 2 +- .../update-16-0-0/cli-in-schema-json.spec.ts | 2 +- packages/react-native/package.json | 2 +- .../application/application.spec.ts | 2 +- .../generators/application/lib/add-detox.ts | 2 +- .../application/lib/nomalize-options.spec.ts | 2 +- .../src/generators/application/schema.d.ts | 2 +- .../component-story/component-story.spec.ts | 28 ++-- .../src/generators/library/library.spec.ts | 8 +- .../src/generators/library/schema.d.ts | 2 +- .../generators/stories/stories-app.spec.ts | 2 +- .../generators/stories/stories-lib.spec.ts | 2 +- .../configuration.spec.ts | 2 +- .../storybook-configuration/schema.d.ts | 2 +- .../src/generators/upgrade-native/schema.d.ts | 2 +- .../src/utils/add-linting.spec.ts | 4 +- .../react-native/src/utils/add-linting.ts | 4 +- .../src/utils/testing-generators.ts | 2 +- packages/react/package.json | 2 +- .../application/application.spec.ts | 8 +- .../src/generators/application/application.ts | 6 +- .../src/generators/application/schema.d.ts | 2 +- .../component-cypress-spec.spec.ts | 36 ++--- .../component-story/component-story.spec.ts | 64 ++++----- .../component-test/component-test.spec.ts | 2 +- .../cypress-component-configuration.spec.ts | 2 +- .../federate-module/federate-module.spec.ts | 2 +- .../react/src/generators/host/host.spec.ts | 2 +- .../react/src/generators/host/schema.d.ts | 2 +- .../src/generators/library/lib/add-linting.ts | 4 +- .../library/lib/normalize-options.spec.ts | 2 +- .../src/generators/library/library.spec.ts | 8 +- .../react/src/generators/library/schema.d.ts | 2 +- .../react/src/generators/redux/redux.spec.ts | 2 +- .../src/generators/remote/remote.spec.ts | 2 +- .../react/src/generators/remote/schema.d.ts | 2 +- .../generators/setup-ssr/setup-ssr.spec.ts | 2 +- .../generators/stories/stories.app.spec.ts | 26 ++-- .../generators/stories/stories.lib.spec.ts | 14 +- .../generators/stories/stories.nextjs.spec.ts | 2 +- .../configuration.spec.ts | 2 +- .../storybook-configuration/schema.d.ts | 2 +- .../react/src/utils/testing-generators.ts | 2 +- packages/storybook/package.json | 2 +- .../configuration/configuration.spec.ts | 2 +- .../generators/configuration/configuration.ts | 6 +- .../configuration/lib/util-functions.ts | 6 +- .../src/generators/configuration/schema.d.ts | 2 +- .../cypress-project/cypress-project.spec.ts | 2 +- .../cypress-project/cypress-project.ts | 2 +- packages/storybook/src/utils/testing.ts | 2 +- packages/vue/package.json | 2 +- .../src/generators/application/application.ts | 2 +- .../src/generators/application/schema.d.ts | 2 +- .../__snapshots__/library.spec.ts.snap | 4 +- .../library/lib/normalize-options.spec.ts | 2 +- .../src/generators/library/library.spec.ts | 8 +- .../vue/src/generators/library/schema.d.ts | 2 +- .../stories/lib/component-story.spec.ts | 10 +- .../generators/stories/stories.app.spec.ts | 2 +- .../generators/stories/stories.lib.spec.ts | 2 +- .../configuration.spec.ts | 2 +- .../storybook-configuration/schema.d.ts | 2 +- packages/vue/src/utils/add-linting.ts | 6 +- packages/vue/src/utils/test-utils.ts | 2 +- packages/web/.eslintrc.json | 2 +- .../application/application.spec.ts | 4 +- .../src/generators/application/application.ts | 4 +- .../src/generators/application/schema.d.ts | 2 +- ...t-configuration-in-new-destination.spec.ts | 4 +- .../move/lib/update-eslint-config.ts | 2 +- .../src/generators/move/move.spec.ts | 2 +- ...ve-workspace-generators-to-local-plugin.ts | 2 +- scripts/copy-readme.js | 6 +- tsconfig.base.json | 4 +- 285 files changed, 754 insertions(+), 712 deletions(-) rename docs/generated/packages/{linter/executors/eslint.json => eslint/executors/lint.json} (60%) rename docs/generated/packages/{linter => eslint}/generators/convert-to-flat-config.json (85%) rename docs/generated/packages/{linter => eslint}/generators/workspace-rule.json (92%) rename docs/generated/packages/{linter => eslint}/generators/workspace-rules-project.json (88%) delete mode 100644 docs/generated/packages/linter/documents/overview.md rename e2e/{linter => eslint}/jest.config.ts (92%) rename e2e/{linter => eslint}/project.json (59%) rename e2e/{linter => eslint}/src/linter.test.ts (100%) rename e2e/{linter => eslint}/tsconfig.json (100%) rename e2e/{linter => eslint}/tsconfig.spec.json (100%) create mode 100644 packages-legacy/linter-nx/README.md create mode 100644 packages-legacy/linter-nx/executors.json create mode 100644 packages-legacy/linter-nx/generators.json create mode 100644 packages-legacy/linter-nx/index.ts create mode 100644 packages-legacy/linter-nx/package.json create mode 100644 packages-legacy/linter-nx/project.json create mode 100644 packages-legacy/linter-nx/tsconfig.json rename packages/{linter => eslint}/.eslintrc.json (100%) rename packages/{linter => eslint}/README.md (100%) rename packages/{linter => eslint}/docs/eslint-examples.md (92%) rename packages/{linter => eslint}/docs/workspace-rule-examples.md (100%) create mode 100644 packages/eslint/executors.json rename packages/{linter => eslint}/generators.json (97%) rename packages/{linter => eslint}/index.ts (86%) rename packages/{linter => eslint}/jest.config.ts (91%) rename packages/{linter => eslint}/migrations.json (100%) rename packages/{linter => eslint}/migrations.spec.ts (100%) rename packages/{linter => eslint}/package.json (92%) rename packages/{linter => eslint}/project.json (70%) rename packages/{linter/src/executors/eslint => eslint/src/executors/lint}/hasher.ts (100%) rename packages/{linter/src/executors/eslint => eslint/src/executors/lint}/lint.impl.spec.ts (100%) rename packages/{linter/src/executors/eslint => eslint/src/executors/lint}/lint.impl.ts (100%) rename packages/{linter/src/executors/eslint => eslint/src/executors/lint}/schema.d.ts (100%) rename packages/{linter/src/executors/eslint => eslint/src/executors/lint}/schema.json (100%) rename packages/{linter/src/executors/eslint => eslint/src/executors/lint}/utility/eslint-utils.spec.ts (100%) rename packages/{linter/src/executors/eslint => eslint/src/executors/lint}/utility/eslint-utils.ts (100%) rename packages/{linter => eslint}/src/generators/convert-to-flat-config/__snapshots__/generator.spec.ts.snap (100%) rename packages/{linter => eslint}/src/generators/convert-to-flat-config/converters/json-converter.spec.ts (100%) rename packages/{linter => eslint}/src/generators/convert-to-flat-config/converters/json-converter.ts (100%) rename packages/{linter => eslint}/src/generators/convert-to-flat-config/generator.spec.ts (100%) rename packages/{linter => eslint}/src/generators/convert-to-flat-config/generator.ts (89%) rename packages/{linter => eslint}/src/generators/convert-to-flat-config/schema.d.ts (100%) rename packages/{linter => eslint}/src/generators/convert-to-flat-config/schema.json (100%) rename packages/{linter => eslint}/src/generators/init/__snapshots__/init.spec.ts.snap (100%) rename packages/{linter => eslint}/src/generators/init/global-eslint-config.ts (100%) rename packages/{linter => eslint}/src/generators/init/init-migration.ts (98%) rename packages/{linter => eslint}/src/generators/init/init.spec.ts (97%) rename packages/{linter => eslint}/src/generators/init/init.ts (96%) rename packages/{linter => eslint}/src/generators/lint-project/lint-project.spec.ts (97%) rename packages/{linter => eslint}/src/generators/lint-project/lint-project.ts (99%) rename packages/{linter => eslint}/src/generators/utils/eslint-file.spec.ts (97%) rename packages/{linter => eslint}/src/generators/utils/eslint-file.ts (100%) rename packages/{linter => eslint}/src/generators/utils/eslint-targets.ts (81%) rename packages/{linter => eslint}/src/generators/utils/flat-config/ast-utils.spec.ts (100%) rename packages/{linter => eslint}/src/generators/utils/flat-config/ast-utils.ts (100%) rename packages/{linter => eslint}/src/generators/utils/flat-config/path-utils.ts (100%) rename packages/{linter => eslint}/src/generators/utils/linter.ts (100%) rename packages/{linter => eslint}/src/generators/workspace-rule/__snapshots__/workspace-rule.spec.ts.snap (100%) rename packages/{linter => eslint}/src/generators/workspace-rule/files/__name__.spec.ts__tmpl__ (100%) rename packages/{linter => eslint}/src/generators/workspace-rule/files/__name__.ts__tmpl__ (100%) rename packages/{linter => eslint}/src/generators/workspace-rule/schema.json (100%) rename packages/{linter => eslint}/src/generators/workspace-rule/workspace-rule.spec.ts (99%) rename packages/{linter => eslint}/src/generators/workspace-rule/workspace-rule.ts (100%) rename packages/{linter => eslint}/src/generators/workspace-rules-project/__snapshots__/workspace-rules-project.spec.ts.snap (100%) rename packages/{linter => eslint}/src/generators/workspace-rules-project/files/index.ts__tmpl__ (100%) rename packages/{linter => eslint}/src/generators/workspace-rules-project/files/tsconfig.json__tmpl__ (100%) rename packages/{linter => eslint}/src/generators/workspace-rules-project/files/tsconfig.lint.json__tmpl__ (100%) rename packages/{linter => eslint}/src/generators/workspace-rules-project/schema.json (100%) rename packages/{linter => eslint}/src/generators/workspace-rules-project/workspace-rules-project.spec.ts (98%) rename packages/{linter => eslint}/src/generators/workspace-rules-project/workspace-rules-project.ts (100%) rename packages/{linter => eslint}/src/migrations/update-15-0-0/add-eslint-inputs.spec.ts (100%) rename packages/{linter => eslint}/src/migrations/update-15-0-0/add-eslint-inputs.ts (100%) rename packages/{linter => eslint}/src/migrations/update-15-7-1/add-eslint-ignore.spec.ts (100%) rename packages/{linter => eslint}/src/migrations/update-15-7-1/add-eslint-ignore.ts (100%) rename packages/{linter => eslint}/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.spec.ts (91%) rename packages/{linter => eslint}/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.ts (95%) rename packages/{linter => eslint}/src/migrations/update-16-8-0-add-ignored-files/update-16-8-0-add-ignored-files.spec.ts (100%) rename packages/{linter => eslint}/src/migrations/update-16-8-0-add-ignored-files/update-16-8-0-add-ignored-files.ts (100%) rename packages/{linter => eslint}/src/utils/flat-config.ts (100%) rename packages/{linter => eslint}/src/utils/rules-requiring-type-checking.ts (100%) rename packages/{linter => eslint}/src/utils/versions.ts (100%) rename packages/{linter => eslint}/src/utils/workspace-lint-rules.ts (100%) rename packages/{linter => eslint}/tsconfig.json (100%) rename packages/{linter => eslint}/tsconfig.lib.json (100%) rename packages/{linter => eslint}/tsconfig.spec.json (100%) delete mode 100644 packages/linter/executors.json diff --git a/.github/workflows/e2e-matrix.yml b/.github/workflows/e2e-matrix.yml index 7b37e38a7a403..1377eadbd1a5e 100644 --- a/.github/workflows/e2e-matrix.yml +++ b/.github/workflows/e2e-matrix.yml @@ -117,7 +117,7 @@ jobs: - e2e-jest - e2e-js - e2e-lerna-smoke-tests - - e2e-linter + - e2e-eslint - e2e-next - e2e-node - e2e-nx-init @@ -165,7 +165,7 @@ jobs: codeowners: 'S04SJ6HHP0X' - project: e2e-lerna-smoke-tests codeowners: 'S04TNCVEETS' - - project: e2e-linter + - project: e2e-eslint codeowners: 'S04SYJGKSCT' - project: e2e-next codeowners: 'S04TNCNJG5N' @@ -227,7 +227,7 @@ jobs: - node_version: 16 project: e2e-js - node_version: 16 - project: e2e-linter + project: e2e-eslint - node_version: 16 project: e2e-next - node_version: 16 @@ -275,7 +275,7 @@ jobs: - node_version: 20 project: e2e-js - node_version: 20 - project: e2e-linter + project: e2e-eslint - node_version: 20 project: e2e-next - node_version: 20 diff --git a/.github/workflows/e2e-windows.yml b/.github/workflows/e2e-windows.yml index 6be6b5c8bf6fd..0143a35c6278a 100644 --- a/.github/workflows/e2e-windows.yml +++ b/.github/workflows/e2e-windows.yml @@ -86,7 +86,7 @@ jobs: - e2e-jest - e2e-js - e2e-lerna-smoke-tests - - e2e-linter + - e2e-eslint - e2e-next - e2e-node - e2e-nx-init @@ -119,7 +119,7 @@ jobs: codeowners: 'S04SJ6HHP0X' - project: e2e-lerna-smoke-tests codeowners: 'S04TNCVEETS' - - project: e2e-linter + - project: e2e-eslint codeowners: 'S04SYJGKSCT' - project: e2e-next codeowners: 'S04TNCNJG5N' @@ -168,7 +168,7 @@ jobs: - node_version: 16 project: e2e-js - node_version: 16 - project: e2e-linter + project: e2e-eslint - node_version: 16 project: e2e-next - node_version: 16 @@ -210,7 +210,7 @@ jobs: - node_version: 20 project: e2e-js - node_version: 20 - project: e2e-linter + project: e2e-eslint - node_version: 20 project: e2e-next - node_version: 20 diff --git a/CODEOWNERS b/CODEOWNERS index 5975b703598bb..a64f882bfd7ec 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -113,11 +113,11 @@ rust-toolchain @nrwl/nx-native-reviewers # Linter /docs/generated/packages/eslint-plugin/** @nrwl/nx-linter-reviewers @nrwl/nx-docs-reviewers -/docs/generated/packages/linter/** @nrwl/nx-linter-reviewers @nrwl/nx-docs-reviewers +/docs/generated/packages/eslint/** @nrwl/nx-linter-reviewers @nrwl/nx-docs-reviewers /docs/shared/packages/linter/** @nrwl/nx-linter-reviewers @nrwl/nx-docs-reviewers /packages/eslint-plugin/** @nrwl/nx-linter-reviewers -/packages/linter/** @nrwl/nx-linter-reviewers -/e2e/linter/** @nrwl/nx-linter-reviewers +/packages/eslint/** @nrwl/nx-linter-reviewers +/e2e/eslint/** @nrwl/nx-linter-reviewers .eslint* @nrwl/nx-linter-reviewers # Storybook diff --git a/docs/generated/manifests/menus.json b/docs/generated/manifests/menus.json index 5f632c9908c78..7d650767d884b 100644 --- a/docs/generated/manifests/menus.json +++ b/docs/generated/manifests/menus.json @@ -6517,6 +6517,65 @@ "isExternal": false, "disableCollapsible": false }, + { + "id": "eslint", + "path": "/nx-api/eslint", + "name": "eslint", + "children": [ + { + "id": "executors", + "path": "/nx-api/eslint/executors", + "name": "executors", + "children": [ + { + "id": "lint", + "path": "/nx-api/eslint/executors/lint", + "name": "lint", + "children": [], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "generators", + "path": "/nx-api/eslint/generators", + "name": "generators", + "children": [ + { + "id": "workspace-rules-project", + "path": "/nx-api/eslint/generators/workspace-rules-project", + "name": "workspace-rules-project", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "workspace-rule", + "path": "/nx-api/eslint/generators/workspace-rule", + "name": "workspace-rule", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "convert-to-flat-config", + "path": "/nx-api/eslint/generators/convert-to-flat-config", + "name": "convert-to-flat-config", + "children": [], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, { "id": "eslint-plugin", "path": "/nx-api/eslint-plugin", @@ -6974,82 +7033,6 @@ "isExternal": false, "disableCollapsible": false }, - { - "id": "linter", - "path": "/nx-api/linter", - "name": "linter", - "children": [ - { - "id": "documents", - "path": "/nx-api/linter/documents", - "name": "documents", - "children": [ - { - "name": "Overview", - "path": "/nx-api/linter/documents/overview", - "id": "overview", - "isExternal": false, - "children": [], - "disableCollapsible": false - } - ], - "isExternal": false, - "disableCollapsible": false - }, - { - "id": "executors", - "path": "/nx-api/linter/executors", - "name": "executors", - "children": [ - { - "id": "eslint", - "path": "/nx-api/linter/executors/eslint", - "name": "eslint", - "children": [], - "isExternal": false, - "disableCollapsible": false - } - ], - "isExternal": false, - "disableCollapsible": false - }, - { - "id": "generators", - "path": "/nx-api/linter/generators", - "name": "generators", - "children": [ - { - "id": "workspace-rules-project", - "path": "/nx-api/linter/generators/workspace-rules-project", - "name": "workspace-rules-project", - "children": [], - "isExternal": false, - "disableCollapsible": false - }, - { - "id": "workspace-rule", - "path": "/nx-api/linter/generators/workspace-rule", - "name": "workspace-rule", - "children": [], - "isExternal": false, - "disableCollapsible": false - }, - { - "id": "convert-to-flat-config", - "path": "/nx-api/linter/generators/convert-to-flat-config", - "name": "convert-to-flat-config", - "children": [], - "isExternal": false, - "disableCollapsible": false - } - ], - "isExternal": false, - "disableCollapsible": false - } - ], - "isExternal": false, - "disableCollapsible": false - }, { "id": "nest", "path": "/nx-api/nest", diff --git a/docs/generated/manifests/nx-api.json b/docs/generated/manifests/nx-api.json index 134288a6af0a2..c6d1e28a82abd 100644 --- a/docs/generated/manifests/nx-api.json +++ b/docs/generated/manifests/nx-api.json @@ -650,6 +650,56 @@ }, "path": "/nx-api/esbuild" }, + "eslint": { + "githubRoot": "https://github.com/nrwl/nx/blob/master", + "name": "eslint", + "packageName": "@nx/eslint", + "description": "The ESLint plugin for Nx contains executors, generators and utilities used for linting JavaScript/TypeScript projects within an Nx workspace.", + "documents": {}, + "root": "/packages/eslint", + "source": "/packages/eslint/src", + "executors": { + "/nx-api/eslint/executors/lint": { + "description": "Run ESLint on a project.", + "file": "generated/packages/eslint/executors/lint.json", + "hidden": false, + "name": "lint", + "originalFilePath": "/packages/eslint/src/executors/lint/schema.json", + "path": "/nx-api/eslint/executors/lint", + "type": "executor" + } + }, + "generators": { + "/nx-api/eslint/generators/workspace-rules-project": { + "description": "Create the Workspace Lint Rules Project.", + "file": "generated/packages/eslint/generators/workspace-rules-project.json", + "hidden": true, + "name": "workspace-rules-project", + "originalFilePath": "/packages/eslint/src/generators/workspace-rules-project/schema.json", + "path": "/nx-api/eslint/generators/workspace-rules-project", + "type": "generator" + }, + "/nx-api/eslint/generators/workspace-rule": { + "description": "Create a new Workspace ESLint rule.", + "file": "generated/packages/eslint/generators/workspace-rule.json", + "hidden": false, + "name": "workspace-rule", + "originalFilePath": "/packages/eslint/src/generators/workspace-rule/schema.json", + "path": "/nx-api/eslint/generators/workspace-rule", + "type": "generator" + }, + "/nx-api/eslint/generators/convert-to-flat-config": { + "description": "Convert an Nx workspace's ESLint configs to use Flat Config.", + "file": "generated/packages/eslint/generators/convert-to-flat-config.json", + "hidden": false, + "name": "convert-to-flat-config", + "originalFilePath": "/packages/eslint/src/generators/convert-to-flat-config/schema.json", + "path": "/nx-api/eslint/generators/convert-to-flat-config", + "type": "generator" + } + }, + "path": "/nx-api/eslint" + }, "eslint-plugin": { "githubRoot": "https://github.com/nrwl/nx/blob/master", "name": "eslint-plugin", @@ -1078,68 +1128,6 @@ }, "path": "/nx-api/js" }, - "linter": { - "githubRoot": "https://github.com/nrwl/nx/blob/master", - "name": "linter", - "packageName": "@nx/linter", - "description": "The Linter plugin for Nx contains executors, generators and utilities used for linting JavaScript/TypeScript projects within an Nx workspace.", - "documents": { - "/nx-api/linter/documents/overview": { - "id": "overview", - "name": "Overview", - "description": "The Linter plugin for Nx contains executors, generators and utilities used for linting JavaScript/TypeScript projects within an Nx workspace.", - "file": "generated/packages/linter/documents/overview", - "itemList": [], - "isExternal": false, - "path": "/nx-api/linter/documents/overview", - "tags": [], - "originalFilePath": "shared/packages/linter/linter-plugin" - } - }, - "root": "/packages/linter", - "source": "/packages/linter/src", - "executors": { - "/nx-api/linter/executors/eslint": { - "description": "Run ESLint on a project.", - "file": "generated/packages/linter/executors/eslint.json", - "hidden": false, - "name": "eslint", - "originalFilePath": "/packages/linter/src/executors/eslint/schema.json", - "path": "/nx-api/linter/executors/eslint", - "type": "executor" - } - }, - "generators": { - "/nx-api/linter/generators/workspace-rules-project": { - "description": "Create the Workspace Lint Rules Project.", - "file": "generated/packages/linter/generators/workspace-rules-project.json", - "hidden": true, - "name": "workspace-rules-project", - "originalFilePath": "/packages/linter/src/generators/workspace-rules-project/schema.json", - "path": "/nx-api/linter/generators/workspace-rules-project", - "type": "generator" - }, - "/nx-api/linter/generators/workspace-rule": { - "description": "Create a new Workspace ESLint rule.", - "file": "generated/packages/linter/generators/workspace-rule.json", - "hidden": false, - "name": "workspace-rule", - "originalFilePath": "/packages/linter/src/generators/workspace-rule/schema.json", - "path": "/nx-api/linter/generators/workspace-rule", - "type": "generator" - }, - "/nx-api/linter/generators/convert-to-flat-config": { - "description": "Convert an Nx workspace's ESLint configs to use Flat Config.", - "file": "generated/packages/linter/generators/convert-to-flat-config.json", - "hidden": false, - "name": "convert-to-flat-config", - "originalFilePath": "/packages/linter/src/generators/convert-to-flat-config/schema.json", - "path": "/nx-api/linter/generators/convert-to-flat-config", - "type": "generator" - } - }, - "path": "/nx-api/linter" - }, "nest": { "githubRoot": "https://github.com/nrwl/nx/blob/master", "name": "nest", diff --git a/docs/generated/packages-metadata.json b/docs/generated/packages-metadata.json index 701d8f6c1f3e1..1ccb5bfbc7063 100644 --- a/docs/generated/packages-metadata.json +++ b/docs/generated/packages-metadata.json @@ -643,6 +643,55 @@ "root": "/packages/esbuild", "source": "/packages/esbuild/src" }, + { + "description": "The ESLint plugin for Nx contains executors, generators and utilities used for linting JavaScript/TypeScript projects within an Nx workspace.", + "documents": [], + "executors": [ + { + "description": "Run ESLint on a project.", + "file": "generated/packages/eslint/executors/lint.json", + "hidden": false, + "name": "lint", + "originalFilePath": "/packages/eslint/src/executors/lint/schema.json", + "path": "eslint/executors/lint", + "type": "executor" + } + ], + "generators": [ + { + "description": "Create the Workspace Lint Rules Project.", + "file": "generated/packages/eslint/generators/workspace-rules-project.json", + "hidden": true, + "name": "workspace-rules-project", + "originalFilePath": "/packages/eslint/src/generators/workspace-rules-project/schema.json", + "path": "eslint/generators/workspace-rules-project", + "type": "generator" + }, + { + "description": "Create a new Workspace ESLint rule.", + "file": "generated/packages/eslint/generators/workspace-rule.json", + "hidden": false, + "name": "workspace-rule", + "originalFilePath": "/packages/eslint/src/generators/workspace-rule/schema.json", + "path": "eslint/generators/workspace-rule", + "type": "generator" + }, + { + "description": "Convert an Nx workspace's ESLint configs to use Flat Config.", + "file": "generated/packages/eslint/generators/convert-to-flat-config.json", + "hidden": false, + "name": "convert-to-flat-config", + "originalFilePath": "/packages/eslint/src/generators/convert-to-flat-config/schema.json", + "path": "eslint/generators/convert-to-flat-config", + "type": "generator" + } + ], + "githubRoot": "https://github.com/nrwl/nx/blob/master", + "name": "eslint", + "packageName": "@nx/eslint", + "root": "/packages/eslint", + "source": "/packages/eslint/src" + }, { "description": "The eslint-plugin package is an ESLint plugin that contains a collection of recommended ESLint rule configurations which you can extend from in your own ESLint configs, as well as an Nx-specific lint rule called enforce-module-boundaries.", "documents": [ @@ -1066,67 +1115,6 @@ "root": "/packages/js", "source": "/packages/js/src" }, - { - "description": "The Linter plugin for Nx contains executors, generators and utilities used for linting JavaScript/TypeScript projects within an Nx workspace.", - "documents": [ - { - "id": "overview", - "name": "Overview", - "description": "The Linter plugin for Nx contains executors, generators and utilities used for linting JavaScript/TypeScript projects within an Nx workspace.", - "file": "generated/packages/linter/documents/overview", - "itemList": [], - "isExternal": false, - "path": "linter/documents/overview", - "tags": [], - "originalFilePath": "shared/packages/linter/linter-plugin" - } - ], - "executors": [ - { - "description": "Run ESLint on a project.", - "file": "generated/packages/linter/executors/eslint.json", - "hidden": false, - "name": "eslint", - "originalFilePath": "/packages/linter/src/executors/eslint/schema.json", - "path": "linter/executors/eslint", - "type": "executor" - } - ], - "generators": [ - { - "description": "Create the Workspace Lint Rules Project.", - "file": "generated/packages/linter/generators/workspace-rules-project.json", - "hidden": true, - "name": "workspace-rules-project", - "originalFilePath": "/packages/linter/src/generators/workspace-rules-project/schema.json", - "path": "linter/generators/workspace-rules-project", - "type": "generator" - }, - { - "description": "Create a new Workspace ESLint rule.", - "file": "generated/packages/linter/generators/workspace-rule.json", - "hidden": false, - "name": "workspace-rule", - "originalFilePath": "/packages/linter/src/generators/workspace-rule/schema.json", - "path": "linter/generators/workspace-rule", - "type": "generator" - }, - { - "description": "Convert an Nx workspace's ESLint configs to use Flat Config.", - "file": "generated/packages/linter/generators/convert-to-flat-config.json", - "hidden": false, - "name": "convert-to-flat-config", - "originalFilePath": "/packages/linter/src/generators/convert-to-flat-config/schema.json", - "path": "linter/generators/convert-to-flat-config", - "type": "generator" - } - ], - "githubRoot": "https://github.com/nrwl/nx/blob/master", - "name": "linter", - "packageName": "@nx/linter", - "root": "/packages/linter", - "source": "/packages/linter/src" - }, { "description": "The Nx Plugin for Nest contains executors and generators for allowing your workspace to create powerful Nest best in class APIs.", "documents": [ diff --git a/docs/generated/packages/eslint-plugin/documents/dependency-checks.md b/docs/generated/packages/eslint-plugin/documents/dependency-checks.md index aaa8998a457c7..1a571d8a4dd5d 100644 --- a/docs/generated/packages/eslint-plugin/documents/dependency-checks.md +++ b/docs/generated/packages/eslint-plugin/documents/dependency-checks.md @@ -38,7 +38,7 @@ Additionally, you need to adjust your `lintFilePatterns` to include the project' "targets": { // ... more targets "lint": { - "executor": "@nx/linter:eslint", + "executor": "@nx/eslint:lint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": [ diff --git a/docs/generated/packages/linter/executors/eslint.json b/docs/generated/packages/eslint/executors/lint.json similarity index 60% rename from docs/generated/packages/linter/executors/eslint.json rename to docs/generated/packages/eslint/executors/lint.json index 82d84942d39d5..1e4453f0fc073 100644 --- a/docs/generated/packages/linter/executors/eslint.json +++ b/docs/generated/packages/eslint/executors/lint.json @@ -1,6 +1,6 @@ { - "name": "eslint", - "implementation": "/packages/linter/src/executors/eslint/lint.impl.ts", + "name": "lint", + "implementation": "/packages/eslint/src/executors/lint/lint.impl.ts", "schema": { "version": 2, "outputCapture": "direct-nodejs", @@ -136,13 +136,13 @@ } }, "required": ["lintFilePatterns"], - "examplesFile": "Linter can be configured in multiple ways. The basic way is to provide only `lintFilePatterns`, which is a mandatory property. This tells us where to look for files to lint.\n\n`project.json`:\n\n```json\n\"lint\": {\n \"executor\": \"@nx/linter:eslint\",\n \"options\": {\n \"lintFilePatterns\": [\"apps/frontend/**/*.ts\"]\n }\n}\n```\n\n## Examples\n\n{% tabs %}\n{% tab label=\"Fixing linter issues\" %}\n\nLinter provides an automated way of fixing known issues. To ensure that those changes are properly cached, we need to add an `outputs` property to the `lint` target. Omitting the `outputs` property would produce an invalid cache record. Both of these properties are set by default when scaffolding a new project.\n\n```json\n\"lint\": {\n \"executor\": \"@nx/linter:eslint\",\n \"outputs\": [\"{options.outputFile}\"],\n \"options\": {\n \"lintFilePatterns\": [\"apps/frontend/**/*.ts\"]\n }\n}\n```\n\nWith these settings, we can run the command with a `--fix` flag:\n\n```bash\nnx run frontend:lint --fix\n```\n\nWe can also set this flag via project configuration to always fix files when running lint:\n\n```json\n\"lint\": {\n \"executor\": \"@nx/linter:eslint\",\n \"outputs\": [\"{options.outputFile}\"],\n \"options\": {\n \"lintFilePatterns\": [\"apps/frontend/**/*.ts\"],\n \"fix\": true\n }\n}\n```\n\n{% /tab %}\n{% tab label=\"Custom output format\" %}\n\nESLint executor uses the `stylish` output format by default. You can change this by specifying the `format` property:\n\n```json\n\"lint\": {\n \"executor\": \"@nx/linter:eslint\",\n \"outputs\": [\"{options.outputFile}\"],\n \"options\": {\n \"lintFilePatterns\": [\"apps/frontend/**/*.ts\"],\n \"format\": \"compact\"\n }\n}\n```\n\n{% /tab %}\n{% tab label=\"Silence warnings\" %}\n\nMigrated or legacy projects tend to have an overwhelming amount of lint errors. We might want to change those temporarily to be warnings so they don't block the development. But they would still clutter the report. We can run the command with `--quiet` to hide warning (errors would still break the lint):\n\n```bash\nnx run frontend:lint --quiet\n```\n\nWe can also set this via project configuration as a default option.\n\n```json\n\"lint\": {\n \"executor\": \"@nx/linter:eslint\",\n \"outputs\": [\"{options.outputFile}\"],\n \"options\": {\n \"lintFilePatterns\": [\"apps/frontend/**/*.ts\"],\n \"quiet\": true\n }\n}\n```\n\n{% /tab %}\n{% tab label=\"Flat Config file\" %}\n\n`ESLint` provides several ways of specifying the configuration. The default one is using `.eslintrc.json` but you can override it by setting the `eslintConfig` flag. The new `Flat Config` is now also supported:\n\n```json\n\"lint\": {\n \"executor\": \"@nx/linter:eslint\",\n \"outputs\": [\"{options.outputFile}\"],\n \"options\": {\n \"lintFilePatterns\": [\"apps/frontend/**/*.ts\"],\n \"eslintConfig\": \"eslint.config.js\"\n }\n}\n```\n\n**Note:** In contrast to other configuration formats, the `Flat Config` requires that all configuration files are converted to `eslint.config.js`. Built-in migrations and generators support only `.eslintrc.json` at the moment.\n\n{% /tab %}\n{% /tabs %}\n\n---\n", + "examplesFile": "Linter can be configured in multiple ways. The basic way is to provide only `lintFilePatterns`, which is a mandatory property. This tells us where to look for files to lint.\n\n`project.json`:\n\n```json\n\"lint\": {\n \"executor\": \"@nx/eslint:lint\",\n \"options\": {\n \"lintFilePatterns\": [\"apps/frontend/**/*.ts\"]\n }\n}\n```\n\n## Examples\n\n{% tabs %}\n{% tab label=\"Fixing linter issues\" %}\n\nLinter provides an automated way of fixing known issues. To ensure that those changes are properly cached, we need to add an `outputs` property to the `lint` target. Omitting the `outputs` property would produce an invalid cache record. Both of these properties are set by default when scaffolding a new project.\n\n```json\n\"lint\": {\n \"executor\": \"@nx/eslint:lint\",\n \"outputs\": [\"{options.outputFile}\"],\n \"options\": {\n \"lintFilePatterns\": [\"apps/frontend/**/*.ts\"]\n }\n}\n```\n\nWith these settings, we can run the command with a `--fix` flag:\n\n```bash\nnx run frontend:lint --fix\n```\n\nWe can also set this flag via project configuration to always fix files when running lint:\n\n```json\n\"lint\": {\n \"executor\": \"@nx/eslint:lint\",\n \"outputs\": [\"{options.outputFile}\"],\n \"options\": {\n \"lintFilePatterns\": [\"apps/frontend/**/*.ts\"],\n \"fix\": true\n }\n}\n```\n\n{% /tab %}\n{% tab label=\"Custom output format\" %}\n\nESLint executor uses the `stylish` output format by default. You can change this by specifying the `format` property:\n\n```json\n\"lint\": {\n \"executor\": \"@nx/eslint:lint\",\n \"outputs\": [\"{options.outputFile}\"],\n \"options\": {\n \"lintFilePatterns\": [\"apps/frontend/**/*.ts\"],\n \"format\": \"compact\"\n }\n}\n```\n\n{% /tab %}\n{% tab label=\"Silence warnings\" %}\n\nMigrated or legacy projects tend to have an overwhelming amount of lint errors. We might want to change those temporarily to be warnings so they don't block the development. But they would still clutter the report. We can run the command with `--quiet` to hide warning (errors would still break the lint):\n\n```bash\nnx run frontend:lint --quiet\n```\n\nWe can also set this via project configuration as a default option.\n\n```json\n\"lint\": {\n \"executor\": \"@nx/eslint:lint\",\n \"outputs\": [\"{options.outputFile}\"],\n \"options\": {\n \"lintFilePatterns\": [\"apps/frontend/**/*.ts\"],\n \"quiet\": true\n }\n}\n```\n\n{% /tab %}\n{% tab label=\"Flat Config file\" %}\n\n`ESLint` provides several ways of specifying the configuration. The default one is using `.eslintrc.json` but you can override it by setting the `eslintConfig` flag. The new `Flat Config` is now also supported:\n\n```json\n\"lint\": {\n \"executor\": \"@nx/eslint:lint\",\n \"outputs\": [\"{options.outputFile}\"],\n \"options\": {\n \"lintFilePatterns\": [\"apps/frontend/**/*.ts\"],\n \"eslintConfig\": \"eslint.config.js\"\n }\n}\n```\n\n**Note:** In contrast to other configuration formats, the `Flat Config` requires that all configuration files are converted to `eslint.config.js`. Built-in migrations and generators support only `.eslintrc.json` at the moment.\n\n{% /tab %}\n{% /tabs %}\n\n---\n", "presets": [] }, - "hasher": "./src/executors/eslint/hasher", + "hasher": "./src/executors/lint/hasher", "description": "Run ESLint on a project.", "aliases": [], "hidden": false, - "path": "/packages/linter/src/executors/eslint/schema.json", + "path": "/packages/eslint/src/executors/lint/schema.json", "type": "executor" } diff --git a/docs/generated/packages/linter/generators/convert-to-flat-config.json b/docs/generated/packages/eslint/generators/convert-to-flat-config.json similarity index 85% rename from docs/generated/packages/linter/generators/convert-to-flat-config.json rename to docs/generated/packages/eslint/generators/convert-to-flat-config.json index 0bbddebb1d165..0658338d09861 100644 --- a/docs/generated/packages/linter/generators/convert-to-flat-config.json +++ b/docs/generated/packages/eslint/generators/convert-to-flat-config.json @@ -20,9 +20,9 @@ "presets": [] }, "description": "Convert an Nx workspace's ESLint configs to use Flat Config.", - "implementation": "/packages/linter/src/generators/convert-to-flat-config/generator.ts", + "implementation": "/packages/eslint/src/generators/convert-to-flat-config/generator.ts", "aliases": [], "hidden": false, - "path": "/packages/linter/src/generators/convert-to-flat-config/schema.json", + "path": "/packages/eslint/src/generators/convert-to-flat-config/schema.json", "type": "generator" } diff --git a/docs/generated/packages/linter/generators/workspace-rule.json b/docs/generated/packages/eslint/generators/workspace-rule.json similarity index 92% rename from docs/generated/packages/linter/generators/workspace-rule.json rename to docs/generated/packages/eslint/generators/workspace-rule.json index e80e3eff5dd16..10e513eb0a64b 100644 --- a/docs/generated/packages/linter/generators/workspace-rule.json +++ b/docs/generated/packages/eslint/generators/workspace-rule.json @@ -26,9 +26,9 @@ "presets": [] }, "description": "Create a new Workspace ESLint rule.", - "implementation": "/packages/linter/src/generators/workspace-rule/workspace-rule#lintWorkspaceRuleGenerator.ts", + "implementation": "/packages/eslint/src/generators/workspace-rule/workspace-rule#lintWorkspaceRuleGenerator.ts", "aliases": [], "hidden": false, - "path": "/packages/linter/src/generators/workspace-rule/schema.json", + "path": "/packages/eslint/src/generators/workspace-rule/schema.json", "type": "generator" } diff --git a/docs/generated/packages/linter/generators/workspace-rules-project.json b/docs/generated/packages/eslint/generators/workspace-rules-project.json similarity index 88% rename from docs/generated/packages/linter/generators/workspace-rules-project.json rename to docs/generated/packages/eslint/generators/workspace-rules-project.json index 571bb3c5802da..237556f347116 100644 --- a/docs/generated/packages/linter/generators/workspace-rules-project.json +++ b/docs/generated/packages/eslint/generators/workspace-rules-project.json @@ -27,8 +27,8 @@ }, "description": "Create the Workspace Lint Rules Project.", "hidden": true, - "implementation": "/packages/linter/src/generators/workspace-rules-project/workspace-rules-project#lintWorkspaceRulesProjectGenerator.ts", + "implementation": "/packages/eslint/src/generators/workspace-rules-project/workspace-rules-project#lintWorkspaceRulesProjectGenerator.ts", "aliases": [], - "path": "/packages/linter/src/generators/workspace-rules-project/schema.json", + "path": "/packages/eslint/src/generators/workspace-rules-project/schema.json", "type": "generator" } diff --git a/docs/generated/packages/linter/documents/overview.md b/docs/generated/packages/linter/documents/overview.md deleted file mode 100644 index f987ba1a7cb9c..0000000000000 --- a/docs/generated/packages/linter/documents/overview.md +++ /dev/null @@ -1,39 +0,0 @@ -The Linter plugin contains executors, generator, plugin and utilities used for linting JavaScript/TypeScript projects within an Nx workspace. - -## Setting Up Linter - -### Installation - -{% callout type="note" title="Keep Nx Package Versions In Sync" %} -Make sure to install the `@nx/linter` version that matches the version of `nx` in your repository. If the version numbers get out of sync, you can encounter some difficult to debug errors. You can [fix Nx version mismatches with this recipe](/recipes/tips-n-tricks/keep-nx-versions-in-sync). -{% /callout %} - -In any Nx workspace, you can install `@nx/linter` by running the following commands if `@nx/linter` package is not installed: - -```shell -npm i --save-dev @nx/linter -``` - -```shell -yarn add --dev @nx/linter -``` - -## Lint - -You can lint an application or a library with the following command: - -```shell -nx lint my-app -``` - -```shell -nx lint my-lib -``` - -## Utils - -- [convert-to-flat-config](/nx-api/linter/generators/convert-to-flat-config) - Converts the workspace's [ESLint](https://eslint.org/) configs to the new [Flat Config](https://eslint.org/blog/2022/08/new-config-system-part-2) - -## ESLint plugin - -Read about our dedicated ESLint plugin - [eslint-plugin-nx](/nx-api/eslint-plugin/documents/overview). diff --git a/docs/shared/angular-standalone-tutorial/3-task-running.md b/docs/shared/angular-standalone-tutorial/3-task-running.md index 8f2f7d9b7f119..89126ea47f712 100644 --- a/docs/shared/angular-standalone-tutorial/3-task-running.md +++ b/docs/shared/angular-standalone-tutorial/3-task-running.md @@ -47,7 +47,7 @@ Here's the `project.json` file for your `shared-ui` project: } }, "lint": { - "executor": "@nx/linter:eslint", + "executor": "@nx/eslint:lint", "options": { "lintFilePatterns": ["shared/ui/**/*.ts", "shared/ui/**/*.html"] } diff --git a/docs/shared/angular-standalone-tutorial/4-task-pipelines.md b/docs/shared/angular-standalone-tutorial/4-task-pipelines.md index 580479c42e97f..84e5c4c0375a5 100644 --- a/docs/shared/angular-standalone-tutorial/4-task-pipelines.md +++ b/docs/shared/angular-standalone-tutorial/4-task-pipelines.md @@ -162,7 +162,7 @@ Here are the outputs defined for the `shared-ui` project: } }, "lint": { - "executor": "@nx/linter:eslint", + "executor": "@nx/eslint:lint", "options": { "lintFilePatterns": ["shared/ui/**/*.ts", "shared/ui/**/*.html"] } diff --git a/docs/shared/node-server-tutorial/3-task-running.md b/docs/shared/node-server-tutorial/3-task-running.md index 0ff128d3c7dde..39ca6e52ea4a7 100644 --- a/docs/shared/node-server-tutorial/3-task-running.md +++ b/docs/shared/node-server-tutorial/3-task-running.md @@ -37,7 +37,7 @@ Here's the `project.json` file for the `auth` project: } }, "lint": { - "executor": "@nx/linter:eslint", + "executor": "@nx/eslint:lint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["auth/**/*.ts"] diff --git a/docs/shared/node-server-tutorial/4-task-pipelines.md b/docs/shared/node-server-tutorial/4-task-pipelines.md index 961477fdcc6a3..d75c660bb5a62 100644 --- a/docs/shared/node-server-tutorial/4-task-pipelines.md +++ b/docs/shared/node-server-tutorial/4-task-pipelines.md @@ -146,7 +146,7 @@ Here are the outputs defined for the `auth` project: } }, "lint": { - "executor": "@nx/linter:eslint", + "executor": "@nx/eslint:lint", "outputs": ["{options.outputFile}"], "options": { "outputFile": "dist/auth/lint-report.txt" diff --git a/docs/shared/packages/linter/dependency-checks.md b/docs/shared/packages/linter/dependency-checks.md index aaa8998a457c7..1a571d8a4dd5d 100644 --- a/docs/shared/packages/linter/dependency-checks.md +++ b/docs/shared/packages/linter/dependency-checks.md @@ -38,7 +38,7 @@ Additionally, you need to adjust your `lintFilePatterns` to include the project' "targets": { // ... more targets "lint": { - "executor": "@nx/linter:eslint", + "executor": "@nx/eslint:lint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": [ diff --git a/docs/shared/recipes/reduce-repetitive-configuration.md b/docs/shared/recipes/reduce-repetitive-configuration.md index 2320a401b9a1e..4aa70664e4e9e 100644 --- a/docs/shared/recipes/reduce-repetitive-configuration.md +++ b/docs/shared/recipes/reduce-repetitive-configuration.md @@ -44,7 +44,7 @@ All three libraries have a similar project configuration. Here is what their `pr } }, "lint": { - "executor": "@nx/linter:eslint", + "executor": "@nx/eslint:lint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["libs/lib1/**/*.ts"] @@ -90,7 +90,7 @@ All three libraries have a similar project configuration. Here is what their `pr } }, "lint": { - "executor": "@nx/linter:eslint", + "executor": "@nx/eslint:lint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["libs/lib2/**/*.ts"] @@ -137,7 +137,7 @@ All three libraries have a similar project configuration. Here is what their `pr } }, "lint": { - "executor": "@nx/linter:eslint", + "executor": "@nx/eslint:lint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["libs/lib3/**/*.ts"] @@ -185,7 +185,7 @@ Let's use the `targetDefaults` property in `nx.json` to reduce some of this dupl } }, "lint": { - "executor": "@nx/linter:eslint", + "executor": "@nx/eslint:lint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["{projectRoot}/**/*.ts"] diff --git a/docs/shared/recipes/tips-n-tricks/migrating-to-flat-eslint.md b/docs/shared/recipes/tips-n-tricks/migrating-to-flat-eslint.md index 641f4332a187a..0c2fadb4fb261 100644 --- a/docs/shared/recipes/tips-n-tricks/migrating-to-flat-eslint.md +++ b/docs/shared/recipes/tips-n-tricks/migrating-to-flat-eslint.md @@ -156,7 +156,7 @@ module.exports = { For additional details, head over to [ESLint's official blog post](https://eslint.org/blog/2022/08/new-config-system-part-2/). -Since version 16.8.0, Nx supports the usage of flat config in the [@nx/linter:eslint](/nx-api/linter/executors/eslint) executor and `@nx/*` generators, and provides an automated config conversion from `.eslintrc.json` config files. +Since version 16.8.0, Nx supports the usage of flat config in the [@nx/eslint:lint](/nx-api/linter/executors/eslint) executor and `@nx/*` generators, and provides an automated config conversion from `.eslintrc.json` config files. ## Converting workspace from .eslintrc.json to flat config diff --git a/docs/shared/reference/sitemap.md b/docs/shared/reference/sitemap.md index 95edbb72bc750..54d609abcb6d5 100644 --- a/docs/shared/reference/sitemap.md +++ b/docs/shared/reference/sitemap.md @@ -371,6 +371,13 @@ - [generators](/nx-api/esbuild/generators) - [init](/nx-api/esbuild/generators/init) - [configuration](/nx-api/esbuild/generators/configuration) + - [eslint](/nx-api/eslint) + - [executors](/nx-api/eslint/executors) + - [lint](/nx-api/eslint/executors/lint) + - [generators](/nx-api/eslint/generators) + - [workspace-rules-project](/nx-api/eslint/generators/workspace-rules-project) + - [workspace-rule](/nx-api/eslint/generators/workspace-rule) + - [convert-to-flat-config](/nx-api/eslint/generators/convert-to-flat-config) - [eslint-plugin](/nx-api/eslint-plugin) - [documents](/nx-api/eslint-plugin/documents) - [Overview](/nx-api/eslint-plugin/documents/overview) @@ -426,15 +433,6 @@ - [release-version](/nx-api/js/generators/release-version) - [setup-verdaccio](/nx-api/js/generators/setup-verdaccio) - [setup-build](/nx-api/js/generators/setup-build) - - [linter](/nx-api/linter) - - [documents](/nx-api/linter/documents) - - [Overview](/nx-api/linter/documents/overview) - - [executors](/nx-api/linter/executors) - - [eslint](/nx-api/linter/executors/eslint) - - [generators](/nx-api/linter/generators) - - [workspace-rules-project](/nx-api/linter/generators/workspace-rules-project) - - [workspace-rule](/nx-api/linter/generators/workspace-rule) - - [convert-to-flat-config](/nx-api/linter/generators/convert-to-flat-config) - [nest](/nx-api/nest) - [documents](/nx-api/nest/documents) - [Overview](/nx-api/nest/documents/overview) diff --git a/e2e/angular-core/src/config.test.ts b/e2e/angular-core/src/config.test.ts index 663bd42631fe0..b64a5fa307fda 100644 --- a/e2e/angular-core/src/config.test.ts +++ b/e2e/angular-core/src/config.test.ts @@ -120,7 +120,7 @@ const angularV1Json = (appName: string) => `{ } }, "lint": { - "builder": "@nx/linter:eslint", + "builder": "@nx/eslint:lint", "options": { "lintFilePatterns": [ "${appName}/src/**/*.ts", @@ -158,7 +158,7 @@ const angularV1Json = (appName: string) => `{ } }, "lint": { - "builder": "@nx/linter:eslint", + "builder": "@nx/eslint:lint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["${appName}-e2e/**/*.{js,ts}"] diff --git a/e2e/angular-core/src/ng-add.test.ts b/e2e/angular-core/src/ng-add.test.ts index cb6433b88ab33..33733d6ed2785 100644 --- a/e2e/angular-core/src/ng-add.test.ts +++ b/e2e/angular-core/src/ng-add.test.ts @@ -407,7 +407,7 @@ describe('convert Angular CLI workspace to an Nx workspace', () => { const projectConfig = readJson(`apps/${project}/project.json`); expect(projectConfig.targets.lint).toStrictEqual({ - executor: '@nx/linter:eslint', + executor: '@nx/eslint:lint', options: { lintFilePatterns: [ `apps/${project}/src/**/*.ts`, diff --git a/e2e/linter/jest.config.ts b/e2e/eslint/jest.config.ts similarity index 92% rename from e2e/linter/jest.config.ts rename to e2e/eslint/jest.config.ts index 95190f4488706..d04ab1546a328 100644 --- a/e2e/linter/jest.config.ts +++ b/e2e/eslint/jest.config.ts @@ -8,6 +8,6 @@ export default { globals: {}, globalSetup: '../utils/global-setup.ts', globalTeardown: '../utils/global-teardown.ts', - displayName: 'e2e-linter', + displayName: 'e2e-eslint', preset: '../../jest.preset.js', }; diff --git a/e2e/linter/project.json b/e2e/eslint/project.json similarity index 59% rename from e2e/linter/project.json rename to e2e/eslint/project.json index 7b61e586005dc..b9e741dac4215 100644 --- a/e2e/linter/project.json +++ b/e2e/eslint/project.json @@ -1,19 +1,19 @@ { - "name": "e2e-linter", + "name": "e2e-eslint", "$schema": "../../node_modules/nx/schemas/project-schema.json", - "sourceRoot": "e2e/linter", + "sourceRoot": "e2e/eslint", "projectType": "application", "targets": { "e2e": {}, "run-e2e-tests": { "executor": "@nx/jest:jest", "options": { - "jestConfig": "e2e/linter/jest.config.ts", + "jestConfig": "e2e/eslint/jest.config.ts", "passWithNoTests": true, "runInBand": true }, - "outputs": ["{workspaceRoot}/coverage/e2e/linter"] + "outputs": ["{workspaceRoot}/coverage/e2e/eslint"] } }, - "implicitDependencies": ["linter"] + "implicitDependencies": ["eslint"] } diff --git a/e2e/linter/src/linter.test.ts b/e2e/eslint/src/linter.test.ts similarity index 100% rename from e2e/linter/src/linter.test.ts rename to e2e/eslint/src/linter.test.ts diff --git a/e2e/linter/tsconfig.json b/e2e/eslint/tsconfig.json similarity index 100% rename from e2e/linter/tsconfig.json rename to e2e/eslint/tsconfig.json diff --git a/e2e/linter/tsconfig.spec.json b/e2e/eslint/tsconfig.spec.json similarity index 100% rename from e2e/linter/tsconfig.spec.json rename to e2e/eslint/tsconfig.spec.json diff --git a/nx-dev/nx-dev-e2e/src/packages.spec.ts b/nx-dev/nx-dev-e2e/src/packages.spec.ts index af89b984bdeb5..c678fa99c7917 100644 --- a/nx-dev/nx-dev-e2e/src/packages.spec.ts +++ b/nx-dev/nx-dev-e2e/src/packages.spec.ts @@ -169,16 +169,16 @@ const pages: Array<{ title: string; path: string }> = [ }, { title: '@nx/js:tsc', path: '/packages/js/executors/tsc' }, { title: '@nx/js:swc', path: '/packages/js/executors/swc' }, - { title: '@nx/linter', path: '/packages/linter' }, + { title: '@nx/eslint', path: '/packages/eslint' }, { - title: '@nx/linter:workspace-rules-project', + title: '@nx/eslint:workspace-rules-project', path: '/packages/linter/generators/workspace-rules-project', }, { - title: '@nx/linter', + title: '@nx/eslint', path: '/packages/linter/generators/workspace-rule', }, - { title: '@nx/linter', path: '/packages/linter/executors/eslint' }, + { title: '@nx/eslint', path: '/packages/linter/executors/eslint' }, { title: '@nx/nest', path: '/packages/nest' }, { title: '@nx/nest:application', diff --git a/packages-legacy/linter-nx/README.md b/packages-legacy/linter-nx/README.md new file mode 100644 index 0000000000000..9d5d0bd34d1c5 --- /dev/null +++ b/packages-legacy/linter-nx/README.md @@ -0,0 +1,13 @@ +## @nx/linter has been renamed to @nx/eslint! + +@nx/linter has been renamed to [@nx/eslint](https://www.npmjs.com/package/@nx/eslint). Please use that instead. + +[Read more here](https://nx.dev/recipes/other/rescope) + +@nx/linter will no longer be published in Nx v18. + +

Nx - Smart, Fast and Extensible Build System

+ +# Nx: Smart, Fast and Extensible Build System + +Nx is a next generation build system with first class monorepo support and powerful integrations. diff --git a/packages-legacy/linter-nx/executors.json b/packages-legacy/linter-nx/executors.json new file mode 100644 index 0000000000000..82ea0a29287b7 --- /dev/null +++ b/packages-legacy/linter-nx/executors.json @@ -0,0 +1,17 @@ +{ + "builders": { + "eslint": { + "implementation": "@nx/eslint/src/executors/lint/compat", + "schema": "@nx/eslint/src/executors/lint/schema.json", + "description": "Run ESLint on a project." + } + }, + "executors": { + "eslint": { + "implementation": "@nx/eslint/src/executors/lint/lint.impl", + "schema": "@nx/eslint/src/executors/lint/schema.json", + "hasher": "@nx/eslint/src/executors/lint/hasher", + "description": "Run ESLint on a project." + } + } +} diff --git a/packages-legacy/linter-nx/generators.json b/packages-legacy/linter-nx/generators.json new file mode 100644 index 0000000000000..0ff8e21d46272 --- /dev/null +++ b/packages-legacy/linter-nx/generators.json @@ -0,0 +1,4 @@ +{ + "extends": ["@nx/eslint"], + "schematics": {} +} diff --git a/packages-legacy/linter-nx/index.ts b/packages-legacy/linter-nx/index.ts new file mode 100644 index 0000000000000..e320f1b0c99aa --- /dev/null +++ b/packages-legacy/linter-nx/index.ts @@ -0,0 +1 @@ +export * from '@nx/eslint'; diff --git a/packages-legacy/linter-nx/package.json b/packages-legacy/linter-nx/package.json new file mode 100644 index 0000000000000..f902d3ea2a1fc --- /dev/null +++ b/packages-legacy/linter-nx/package.json @@ -0,0 +1,37 @@ +{ + "name": "@nx/linter", + "version": "0.0.1", + "private": false, + "description": "The Linter plugin for Nx contains executors, generators and utilities used for linting JavaScript/TypeScript projects within an Nx workspace.", + "repository": { + "type": "git", + "url": "https://github.com/nrwl/nx.git", + "directory": "packages-legacy/linter-nx" + }, + "keywords": [ + "Monorepo", + "Web", + "Lint", + "ESLint", + "CLI" + ], + "main": "./index", + "typings": "./index.d.ts", + "author": "Victor Savkin", + "license": "MIT", + "bugs": { + "url": "https://github.com/nrwl/nx/issues" + }, + "homepage": "https://nx.dev", + "builders": "./executors.json", + "schematics": "./generators.json", + "dependencies": { + "@nx/eslint": "file:../../packages/eslint" + }, + "publishConfig": { + "access": "public" + }, + "nx-migrations": { + "migrations": "@nx/eslint/migrations.json" + } +} diff --git a/packages-legacy/linter-nx/project.json b/packages-legacy/linter-nx/project.json new file mode 100644 index 0000000000000..4c6533fa9717d --- /dev/null +++ b/packages-legacy/linter-nx/project.json @@ -0,0 +1,38 @@ +{ + "name": "linter-nx-legacy", + "$schema": "../../node_modules/nx/schemas/project-schema.json", + "sourceRoot": "packages-legacy/linter-nx", + "projectType": "library", + "targets": { + "build": { + "command": "node ./scripts/copy-readme.js linter-nx-legacy" + }, + "build-base": { + "executor": "@nx/js:tsc", + "dependsOn": ["^build-base"], + "options": { + "main": "packages-legacy/linter-nx/index.ts", + "tsConfig": "packages-legacy/linter-nx/tsconfig.json", + "outputPath": "build/packages/linter-nx-legacy", + "assets": [ + { + "input": "packages-legacy/linter-nx", + "glob": "**/*.json", + "ignore": ["**/tsconfig*.json", "project.json"], + "output": "/" + }, + { + "input": "packages-legacy/linter-nx", + "glob": "**/*.d.ts", + "output": "/" + }, + { + "input": "", + "glob": "LICENSE", + "output": "/" + } + ] + } + } + } +} diff --git a/packages-legacy/linter-nx/tsconfig.json b/packages-legacy/linter-nx/tsconfig.json new file mode 100644 index 0000000000000..133314b126cff --- /dev/null +++ b/packages-legacy/linter-nx/tsconfig.json @@ -0,0 +1,6 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": {}, + "include": ["**/*.ts"], + "files": ["index.ts"] +} diff --git a/packages-legacy/linter/executors.json b/packages-legacy/linter/executors.json index ba70860fa5761..82ea0a29287b7 100644 --- a/packages-legacy/linter/executors.json +++ b/packages-legacy/linter/executors.json @@ -1,16 +1,16 @@ { "builders": { "eslint": { - "implementation": "@nx/linter/src/executors/eslint/compat", - "schema": "@nx/linter/src/executors/eslint/schema.json", + "implementation": "@nx/eslint/src/executors/lint/compat", + "schema": "@nx/eslint/src/executors/lint/schema.json", "description": "Run ESLint on a project." } }, "executors": { "eslint": { - "implementation": "@nx/linter/src/executors/eslint/lint.impl", - "schema": "@nx/linter/src/executors/eslint/schema.json", - "hasher": "@nx/linter/src/executors/eslint/hasher", + "implementation": "@nx/eslint/src/executors/lint/lint.impl", + "schema": "@nx/eslint/src/executors/lint/schema.json", + "hasher": "@nx/eslint/src/executors/lint/hasher", "description": "Run ESLint on a project." } } diff --git a/packages-legacy/linter/generators.json b/packages-legacy/linter/generators.json index 331f10e4586c6..0ff8e21d46272 100644 --- a/packages-legacy/linter/generators.json +++ b/packages-legacy/linter/generators.json @@ -1,4 +1,4 @@ { - "extends": ["@nx/linter"], + "extends": ["@nx/eslint"], "schematics": {} } diff --git a/packages-legacy/linter/index.ts b/packages-legacy/linter/index.ts index ef67cd24cb9b4..e320f1b0c99aa 100644 --- a/packages-legacy/linter/index.ts +++ b/packages-legacy/linter/index.ts @@ -1 +1 @@ -export * from '@nx/linter'; +export * from '@nx/eslint'; diff --git a/packages-legacy/linter/package.json b/packages-legacy/linter/package.json index c920961a36145..ef0ca3de89597 100644 --- a/packages-legacy/linter/package.json +++ b/packages-legacy/linter/package.json @@ -26,12 +26,12 @@ "builders": "./executors.json", "schematics": "./generators.json", "dependencies": { - "@nx/linter": "file:../../packages/linter" + "@nx/eslint": "file:../../packages/eslint" }, "publishConfig": { "access": "public" }, "nx-migrations": { - "migrations": "@nx/linter/migrations.json" + "migrations": "@nx/eslint/migrations.json" } } diff --git a/packages-legacy/nest/project.json b/packages-legacy/nest/project.json index b961e9a140b59..d6891825bb9ce 100644 --- a/packages-legacy/nest/project.json +++ b/packages-legacy/nest/project.json @@ -35,5 +35,5 @@ } } }, - "implicitDependencies": ["node", "linter"] + "implicitDependencies": ["node", "eslint"] } diff --git a/packages/angular/package.json b/packages/angular/package.json index e2f0af305d566..0d11748b7f895 100644 --- a/packages/angular/package.json +++ b/packages/angular/package.json @@ -62,7 +62,7 @@ "@nx/cypress": "file:../cypress", "@nx/jest": "file:../jest", "@nx/js": "file:../js", - "@nx/linter": "file:../linter", + "@nx/eslint": "file:../eslint", "@nx/webpack": "file:../webpack", "@nx/workspace": "file:../workspace" }, diff --git a/packages/angular/src/generators/add-linting/add-linting.spec.ts b/packages/angular/src/generators/add-linting/add-linting.spec.ts index b23fa88464c68..f298773d34dad 100644 --- a/packages/angular/src/generators/add-linting/add-linting.spec.ts +++ b/packages/angular/src/generators/add-linting/add-linting.spec.ts @@ -6,7 +6,7 @@ import { updateJson, } from '@nx/devkit'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; -import * as linter from '@nx/linter'; +import * as linter from '@nx/eslint'; import { addLintingGenerator } from './add-linting'; describe('addLinting generator', () => { @@ -72,7 +72,7 @@ describe('addLinting generator', () => { const project = readProjectConfiguration(tree, appProjectName); expect(project.targets.lint).toEqual({ - executor: '@nx/linter:eslint', + executor: '@nx/eslint:lint', options: { lintFilePatterns: [ `${appProjectRoot}/**/*.ts`, @@ -150,7 +150,7 @@ describe('addLinting generator', () => { const project = readProjectConfiguration(tree, appProjectName); expect(project.targets.lint).toEqual({ - executor: '@nx/linter:eslint', + executor: '@nx/eslint:lint', options: { lintFilePatterns: [ `${appProjectRoot}/**/*.ts`, diff --git a/packages/angular/src/generators/add-linting/add-linting.ts b/packages/angular/src/generators/add-linting/add-linting.ts index 1500a0007b94c..fc531abe75933 100755 --- a/packages/angular/src/generators/add-linting/add-linting.ts +++ b/packages/angular/src/generators/add-linting/add-linting.ts @@ -6,15 +6,15 @@ import { runTasksInSerial, Tree, } from '@nx/devkit'; -import { Linter, lintProjectGenerator } from '@nx/linter'; -import { mapLintPattern } from '@nx/linter/src/generators/lint-project/lint-project'; +import { Linter, lintProjectGenerator } from '@nx/eslint'; +import { mapLintPattern } from '@nx/eslint/src/generators/lint-project/lint-project'; import { addAngularEsLintDependencies } from './lib/add-angular-eslint-dependencies'; import type { AddLintingGeneratorSchema } from './schema'; import { findEslintFile, isEslintConfigSupported, replaceOverridesInLintConfig, -} from '@nx/linter/src/generators/utils/eslint-file'; +} from '@nx/eslint/src/generators/utils/eslint-file'; import { camelize, dasherize } from '@nx/devkit/src/utils/string-utils'; export async function addLintingGenerator( diff --git a/packages/angular/src/generators/application/application.spec.ts b/packages/angular/src/generators/application/application.spec.ts index 299f297ef7fb3..cd2dd979c5502 100644 --- a/packages/angular/src/generators/application/application.spec.ts +++ b/packages/angular/src/generators/application/application.spec.ts @@ -11,7 +11,7 @@ import { updateJson, } from '@nx/devkit'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import * as enquirer from 'enquirer'; import { E2eTestRunner, UnitTestRunner } from '../../utils/test-runners'; import { @@ -471,7 +471,7 @@ describe('app', () => { expect(readProjectConfiguration(appTree, 'my-app').targets.lint) .toMatchInlineSnapshot(` { - "executor": "@nx/linter:eslint", + "executor": "@nx/eslint:lint", "options": { "lintFilePatterns": [ "my-app/**/*.ts", @@ -486,7 +486,7 @@ describe('app', () => { expect(readProjectConfiguration(appTree, 'my-app-e2e').targets.lint) .toMatchInlineSnapshot(` { - "executor": "@nx/linter:eslint", + "executor": "@nx/eslint:lint", "options": { "lintFilePatterns": [ "my-app-e2e/**/*.{js,ts}", diff --git a/packages/angular/src/generators/application/lib/add-linting.ts b/packages/angular/src/generators/application/lib/add-linting.ts index f1ff025624e86..8f6983f0aae1f 100644 --- a/packages/angular/src/generators/application/lib/add-linting.ts +++ b/packages/angular/src/generators/application/lib/add-linting.ts @@ -1,7 +1,7 @@ import type { Tree } from '@nx/devkit'; import type { NormalizedSchema } from './normalized-schema'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import addLintingGenerator from '../../add-linting/add-linting'; export async function addLinting(host: Tree, options: NormalizedSchema) { diff --git a/packages/angular/src/generators/application/lib/normalize-options.ts b/packages/angular/src/generators/application/lib/normalize-options.ts index 04b9b9eeddaab..d3e481b744a84 100644 --- a/packages/angular/src/generators/application/lib/normalize-options.ts +++ b/packages/angular/src/generators/application/lib/normalize-options.ts @@ -1,7 +1,7 @@ import { Tree } from '@nx/devkit'; import { determineProjectNameAndRootOptions } from '@nx/devkit/src/generators/project-name-and-root-utils'; import { getNpmScope } from '@nx/js/src/utils/package-json/get-npm-scope'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import { E2eTestRunner, UnitTestRunner } from '../../../utils/test-runners'; import { normalizeNewProjectPrefix } from '../../utils/project'; import type { Schema } from '../schema'; diff --git a/packages/angular/src/generators/application/lib/normalized-schema.ts b/packages/angular/src/generators/application/lib/normalized-schema.ts index 5eb30bdb724e3..dbfd8f83fa740 100644 --- a/packages/angular/src/generators/application/lib/normalized-schema.ts +++ b/packages/angular/src/generators/application/lib/normalized-schema.ts @@ -1,6 +1,6 @@ import { E2eTestRunner, UnitTestRunner } from '../../../utils/test-runners'; import type { Schema } from '../schema'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; export interface NormalizedSchema extends Schema { linter: Linter; diff --git a/packages/angular/src/generators/application/schema.d.ts b/packages/angular/src/generators/application/schema.d.ts index c13a0ec15825a..cdb84fd5f505a 100644 --- a/packages/angular/src/generators/application/schema.d.ts +++ b/packages/angular/src/generators/application/schema.d.ts @@ -1,5 +1,5 @@ import type { ProjectNameAndRootFormat } from '@nx/devkit/src/generators/project-name-and-root-utils'; -import type { Linter } from '@nx/linter'; +import type { Linter } from '@nx/eslint'; import type { E2eTestRunner, UnitTestRunner } from '../../utils/test-runners'; import type { Styles } from '../utils/types'; diff --git a/packages/angular/src/generators/component-test/component-test.spec.ts b/packages/angular/src/generators/component-test/component-test.spec.ts index cfaf435717298..08e6998a9bb21 100644 --- a/packages/angular/src/generators/component-test/component-test.spec.ts +++ b/packages/angular/src/generators/component-test/component-test.spec.ts @@ -1,7 +1,7 @@ import { assertMinimumCypressVersion } from '@nx/cypress/src/utils/cypress-version'; import { Tree } from '@nx/devkit'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import { UnitTestRunner } from '../../utils/test-runners'; import { componentGenerator } from '../component/component'; import { generateTestLibrary } from '../utils/testing'; @@ -73,7 +73,7 @@ export class MyLibComponent implements OnInit { @Input() message: string | undefined; @Input() anotherProp: any; @Input() anotherNeverProp: never; - + constructor() { } ngOnInit(): void { @@ -186,11 +186,11 @@ describe(MyLibComponent.name, () => { beforeEach(() => { TestBed.overrideComponent(MyLibComponent, { - add: { + add: { imports: [], providers: [] } - }) + }) }) it('renders', () => { diff --git a/packages/angular/src/generators/host/schema.d.ts b/packages/angular/src/generators/host/schema.d.ts index 4e77dceaabcf4..ed2193a5e2549 100644 --- a/packages/angular/src/generators/host/schema.d.ts +++ b/packages/angular/src/generators/host/schema.d.ts @@ -1,5 +1,5 @@ import type { ProjectNameAndRootFormat } from '@nx/devkit/src/generators/project-name-and-root-utils'; -import type { Linter } from '@nx/linter'; +import type { Linter } from '@nx/eslint'; import type { E2eTestRunner, UnitTestRunner } from '../../utils/test-runners'; import type { Styles } from '../utils/types'; diff --git a/packages/angular/src/generators/init/init.spec.ts b/packages/angular/src/generators/init/init.spec.ts index dfc3ea4a2a90e..47babcef7a8a4 100644 --- a/packages/angular/src/generators/init/init.spec.ts +++ b/packages/angular/src/generators/init/init.spec.ts @@ -17,7 +17,7 @@ import { updateNxJson, } from '@nx/devkit'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import { backwardCompatibleVersions } from '../../utils/backward-compatible-versions'; import { E2eTestRunner, UnitTestRunner } from '../../utils/test-runners'; import { angularDevkitVersion, angularVersion } from '../../utils/versions'; diff --git a/packages/angular/src/generators/init/init.ts b/packages/angular/src/generators/init/init.ts index 100847d840ffe..d8a34f1e9bd75 100755 --- a/packages/angular/src/generators/init/init.ts +++ b/packages/angular/src/generators/init/init.ts @@ -10,7 +10,7 @@ import { updateNxJson, } from '@nx/devkit'; import { jestInitGenerator } from '@nx/jest'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import { initGenerator as jsInitGenerator } from '@nx/js'; import { E2eTestRunner, UnitTestRunner } from '../../utils/test-runners'; import { diff --git a/packages/angular/src/generators/init/schema.d.ts b/packages/angular/src/generators/init/schema.d.ts index 3c0cacfbb1cd7..1530d8691d70e 100644 --- a/packages/angular/src/generators/init/schema.d.ts +++ b/packages/angular/src/generators/init/schema.d.ts @@ -1,4 +1,4 @@ -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import { E2eTestRunner, UnitTestRunner } from '../../utils/test-runners'; import type { Styles } from '../utils/types'; diff --git a/packages/angular/src/generators/library/lib/normalize-options.ts b/packages/angular/src/generators/library/lib/normalize-options.ts index 9fb8c6fa82171..583438f99afec 100644 --- a/packages/angular/src/generators/library/lib/normalize-options.ts +++ b/packages/angular/src/generators/library/lib/normalize-options.ts @@ -1,7 +1,7 @@ import { names, Tree } from '@nx/devkit'; import { determineProjectNameAndRootOptions } from '@nx/devkit/src/generators/project-name-and-root-utils'; import { getNpmScope } from '@nx/js/src/utils/package-json/get-npm-scope'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import { UnitTestRunner } from '../../../utils/test-runners'; import { normalizeNewProjectPrefix } from '../../utils/project'; import { Schema } from '../schema'; diff --git a/packages/angular/src/generators/library/lib/normalized-schema.ts b/packages/angular/src/generators/library/lib/normalized-schema.ts index 920652d5ce2c5..5524bc66ae996 100644 --- a/packages/angular/src/generators/library/lib/normalized-schema.ts +++ b/packages/angular/src/generators/library/lib/normalized-schema.ts @@ -1,5 +1,5 @@ import { UnitTestRunner } from '../../../utils/test-runners'; -import type { Linter } from '@nx/linter'; +import type { Linter } from '@nx/eslint'; export interface NormalizedSchema { libraryOptions: { diff --git a/packages/angular/src/generators/library/library.spec.ts b/packages/angular/src/generators/library/library.spec.ts index aa17cb797cada..7670aaf6b9d5d 100644 --- a/packages/angular/src/generators/library/library.spec.ts +++ b/packages/angular/src/generators/library/library.spec.ts @@ -9,7 +9,7 @@ import { updateJson, } from '@nx/devkit'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import { backwardCompatibleVersions } from '../../utils/backward-compatible-versions'; import { createApp } from '../../utils/nx-devkit/testing'; import { UnitTestRunner } from '../../utils/test-runners'; @@ -1128,7 +1128,7 @@ describe('lib', () => { expect(readProjectConfiguration(tree, 'my-lib').targets['lint']) .toMatchInlineSnapshot(` { - "executor": "@nx/linter:eslint", + "executor": "@nx/eslint:lint", "options": { "lintFilePatterns": [ "my-lib/**/*.ts", diff --git a/packages/angular/src/generators/library/library.ts b/packages/angular/src/generators/library/library.ts index 7a70d7a56232b..3d96504c33cde 100644 --- a/packages/angular/src/generators/library/library.ts +++ b/packages/angular/src/generators/library/library.ts @@ -6,7 +6,7 @@ import { Tree, } from '@nx/devkit'; import { configurationGenerator } from '@nx/jest'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import { addTsConfigPath } from '@nx/js'; import { lt } from 'semver'; import init from '../../generators/init/init'; diff --git a/packages/angular/src/generators/library/schema.d.ts b/packages/angular/src/generators/library/schema.d.ts index a5398670d6b30..242fd8e48ef57 100644 --- a/packages/angular/src/generators/library/schema.d.ts +++ b/packages/angular/src/generators/library/schema.d.ts @@ -1,5 +1,5 @@ import type { ProjectNameAndRootFormat } from '@nx/devkit/src/generators/project-name-and-root-utils'; -import type { Linter } from '@nx/linter'; +import type { Linter } from '@nx/eslint'; import type { UnitTestRunner } from '../../utils/test-runners'; export interface Schema { diff --git a/packages/angular/src/generators/move/move.spec.ts b/packages/angular/src/generators/move/move.spec.ts index 1212117148239..ec73ac120e4fb 100644 --- a/packages/angular/src/generators/move/move.spec.ts +++ b/packages/angular/src/generators/move/move.spec.ts @@ -1,7 +1,7 @@ import * as devkit from '@nx/devkit'; import { ProjectGraph, readJson, Tree } from '@nx/devkit'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import { UnitTestRunner } from '../../utils/test-runners'; import { librarySecondaryEntryPointGenerator } from '../library-secondary-entry-point/library-secondary-entry-point'; import { generateTestLibrary } from '../utils/testing'; diff --git a/packages/angular/src/generators/ng-add/migrators/builders/angular-eslint-lint.migrator.ts b/packages/angular/src/generators/ng-add/migrators/builders/angular-eslint-lint.migrator.ts index eabbd9808c5d9..92672d179ff60 100644 --- a/packages/angular/src/generators/ng-add/migrators/builders/angular-eslint-lint.migrator.ts +++ b/packages/angular/src/generators/ng-add/migrators/builders/angular-eslint-lint.migrator.ts @@ -10,7 +10,7 @@ import { updateJson, updateProjectConfiguration, } from '@nx/devkit'; -import { hasRulesRequiringTypeChecking } from '@nx/linter'; +import { hasRulesRequiringTypeChecking } from '@nx/eslint'; import { dirname } from 'path'; import type { Logger, ProjectMigrationInfo } from '../../utilities'; import { BuilderMigrator } from './builder.migrator'; @@ -69,7 +69,7 @@ export class AngularEslintLintMigrator extends BuilderMigrator { targetName: string, target: TargetConfiguration ): Promise { - target.executor = '@nx/linter:eslint'; + target.executor = '@nx/eslint:lint'; if (!target.options) { this.logger.warn( diff --git a/packages/angular/src/generators/ng-add/migrators/projects/app.migrator.spec.ts b/packages/angular/src/generators/ng-add/migrators/projects/app.migrator.spec.ts index 92970b3b3fda4..93c0d0deedc41 100644 --- a/packages/angular/src/generators/ng-add/migrators/projects/app.migrator.spec.ts +++ b/packages/angular/src/generators/ng-add/migrators/projects/app.migrator.spec.ts @@ -877,7 +877,7 @@ describe('app migrator', () => { const { targets } = readProjectConfiguration(tree, 'app1'); expect(targets.lint).toStrictEqual({ - executor: '@nx/linter:eslint', + executor: '@nx/eslint:lint', options: { lintFilePatterns: ['apps/app1/**/*.ts', 'apps/app1/**/*.html'], }, @@ -903,7 +903,7 @@ describe('app migrator', () => { const { targets } = readProjectConfiguration(tree, 'app1'); expect(targets.myCustomLintTarget).toStrictEqual({ - executor: '@nx/linter:eslint', + executor: '@nx/eslint:lint', options: { lintFilePatterns: ['apps/app1/**/*.ts', 'apps/app1/**/*.html'], }, @@ -930,7 +930,7 @@ describe('app migrator', () => { const { targets } = readProjectConfiguration(tree, 'app1'); expect(targets.lint).toStrictEqual({ - executor: '@nx/linter:eslint', + executor: '@nx/eslint:lint', options: { eslintConfig: 'apps/app1/.eslintrc.json', lintFilePatterns: ['apps/app1/**/*.ts', 'apps/app1/**/*.html'], @@ -969,7 +969,7 @@ describe('app migrator', () => { const { targets } = readProjectConfiguration(tree, 'app1'); expect(targets.lint).toStrictEqual({ - executor: '@nx/linter:eslint', + executor: '@nx/eslint:lint', options: { eslintConfig: 'apps/app1/.eslintrc.json', hasTypeAwareRules: true, diff --git a/packages/angular/src/generators/ng-add/migrators/projects/e2e.migrator.ts b/packages/angular/src/generators/ng-add/migrators/projects/e2e.migrator.ts index 4f39e9bdedd0e..c180bb46dab47 100644 --- a/packages/angular/src/generators/ng-add/migrators/projects/e2e.migrator.ts +++ b/packages/angular/src/generators/ng-add/migrators/projects/e2e.migrator.ts @@ -20,7 +20,7 @@ import { visitNotIgnoredFiles, writeJson, } from '@nx/devkit'; -import { Linter, lintProjectGenerator } from '@nx/linter'; +import { Linter, lintProjectGenerator } from '@nx/eslint'; import { getRootTsConfigPathInTree, insertImport } from '@nx/js'; import { basename, relative } from 'path'; import type { diff --git a/packages/angular/src/generators/ng-add/migrators/projects/lib.migrator.spec.ts b/packages/angular/src/generators/ng-add/migrators/projects/lib.migrator.spec.ts index ad221f9b80625..302520deb51ad 100644 --- a/packages/angular/src/generators/ng-add/migrators/projects/lib.migrator.spec.ts +++ b/packages/angular/src/generators/ng-add/migrators/projects/lib.migrator.spec.ts @@ -710,7 +710,7 @@ describe('lib migrator', () => { const { targets } = readProjectConfiguration(tree, 'lib1'); expect(targets.lint).toStrictEqual({ - executor: '@nx/linter:eslint', + executor: '@nx/eslint:lint', options: { lintFilePatterns: ['libs/lib1/**/*.ts', 'libs/lib1/**/*.html'], }, @@ -739,7 +739,7 @@ describe('lib migrator', () => { const { targets } = readProjectConfiguration(tree, 'lib1'); expect(targets.myCustomLintTarget).toStrictEqual({ - executor: '@nx/linter:eslint', + executor: '@nx/eslint:lint', options: { lintFilePatterns: ['libs/lib1/**/*.ts', 'libs/lib1/**/*.html'], }, @@ -769,7 +769,7 @@ describe('lib migrator', () => { const { targets } = readProjectConfiguration(tree, 'lib1'); expect(targets.lint).toStrictEqual({ - executor: '@nx/linter:eslint', + executor: '@nx/eslint:lint', options: { eslintConfig: 'libs/lib1/.eslintrc.json', lintFilePatterns: ['libs/lib1/**/*.ts', 'libs/lib1/**/*.html'], @@ -811,7 +811,7 @@ describe('lib migrator', () => { const { targets } = readProjectConfiguration(tree, 'lib1'); expect(targets.lint).toStrictEqual({ - executor: '@nx/linter:eslint', + executor: '@nx/eslint:lint', options: { eslintConfig: 'libs/lib1/.eslintrc.json', hasTypeAwareRules: true, diff --git a/packages/angular/src/generators/ng-add/schema.d.ts b/packages/angular/src/generators/ng-add/schema.d.ts index 457bc2c0d1019..c8b70ab4f93bb 100644 --- a/packages/angular/src/generators/ng-add/schema.d.ts +++ b/packages/angular/src/generators/ng-add/schema.d.ts @@ -1,4 +1,4 @@ -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import { E2eTestRunner, UnitTestRunner } from '../../utils/test-runners'; import type { Styles } from '../utils/types'; diff --git a/packages/angular/src/generators/ng-add/utilities/workspace.ts b/packages/angular/src/generators/ng-add/utilities/workspace.ts index 94a7603befb04..1248088cf799f 100644 --- a/packages/angular/src/generators/ng-add/utilities/workspace.ts +++ b/packages/angular/src/generators/ng-add/utilities/workspace.ts @@ -9,7 +9,7 @@ import { updateNxJson, writeJson, } from '@nx/devkit'; -import { Linter, lintInitGenerator } from '@nx/linter'; +import { Linter, lintInitGenerator } from '@nx/eslint'; import { getRootTsConfigPathInTree, initGenerator as jsInitGenerator, diff --git a/packages/angular/src/generators/remote/schema.d.ts b/packages/angular/src/generators/remote/schema.d.ts index a1fe31e6f2f94..9f294fd2c75bd 100644 --- a/packages/angular/src/generators/remote/schema.d.ts +++ b/packages/angular/src/generators/remote/schema.d.ts @@ -1,5 +1,5 @@ import type { ProjectNameAndRootFormat } from '@nx/devkit/src/generators/project-name-and-root-utils'; -import type { Linter } from '@nx/linter'; +import type { Linter } from '@nx/eslint'; import type { E2eTestRunner, UnitTestRunner } from '../../utils/test-runners'; import type { Styles } from '../utils/types'; diff --git a/packages/angular/src/generators/storybook-configuration/schema.d.ts b/packages/angular/src/generators/storybook-configuration/schema.d.ts index 517f376627a05..e474621e9a819 100644 --- a/packages/angular/src/generators/storybook-configuration/schema.d.ts +++ b/packages/angular/src/generators/storybook-configuration/schema.d.ts @@ -1,4 +1,4 @@ -import type { Linter } from '@nx/linter'; +import type { Linter } from '@nx/eslint'; export interface StorybookConfigurationOptions { configureStaticServe?: boolean; diff --git a/packages/angular/src/generators/utils/testing.ts b/packages/angular/src/generators/utils/testing.ts index a7574681990cc..45cae6efd45da 100644 --- a/packages/angular/src/generators/utils/testing.ts +++ b/packages/angular/src/generators/utils/testing.ts @@ -1,7 +1,7 @@ import type { Tree } from '@nx/devkit'; import { names, readProjectConfiguration, updateJson } from '@nx/devkit'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import { UnitTestRunner } from '../../utils/test-runners'; import { angularDevkitVersion } from '../../utils/versions'; import { applicationGenerator } from '../application/application'; @@ -216,9 +216,9 @@ import { VariableSpreadDeclareButtonComponent } from './variable-spread-declare- import { VariableSpreadDeclareViewComponent } from './variable-spread-declare-view/variable-spread-declare-view.component'; import { VariableSpreadDeclareAnotherviewComponent } from './variable-spread-declare-anotherview/variable-spread-declare-anotherview.component'; -const COMPONENTS = [ - VariableSpreadDeclareButtonComponent, - VariableSpreadDeclareViewComponent +const COMPONENTS = [ + VariableSpreadDeclareButtonComponent, + VariableSpreadDeclareViewComponent ] @NgModule({ @@ -319,7 +319,7 @@ function generateModule( moduleFilePath, `import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; - + @NgModule({ declarations: [], imports: [CommonModule], diff --git a/packages/cypress/package.json b/packages/cypress/package.json index 82310de6cc385..ab61b22396e79 100644 --- a/packages/cypress/package.json +++ b/packages/cypress/package.json @@ -40,7 +40,7 @@ "tslib": "^2.3.0", "@nx/devkit": "file:../devkit", "@nx/js": "file:../js", - "@nx/linter": "file:../linter" + "@nx/eslint": "file:../eslint" }, "peerDependencies": { "cypress": ">= 3 < 14" diff --git a/packages/cypress/src/generators/configuration/configuration.ts b/packages/cypress/src/generators/configuration/configuration.ts index 7973c4c922647..9c226839b86d5 100644 --- a/packages/cypress/src/generators/configuration/configuration.ts +++ b/packages/cypress/src/generators/configuration/configuration.ts @@ -14,7 +14,7 @@ import { updateProjectConfiguration, } from '@nx/devkit'; import { getRelativePathToRootTsConfig } from '@nx/js'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import { join } from 'path'; import { addLinterToCyProject } from '../../utils/add-linter'; import { addDefaultE2EConfig } from '../../utils/config'; diff --git a/packages/cypress/src/generators/cypress-project/cypress-project.spec.ts b/packages/cypress/src/generators/cypress-project/cypress-project.spec.ts index 590939d292ee3..52e24948b9dd2 100644 --- a/packages/cypress/src/generators/cypress-project/cypress-project.spec.ts +++ b/packages/cypress/src/generators/cypress-project/cypress-project.spec.ts @@ -8,7 +8,7 @@ import { import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; import { cypressProjectGenerator } from './cypress-project'; import { Schema } from './schema'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import { installedCypressVersion } from '../../utils/cypress-version'; import { cypressInitGenerator } from '../init/init'; diff --git a/packages/cypress/src/generators/cypress-project/cypress-project.ts b/packages/cypress/src/generators/cypress-project/cypress-project.ts index 7fd389de55943..c5a54bdc9ce53 100644 --- a/packages/cypress/src/generators/cypress-project/cypress-project.ts +++ b/packages/cypress/src/generators/cypress-project/cypress-project.ts @@ -19,7 +19,7 @@ import { import { determineProjectNameAndRootOptions } from '@nx/devkit/src/generators/project-name-and-root-utils'; import { checkAndCleanWithSemver } from '@nx/devkit/src/utils/semver'; import { getRelativePathToRootTsConfig } from '@nx/js'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import { join } from 'path'; import { major } from 'semver'; import { addLinterToCyProject } from '../../utils/add-linter'; diff --git a/packages/cypress/src/generators/cypress-project/schema.d.ts b/packages/cypress/src/generators/cypress-project/schema.d.ts index 8d480818e407b..6abafe7f11c3e 100644 --- a/packages/cypress/src/generators/cypress-project/schema.d.ts +++ b/packages/cypress/src/generators/cypress-project/schema.d.ts @@ -1,5 +1,5 @@ import type { ProjectNameAndRootFormat } from '@nx/devkit/src/generators/project-name-and-root-utils'; -import type { Linter } from '@nx/linter'; +import type { Linter } from '@nx/eslint'; export interface Schema { project?: string; diff --git a/packages/cypress/src/utils/add-linter.ts b/packages/cypress/src/utils/add-linter.ts index 7f333f7b5c96d..add4b4d513a3b 100644 --- a/packages/cypress/src/utils/add-linter.ts +++ b/packages/cypress/src/utils/add-linter.ts @@ -6,7 +6,7 @@ import { runTasksInSerial, Tree, } from '@nx/devkit'; -import { Linter, lintProjectGenerator } from '@nx/linter'; +import { Linter, lintProjectGenerator } from '@nx/eslint'; import { installedCypressVersion } from './cypress-version'; import { eslintPluginCypressVersion } from './versions'; import { @@ -16,8 +16,8 @@ import { findEslintFile, isEslintConfigSupported, replaceOverridesInLintConfig, -} from '@nx/linter/src/generators/utils/eslint-file'; -import { javaScriptOverride } from '@nx/linter/src/generators/init/global-eslint-config'; +} from '@nx/eslint/src/generators/utils/eslint-file'; +import { javaScriptOverride } from '@nx/eslint/src/generators/init/global-eslint-config'; export interface CyLinterOptions { project: string; diff --git a/packages/detox/package.json b/packages/detox/package.json index fcc63ca1dc80b..6e9cb27b973bb 100644 --- a/packages/detox/package.json +++ b/packages/detox/package.json @@ -28,7 +28,7 @@ "@nx/devkit": "file:../devkit", "@nx/jest": "file:../jest", "@nx/js": "file:../js", - "@nx/linter": "file:../linter", + "@nx/eslint": "file:../eslint", "@nx/react": "file:../react", "tslib": "^2.3.0" }, diff --git a/packages/detox/src/generators/application/lib/add-linting.spec.ts b/packages/detox/src/generators/application/lib/add-linting.spec.ts index c2658f764c098..80653dd5d6279 100644 --- a/packages/detox/src/generators/application/lib/add-linting.spec.ts +++ b/packages/detox/src/generators/application/lib/add-linting.spec.ts @@ -1,6 +1,6 @@ import { readProjectConfiguration, Tree } from '@nx/devkit'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import { addLinting } from './add-linting'; import { addProject } from './add-project'; @@ -41,7 +41,7 @@ describe('Add Linting', () => { const project = readProjectConfiguration(tree, 'my-app-e2e'); expect(project.targets.lint).toBeDefined(); - expect(project.targets.lint.executor).toEqual('@nx/linter:eslint'); + expect(project.targets.lint.executor).toEqual('@nx/eslint:lint'); }); it('should not add lint target when "none" is passed', async () => { diff --git a/packages/detox/src/generators/application/lib/add-linting.ts b/packages/detox/src/generators/application/lib/add-linting.ts index 180ecc0d7f124..2f4235741403c 100644 --- a/packages/detox/src/generators/application/lib/add-linting.ts +++ b/packages/detox/src/generators/application/lib/add-linting.ts @@ -1,4 +1,4 @@ -import { Linter, lintProjectGenerator } from '@nx/linter'; +import { Linter, lintProjectGenerator } from '@nx/eslint'; import { addDependenciesToPackageJson, joinPathFragments, @@ -10,7 +10,7 @@ import { NormalizedSchema } from './normalize-options'; import { addExtendsToLintConfig, isEslintConfigSupported, -} from '@nx/linter/src/generators/utils/eslint-file'; +} from '@nx/eslint/src/generators/utils/eslint-file'; export async function addLinting(host: Tree, options: NormalizedSchema) { if (options.linter === Linter.None) { diff --git a/packages/detox/src/generators/application/lib/add-project.spec.ts b/packages/detox/src/generators/application/lib/add-project.spec.ts index 17032dfb560ed..989e0c763aafd 100644 --- a/packages/detox/src/generators/application/lib/add-project.spec.ts +++ b/packages/detox/src/generators/application/lib/add-project.spec.ts @@ -4,7 +4,7 @@ import { Tree, } from '@nx/devkit'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import { addProject } from './add-project'; describe('Add Project', () => { diff --git a/packages/detox/src/generators/application/lib/create-files.spec.ts b/packages/detox/src/generators/application/lib/create-files.spec.ts index d6b13ae193fd2..603a02f6f4fdc 100644 --- a/packages/detox/src/generators/application/lib/create-files.spec.ts +++ b/packages/detox/src/generators/application/lib/create-files.spec.ts @@ -1,6 +1,6 @@ import { Tree } from '@nx/devkit'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import { createFiles } from './create-files'; describe('Create Files', () => { diff --git a/packages/detox/src/generators/application/lib/normalize-options.spec.ts b/packages/detox/src/generators/application/lib/normalize-options.spec.ts index 55a95f0c15adc..50f8d36fa57f2 100644 --- a/packages/detox/src/generators/application/lib/normalize-options.spec.ts +++ b/packages/detox/src/generators/application/lib/normalize-options.spec.ts @@ -1,6 +1,6 @@ import { addProjectConfiguration, Tree } from '@nx/devkit'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import { Schema } from '../schema'; import { normalizeOptions } from './normalize-options'; diff --git a/packages/detox/src/generators/application/schema.d.ts b/packages/detox/src/generators/application/schema.d.ts index 2fa7b27118db4..81bddc9df49b6 100644 --- a/packages/detox/src/generators/application/schema.d.ts +++ b/packages/detox/src/generators/application/schema.d.ts @@ -1,5 +1,5 @@ import type { ProjectNameAndRootFormat } from '@nx/devkit/src/generators/project-name-and-root-utils'; -import type { Linter } from '@nx/linter'; +import type { Linter } from '@nx/eslint'; export interface Schema { appProject: string; // name of the project app to be tested (directory + app name in kebab class) diff --git a/packages/linter/.eslintrc.json b/packages/eslint/.eslintrc.json similarity index 100% rename from packages/linter/.eslintrc.json rename to packages/eslint/.eslintrc.json diff --git a/packages/linter/README.md b/packages/eslint/README.md similarity index 100% rename from packages/linter/README.md rename to packages/eslint/README.md diff --git a/packages/linter/docs/eslint-examples.md b/packages/eslint/docs/eslint-examples.md similarity index 92% rename from packages/linter/docs/eslint-examples.md rename to packages/eslint/docs/eslint-examples.md index 95136037a1205..03f7651a5e98b 100644 --- a/packages/linter/docs/eslint-examples.md +++ b/packages/eslint/docs/eslint-examples.md @@ -4,7 +4,7 @@ Linter can be configured in multiple ways. The basic way is to provide only `lin ```json "lint": { - "executor": "@nx/linter:eslint", + "executor": "@nx/eslint:lint", "options": { "lintFilePatterns": ["apps/frontend/**/*.ts"] } @@ -20,7 +20,7 @@ Linter provides an automated way of fixing known issues. To ensure that those ch ```json "lint": { - "executor": "@nx/linter:eslint", + "executor": "@nx/eslint:lint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["apps/frontend/**/*.ts"] @@ -38,7 +38,7 @@ We can also set this flag via project configuration to always fix files when run ```json "lint": { - "executor": "@nx/linter:eslint", + "executor": "@nx/eslint:lint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["apps/frontend/**/*.ts"], @@ -54,7 +54,7 @@ ESLint executor uses the `stylish` output format by default. You can change this ```json "lint": { - "executor": "@nx/linter:eslint", + "executor": "@nx/eslint:lint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["apps/frontend/**/*.ts"], @@ -76,7 +76,7 @@ We can also set this via project configuration as a default option. ```json "lint": { - "executor": "@nx/linter:eslint", + "executor": "@nx/eslint:lint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["apps/frontend/**/*.ts"], @@ -92,7 +92,7 @@ We can also set this via project configuration as a default option. ```json "lint": { - "executor": "@nx/linter:eslint", + "executor": "@nx/eslint:lint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["apps/frontend/**/*.ts"], diff --git a/packages/linter/docs/workspace-rule-examples.md b/packages/eslint/docs/workspace-rule-examples.md similarity index 100% rename from packages/linter/docs/workspace-rule-examples.md rename to packages/eslint/docs/workspace-rule-examples.md diff --git a/packages/eslint/executors.json b/packages/eslint/executors.json new file mode 100644 index 0000000000000..95b4499d2631b --- /dev/null +++ b/packages/eslint/executors.json @@ -0,0 +1,10 @@ +{ + "executors": { + "lint": { + "implementation": "./src/executors/lint/lint.impl", + "schema": "./src/executors/lint/schema.json", + "hasher": "./src/executors/lint/hasher", + "description": "Run ESLint on a project." + } + } +} diff --git a/packages/linter/generators.json b/packages/eslint/generators.json similarity index 97% rename from packages/linter/generators.json rename to packages/eslint/generators.json index dde511249dbad..ef3e328ff19c7 100644 --- a/packages/linter/generators.json +++ b/packages/eslint/generators.json @@ -1,5 +1,5 @@ { - "name": "nx/linter", + "name": "nx/eslint", "version": "0.1", "generators": { "workspace-rules-project": { diff --git a/packages/linter/index.ts b/packages/eslint/index.ts similarity index 86% rename from packages/linter/index.ts rename to packages/eslint/index.ts index 46439d120412c..6d96077a6428f 100644 --- a/packages/linter/index.ts +++ b/packages/eslint/index.ts @@ -4,5 +4,5 @@ export { Linter } from './src/generators/utils/linter'; // @nx/angular needs it for the Angular CLI workspace migration to Nx to // infer whether a config is using type aware rules and set the -// `hasTypeAwareRules` option of the `@nx/linter:eslint` executor. +// `hasTypeAwareRules` option of the `@nx/eslint:lint` executor. export { hasRulesRequiringTypeChecking } from './src/utils/rules-requiring-type-checking'; diff --git a/packages/linter/jest.config.ts b/packages/eslint/jest.config.ts similarity index 91% rename from packages/linter/jest.config.ts rename to packages/eslint/jest.config.ts index 283d0b3928810..d666bd199e136 100644 --- a/packages/linter/jest.config.ts +++ b/packages/eslint/jest.config.ts @@ -5,7 +5,7 @@ export default { }, moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'], globals: {}, - displayName: 'linter', + displayName: 'eslint', testEnvironment: 'node', preset: '../../jest.preset.js', }; diff --git a/packages/linter/migrations.json b/packages/eslint/migrations.json similarity index 100% rename from packages/linter/migrations.json rename to packages/eslint/migrations.json diff --git a/packages/linter/migrations.spec.ts b/packages/eslint/migrations.spec.ts similarity index 100% rename from packages/linter/migrations.spec.ts rename to packages/eslint/migrations.spec.ts diff --git a/packages/linter/package.json b/packages/eslint/package.json similarity index 92% rename from packages/linter/package.json rename to packages/eslint/package.json index 962a62047e708..cdd0ed2f98b12 100644 --- a/packages/linter/package.json +++ b/packages/eslint/package.json @@ -1,8 +1,8 @@ { - "name": "@nx/linter", + "name": "@nx/eslint", "version": "0.0.1", "private": false, - "description": "The Linter plugin for Nx contains executors, generators and utilities used for linting JavaScript/TypeScript projects within an Nx workspace.", + "description": "The ESLint plugin for Nx contains executors, generators and utilities used for linting JavaScript/TypeScript projects within an Nx workspace.", "repository": { "type": "git", "url": "https://github.com/nrwl/nx.git", diff --git a/packages/linter/project.json b/packages/eslint/project.json similarity index 70% rename from packages/linter/project.json rename to packages/eslint/project.json index 283dda3fbf766..6bbf59059961a 100644 --- a/packages/linter/project.json +++ b/packages/eslint/project.json @@ -1,7 +1,7 @@ { - "name": "linter", + "name": "eslint", "$schema": "../../node_modules/nx/schemas/project-schema.json", - "sourceRoot": "packages/linter", + "sourceRoot": "packages/eslint", "projectType": "library", "targets": { "test": {}, @@ -10,29 +10,29 @@ "options": { "assets": [ { - "input": "packages/linter", + "input": "packages/eslint", "glob": "**/files/**", "output": "/" }, { - "input": "packages/linter", + "input": "packages/eslint", "glob": "**/files/**/.gitkeep", "output": "/" }, { - "input": "packages/linter", + "input": "packages/eslint", "glob": "**/*.json", "ignore": ["**/tsconfig*.json", "project.json", ".eslintrc.json"], "output": "/" }, { - "input": "packages/linter", + "input": "packages/eslint", "glob": "**/*.js", "ignore": ["**/jest.config.js"], "output": "/" }, { - "input": "packages/linter", + "input": "packages/eslint", "glob": "**/*.d.ts", "output": "/" }, @@ -46,13 +46,13 @@ }, "build": { "executor": "nx:run-commands", - "outputs": ["{workspaceRoot}/build/packages/linter"], + "outputs": ["{workspaceRoot}/build/packages/eslint"], "options": { - "command": "node ./scripts/copy-readme.js linter" + "command": "node ./scripts/copy-readme.js eslint" } }, "add-extra-dependencies": { - "command": "node ./scripts/add-dependency-to-build.js linter @nrwl/linter" + "command": "node ./scripts/add-dependency-to-build.js eslint @nrwl/eslint" }, "lint": {} }, diff --git a/packages/linter/src/executors/eslint/hasher.ts b/packages/eslint/src/executors/lint/hasher.ts similarity index 100% rename from packages/linter/src/executors/eslint/hasher.ts rename to packages/eslint/src/executors/lint/hasher.ts diff --git a/packages/linter/src/executors/eslint/lint.impl.spec.ts b/packages/eslint/src/executors/lint/lint.impl.spec.ts similarity index 100% rename from packages/linter/src/executors/eslint/lint.impl.spec.ts rename to packages/eslint/src/executors/lint/lint.impl.spec.ts diff --git a/packages/linter/src/executors/eslint/lint.impl.ts b/packages/eslint/src/executors/lint/lint.impl.ts similarity index 100% rename from packages/linter/src/executors/eslint/lint.impl.ts rename to packages/eslint/src/executors/lint/lint.impl.ts diff --git a/packages/linter/src/executors/eslint/schema.d.ts b/packages/eslint/src/executors/lint/schema.d.ts similarity index 100% rename from packages/linter/src/executors/eslint/schema.d.ts rename to packages/eslint/src/executors/lint/schema.d.ts diff --git a/packages/linter/src/executors/eslint/schema.json b/packages/eslint/src/executors/lint/schema.json similarity index 100% rename from packages/linter/src/executors/eslint/schema.json rename to packages/eslint/src/executors/lint/schema.json diff --git a/packages/linter/src/executors/eslint/utility/eslint-utils.spec.ts b/packages/eslint/src/executors/lint/utility/eslint-utils.spec.ts similarity index 100% rename from packages/linter/src/executors/eslint/utility/eslint-utils.spec.ts rename to packages/eslint/src/executors/lint/utility/eslint-utils.spec.ts diff --git a/packages/linter/src/executors/eslint/utility/eslint-utils.ts b/packages/eslint/src/executors/lint/utility/eslint-utils.ts similarity index 100% rename from packages/linter/src/executors/eslint/utility/eslint-utils.ts rename to packages/eslint/src/executors/lint/utility/eslint-utils.ts diff --git a/packages/linter/src/generators/convert-to-flat-config/__snapshots__/generator.spec.ts.snap b/packages/eslint/src/generators/convert-to-flat-config/__snapshots__/generator.spec.ts.snap similarity index 100% rename from packages/linter/src/generators/convert-to-flat-config/__snapshots__/generator.spec.ts.snap rename to packages/eslint/src/generators/convert-to-flat-config/__snapshots__/generator.spec.ts.snap diff --git a/packages/linter/src/generators/convert-to-flat-config/converters/json-converter.spec.ts b/packages/eslint/src/generators/convert-to-flat-config/converters/json-converter.spec.ts similarity index 100% rename from packages/linter/src/generators/convert-to-flat-config/converters/json-converter.spec.ts rename to packages/eslint/src/generators/convert-to-flat-config/converters/json-converter.spec.ts diff --git a/packages/linter/src/generators/convert-to-flat-config/converters/json-converter.ts b/packages/eslint/src/generators/convert-to-flat-config/converters/json-converter.ts similarity index 100% rename from packages/linter/src/generators/convert-to-flat-config/converters/json-converter.ts rename to packages/eslint/src/generators/convert-to-flat-config/converters/json-converter.ts diff --git a/packages/linter/src/generators/convert-to-flat-config/generator.spec.ts b/packages/eslint/src/generators/convert-to-flat-config/generator.spec.ts similarity index 100% rename from packages/linter/src/generators/convert-to-flat-config/generator.spec.ts rename to packages/eslint/src/generators/convert-to-flat-config/generator.spec.ts diff --git a/packages/linter/src/generators/convert-to-flat-config/generator.ts b/packages/eslint/src/generators/convert-to-flat-config/generator.ts similarity index 89% rename from packages/linter/src/generators/convert-to-flat-config/generator.ts rename to packages/eslint/src/generators/convert-to-flat-config/generator.ts index 8047e18cf76ee..09d24233d2fe9 100644 --- a/packages/linter/src/generators/convert-to-flat-config/generator.ts +++ b/packages/eslint/src/generators/convert-to-flat-config/generator.ts @@ -65,7 +65,7 @@ function convertProjectToFlatConfig( if (tree.exists(`${projectConfig.root}/.eslintrc.json`)) { if (projectConfig.targets) { const eslintTargets = Object.keys(projectConfig.targets || {}).filter( - (t) => projectConfig.targets[t].executor === '@nx/linter:eslint' + (t) => projectConfig.targets[t].executor === '@nx/eslint:lint' ); for (const target of eslintTargets) { // remove any obsolete `eslintConfig` options pointing to the old config file @@ -76,8 +76,8 @@ function convertProjectToFlatConfig( } const nxHasLintTargets = Object.keys(nxJson.targetDefaults || {}).some( (t) => - (t === '@nx/linter:eslint' || - nxJson.targetDefaults[t].executor === '@nx/linter:eslint') && + (t === '@nx/eslint:lint' || + nxJson.targetDefaults[t].executor === '@nx/eslint:lint') && projectConfig.targets?.[t] ); if (nxHasLintTargets || eslintTargets.length > 0) { @@ -102,12 +102,10 @@ function updateNxJsonConfig(tree: Tree) { inputSet.add('{workspaceRoot}/eslint.config.js'); json.targetDefaults.lint.inputs = Array.from(inputSet); } - if (json.targetDefaults?.['@nx/linter:eslint']?.inputs) { - const inputSet = new Set( - json.targetDefaults['@nx/linter:eslint'].inputs - ); + if (json.targetDefaults?.['@nx/eslint:lint']?.inputs) { + const inputSet = new Set(json.targetDefaults['@nx/eslint:lint'].inputs); inputSet.add('{workspaceRoot}/eslint.config.js'); - json.targetDefaults['@nx/linter:eslint'].inputs = Array.from(inputSet); + json.targetDefaults['@nx/eslint:lint'].inputs = Array.from(inputSet); } if (json.namedInputs?.production) { const inputSet = new Set(json.namedInputs.production); diff --git a/packages/linter/src/generators/convert-to-flat-config/schema.d.ts b/packages/eslint/src/generators/convert-to-flat-config/schema.d.ts similarity index 100% rename from packages/linter/src/generators/convert-to-flat-config/schema.d.ts rename to packages/eslint/src/generators/convert-to-flat-config/schema.d.ts diff --git a/packages/linter/src/generators/convert-to-flat-config/schema.json b/packages/eslint/src/generators/convert-to-flat-config/schema.json similarity index 100% rename from packages/linter/src/generators/convert-to-flat-config/schema.json rename to packages/eslint/src/generators/convert-to-flat-config/schema.json diff --git a/packages/linter/src/generators/init/__snapshots__/init.spec.ts.snap b/packages/eslint/src/generators/init/__snapshots__/init.spec.ts.snap similarity index 100% rename from packages/linter/src/generators/init/__snapshots__/init.spec.ts.snap rename to packages/eslint/src/generators/init/__snapshots__/init.spec.ts.snap diff --git a/packages/linter/src/generators/init/global-eslint-config.ts b/packages/eslint/src/generators/init/global-eslint-config.ts similarity index 100% rename from packages/linter/src/generators/init/global-eslint-config.ts rename to packages/eslint/src/generators/init/global-eslint-config.ts diff --git a/packages/linter/src/generators/init/init-migration.ts b/packages/eslint/src/generators/init/init-migration.ts similarity index 98% rename from packages/linter/src/generators/init/init-migration.ts rename to packages/eslint/src/generators/init/init-migration.ts index 1e41d3fa5883b..918d54023ed7d 100644 --- a/packages/linter/src/generators/init/init-migration.ts +++ b/packages/eslint/src/generators/init/init-migration.ts @@ -69,6 +69,7 @@ export function findLintTarget( ): TargetConfiguration { return Object.values(project.targets ?? {}).find( (target) => + target.executor === '@nx/eslint:lint' || target.executor === '@nx/linter:eslint' || target.executor === '@nrwl/linter:eslint' ); diff --git a/packages/linter/src/generators/init/init.spec.ts b/packages/eslint/src/generators/init/init.spec.ts similarity index 97% rename from packages/linter/src/generators/init/init.spec.ts rename to packages/eslint/src/generators/init/init.spec.ts index 4bc20d56a5616..95f5a44d53a4c 100644 --- a/packages/linter/src/generators/init/init.spec.ts +++ b/packages/eslint/src/generators/init/init.spec.ts @@ -3,7 +3,7 @@ import { readJson, Tree } from '@nx/devkit'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; import { lintInitGenerator } from './init'; -describe('@nx/linter:init', () => { +describe('@nx/eslint:init', () => { let tree: Tree; beforeEach(() => { diff --git a/packages/linter/src/generators/init/init.ts b/packages/eslint/src/generators/init/init.ts similarity index 96% rename from packages/linter/src/generators/init/init.ts rename to packages/eslint/src/generators/init/init.ts index 03e889b71bd8e..521b2e3da77b9 100644 --- a/packages/linter/src/generators/init/init.ts +++ b/packages/eslint/src/generators/init/init.ts @@ -58,7 +58,7 @@ function initEsLint(tree: Tree, options: LinterInitOptions): GeneratorCallback { } if (!options.skipPackageJson) { - removeDependenciesFromPackageJson(tree, ['@nx/linter'], []); + removeDependenciesFromPackageJson(tree, ['@nx/eslint'], []); } writeJson( @@ -85,7 +85,7 @@ function initEsLint(tree: Tree, options: LinterInitOptions): GeneratorCallback { tree, {}, { - '@nx/linter': nxVersion, + '@nx/eslint': nxVersion, '@nx/eslint-plugin': nxVersion, '@typescript-eslint/parser': typescriptESLintVersion, '@typescript-eslint/eslint-plugin': typescriptESLintVersion, diff --git a/packages/linter/src/generators/lint-project/lint-project.spec.ts b/packages/eslint/src/generators/lint-project/lint-project.spec.ts similarity index 97% rename from packages/linter/src/generators/lint-project/lint-project.spec.ts rename to packages/eslint/src/generators/lint-project/lint-project.spec.ts index d384900cacbd5..e2184561466db 100644 --- a/packages/linter/src/generators/lint-project/lint-project.spec.ts +++ b/packages/eslint/src/generators/lint-project/lint-project.spec.ts @@ -10,7 +10,7 @@ import { Linter } from '../utils/linter'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; import { lintProjectGenerator } from './lint-project'; -describe('@nx/linter:lint-project', () => { +describe('@nx/eslint:lint-project', () => { let tree: Tree; const defaultOptions = { @@ -74,7 +74,7 @@ describe('@nx/linter:lint-project', () => { const projectConfig = readProjectConfiguration(tree, 'test-lib'); expect(projectConfig.targets.lint).toMatchInlineSnapshot(` { - "executor": "@nx/linter:eslint", + "executor": "@nx/eslint:lint", "options": { "lintFilePatterns": [ "libs/test-lib/**/*.ts", @@ -129,7 +129,7 @@ describe('@nx/linter:lint-project', () => { const projectConfig = readProjectConfiguration(tree, 'buildable-lib'); expect(projectConfig.targets.lint).toMatchInlineSnapshot(` { - "executor": "@nx/linter:eslint", + "executor": "@nx/eslint:lint", "options": { "lintFilePatterns": [ "libs/buildable-lib/**/*.ts", diff --git a/packages/linter/src/generators/lint-project/lint-project.ts b/packages/eslint/src/generators/lint-project/lint-project.ts similarity index 99% rename from packages/linter/src/generators/lint-project/lint-project.ts rename to packages/eslint/src/generators/lint-project/lint-project.ts index dd631df918753..bdac4b251696b 100644 --- a/packages/linter/src/generators/lint-project/lint-project.ts +++ b/packages/eslint/src/generators/lint-project/lint-project.ts @@ -77,7 +77,7 @@ export async function lintProjectGenerator( } projectConfig.targets['lint'] = { - executor: '@nx/linter:eslint', + executor: '@nx/eslint:lint', outputs: ['{options.outputFile}'], options: { lintFilePatterns: lintFilePatterns, diff --git a/packages/linter/src/generators/utils/eslint-file.spec.ts b/packages/eslint/src/generators/utils/eslint-file.spec.ts similarity index 97% rename from packages/linter/src/generators/utils/eslint-file.spec.ts rename to packages/eslint/src/generators/utils/eslint-file.spec.ts index 0556f3c56a257..12c4eb7160215 100644 --- a/packages/linter/src/generators/utils/eslint-file.spec.ts +++ b/packages/eslint/src/generators/utils/eslint-file.spec.ts @@ -8,7 +8,7 @@ import { import { Tree } from '@nx/devkit'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; -describe('@nx/linter:eslint-file', () => { +describe('@nx/eslint:lint-file', () => { let tree: Tree; beforeEach(() => { diff --git a/packages/linter/src/generators/utils/eslint-file.ts b/packages/eslint/src/generators/utils/eslint-file.ts similarity index 100% rename from packages/linter/src/generators/utils/eslint-file.ts rename to packages/eslint/src/generators/utils/eslint-file.ts diff --git a/packages/linter/src/generators/utils/eslint-targets.ts b/packages/eslint/src/generators/utils/eslint-targets.ts similarity index 81% rename from packages/linter/src/generators/utils/eslint-targets.ts rename to packages/eslint/src/generators/utils/eslint-targets.ts index c7a9fa91edb37..bfe9ba4aa36a5 100644 --- a/packages/linter/src/generators/utils/eslint-targets.ts +++ b/packages/eslint/src/generators/utils/eslint-targets.ts @@ -3,6 +3,9 @@ import { forEachExecutorOptions } from '@nx/devkit/src/generators/executor-optio export function getEslintTargets(tree: Tree) { const eslintTargetNames = new Set(); + forEachExecutorOptions(tree, '@nx/eslint:lint', (_, __, target) => { + eslintTargetNames.add(target); + }); forEachExecutorOptions(tree, '@nx/linter:eslint', (_, __, target) => { eslintTargetNames.add(target); }); diff --git a/packages/linter/src/generators/utils/flat-config/ast-utils.spec.ts b/packages/eslint/src/generators/utils/flat-config/ast-utils.spec.ts similarity index 100% rename from packages/linter/src/generators/utils/flat-config/ast-utils.spec.ts rename to packages/eslint/src/generators/utils/flat-config/ast-utils.spec.ts diff --git a/packages/linter/src/generators/utils/flat-config/ast-utils.ts b/packages/eslint/src/generators/utils/flat-config/ast-utils.ts similarity index 100% rename from packages/linter/src/generators/utils/flat-config/ast-utils.ts rename to packages/eslint/src/generators/utils/flat-config/ast-utils.ts diff --git a/packages/linter/src/generators/utils/flat-config/path-utils.ts b/packages/eslint/src/generators/utils/flat-config/path-utils.ts similarity index 100% rename from packages/linter/src/generators/utils/flat-config/path-utils.ts rename to packages/eslint/src/generators/utils/flat-config/path-utils.ts diff --git a/packages/linter/src/generators/utils/linter.ts b/packages/eslint/src/generators/utils/linter.ts similarity index 100% rename from packages/linter/src/generators/utils/linter.ts rename to packages/eslint/src/generators/utils/linter.ts diff --git a/packages/linter/src/generators/workspace-rule/__snapshots__/workspace-rule.spec.ts.snap b/packages/eslint/src/generators/workspace-rule/__snapshots__/workspace-rule.spec.ts.snap similarity index 100% rename from packages/linter/src/generators/workspace-rule/__snapshots__/workspace-rule.spec.ts.snap rename to packages/eslint/src/generators/workspace-rule/__snapshots__/workspace-rule.spec.ts.snap diff --git a/packages/linter/src/generators/workspace-rule/files/__name__.spec.ts__tmpl__ b/packages/eslint/src/generators/workspace-rule/files/__name__.spec.ts__tmpl__ similarity index 100% rename from packages/linter/src/generators/workspace-rule/files/__name__.spec.ts__tmpl__ rename to packages/eslint/src/generators/workspace-rule/files/__name__.spec.ts__tmpl__ diff --git a/packages/linter/src/generators/workspace-rule/files/__name__.ts__tmpl__ b/packages/eslint/src/generators/workspace-rule/files/__name__.ts__tmpl__ similarity index 100% rename from packages/linter/src/generators/workspace-rule/files/__name__.ts__tmpl__ rename to packages/eslint/src/generators/workspace-rule/files/__name__.ts__tmpl__ diff --git a/packages/linter/src/generators/workspace-rule/schema.json b/packages/eslint/src/generators/workspace-rule/schema.json similarity index 100% rename from packages/linter/src/generators/workspace-rule/schema.json rename to packages/eslint/src/generators/workspace-rule/schema.json diff --git a/packages/linter/src/generators/workspace-rule/workspace-rule.spec.ts b/packages/eslint/src/generators/workspace-rule/workspace-rule.spec.ts similarity index 99% rename from packages/linter/src/generators/workspace-rule/workspace-rule.spec.ts rename to packages/eslint/src/generators/workspace-rule/workspace-rule.spec.ts index ee4875fe82212..92ded1d9d65d9 100644 --- a/packages/linter/src/generators/workspace-rule/workspace-rule.spec.ts +++ b/packages/eslint/src/generators/workspace-rule/workspace-rule.spec.ts @@ -2,7 +2,7 @@ import { NxJsonConfiguration, readJson, Tree } from '@nx/devkit'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; import { lintWorkspaceRuleGenerator } from './workspace-rule'; -describe('@nx/linter:workspace-rule', () => { +describe('@nx/eslint:workspace-rule', () => { let tree: Tree; beforeEach(async () => { diff --git a/packages/linter/src/generators/workspace-rule/workspace-rule.ts b/packages/eslint/src/generators/workspace-rule/workspace-rule.ts similarity index 100% rename from packages/linter/src/generators/workspace-rule/workspace-rule.ts rename to packages/eslint/src/generators/workspace-rule/workspace-rule.ts diff --git a/packages/linter/src/generators/workspace-rules-project/__snapshots__/workspace-rules-project.spec.ts.snap b/packages/eslint/src/generators/workspace-rules-project/__snapshots__/workspace-rules-project.spec.ts.snap similarity index 100% rename from packages/linter/src/generators/workspace-rules-project/__snapshots__/workspace-rules-project.spec.ts.snap rename to packages/eslint/src/generators/workspace-rules-project/__snapshots__/workspace-rules-project.spec.ts.snap diff --git a/packages/linter/src/generators/workspace-rules-project/files/index.ts__tmpl__ b/packages/eslint/src/generators/workspace-rules-project/files/index.ts__tmpl__ similarity index 100% rename from packages/linter/src/generators/workspace-rules-project/files/index.ts__tmpl__ rename to packages/eslint/src/generators/workspace-rules-project/files/index.ts__tmpl__ diff --git a/packages/linter/src/generators/workspace-rules-project/files/tsconfig.json__tmpl__ b/packages/eslint/src/generators/workspace-rules-project/files/tsconfig.json__tmpl__ similarity index 100% rename from packages/linter/src/generators/workspace-rules-project/files/tsconfig.json__tmpl__ rename to packages/eslint/src/generators/workspace-rules-project/files/tsconfig.json__tmpl__ diff --git a/packages/linter/src/generators/workspace-rules-project/files/tsconfig.lint.json__tmpl__ b/packages/eslint/src/generators/workspace-rules-project/files/tsconfig.lint.json__tmpl__ similarity index 100% rename from packages/linter/src/generators/workspace-rules-project/files/tsconfig.lint.json__tmpl__ rename to packages/eslint/src/generators/workspace-rules-project/files/tsconfig.lint.json__tmpl__ diff --git a/packages/linter/src/generators/workspace-rules-project/schema.json b/packages/eslint/src/generators/workspace-rules-project/schema.json similarity index 100% rename from packages/linter/src/generators/workspace-rules-project/schema.json rename to packages/eslint/src/generators/workspace-rules-project/schema.json diff --git a/packages/linter/src/generators/workspace-rules-project/workspace-rules-project.spec.ts b/packages/eslint/src/generators/workspace-rules-project/workspace-rules-project.spec.ts similarity index 98% rename from packages/linter/src/generators/workspace-rules-project/workspace-rules-project.spec.ts rename to packages/eslint/src/generators/workspace-rules-project/workspace-rules-project.spec.ts index 5525eacc6bd38..9368d0e328910 100644 --- a/packages/linter/src/generators/workspace-rules-project/workspace-rules-project.spec.ts +++ b/packages/eslint/src/generators/workspace-rules-project/workspace-rules-project.spec.ts @@ -12,7 +12,7 @@ import { WORKSPACE_RULES_PROJECT_NAME, } from './workspace-rules-project'; -describe('@nx/linter:workspace-rules-project', () => { +describe('@nx/eslint:workspace-rules-project', () => { let tree: Tree; beforeEach(() => { diff --git a/packages/linter/src/generators/workspace-rules-project/workspace-rules-project.ts b/packages/eslint/src/generators/workspace-rules-project/workspace-rules-project.ts similarity index 100% rename from packages/linter/src/generators/workspace-rules-project/workspace-rules-project.ts rename to packages/eslint/src/generators/workspace-rules-project/workspace-rules-project.ts diff --git a/packages/linter/src/migrations/update-15-0-0/add-eslint-inputs.spec.ts b/packages/eslint/src/migrations/update-15-0-0/add-eslint-inputs.spec.ts similarity index 100% rename from packages/linter/src/migrations/update-15-0-0/add-eslint-inputs.spec.ts rename to packages/eslint/src/migrations/update-15-0-0/add-eslint-inputs.spec.ts diff --git a/packages/linter/src/migrations/update-15-0-0/add-eslint-inputs.ts b/packages/eslint/src/migrations/update-15-0-0/add-eslint-inputs.ts similarity index 100% rename from packages/linter/src/migrations/update-15-0-0/add-eslint-inputs.ts rename to packages/eslint/src/migrations/update-15-0-0/add-eslint-inputs.ts diff --git a/packages/linter/src/migrations/update-15-7-1/add-eslint-ignore.spec.ts b/packages/eslint/src/migrations/update-15-7-1/add-eslint-ignore.spec.ts similarity index 100% rename from packages/linter/src/migrations/update-15-7-1/add-eslint-ignore.spec.ts rename to packages/eslint/src/migrations/update-15-7-1/add-eslint-ignore.spec.ts diff --git a/packages/linter/src/migrations/update-15-7-1/add-eslint-ignore.ts b/packages/eslint/src/migrations/update-15-7-1/add-eslint-ignore.ts similarity index 100% rename from packages/linter/src/migrations/update-15-7-1/add-eslint-ignore.ts rename to packages/eslint/src/migrations/update-15-7-1/add-eslint-ignore.ts diff --git a/packages/linter/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.spec.ts b/packages/eslint/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.spec.ts similarity index 91% rename from packages/linter/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.spec.ts rename to packages/eslint/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.spec.ts index 1c66d74de0c4e..d1291161d6f60 100644 --- a/packages/linter/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.spec.ts +++ b/packages/eslint/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.spec.ts @@ -29,8 +29,8 @@ describe('update-16-0-0-add-nx-packages', () => { const packageJson = readJson(tree, 'package.json'); const newDependencyVersion = - packageJson.devDependencies['@nx/linter'] ?? - packageJson.dependencies['@nx/linter']; + packageJson.devDependencies['@nx/eslint'] ?? + packageJson.dependencies['@nx/eslint']; expect(newDependencyVersion).toBeDefined(); }); diff --git a/packages/linter/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.ts b/packages/eslint/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.ts similarity index 95% rename from packages/linter/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.ts rename to packages/eslint/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.ts index 318e1816ffba8..7ffac6b10a0d3 100644 --- a/packages/linter/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.ts +++ b/packages/eslint/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.ts @@ -2,7 +2,7 @@ import { Tree, formatFiles } from '@nx/devkit'; import { replaceNrwlPackageWithNxPackage } from '@nx/devkit/src/utils/replace-package'; export default async function replacePackage(tree: Tree): Promise { - await replaceNrwlPackageWithNxPackage(tree, '@nrwl/linter', '@nx/linter'); + await replaceNrwlPackageWithNxPackage(tree, '@nrwl/linter', '@nx/eslint'); await formatFiles(tree); } diff --git a/packages/linter/src/migrations/update-16-8-0-add-ignored-files/update-16-8-0-add-ignored-files.spec.ts b/packages/eslint/src/migrations/update-16-8-0-add-ignored-files/update-16-8-0-add-ignored-files.spec.ts similarity index 100% rename from packages/linter/src/migrations/update-16-8-0-add-ignored-files/update-16-8-0-add-ignored-files.spec.ts rename to packages/eslint/src/migrations/update-16-8-0-add-ignored-files/update-16-8-0-add-ignored-files.spec.ts diff --git a/packages/linter/src/migrations/update-16-8-0-add-ignored-files/update-16-8-0-add-ignored-files.ts b/packages/eslint/src/migrations/update-16-8-0-add-ignored-files/update-16-8-0-add-ignored-files.ts similarity index 100% rename from packages/linter/src/migrations/update-16-8-0-add-ignored-files/update-16-8-0-add-ignored-files.ts rename to packages/eslint/src/migrations/update-16-8-0-add-ignored-files/update-16-8-0-add-ignored-files.ts diff --git a/packages/linter/src/utils/flat-config.ts b/packages/eslint/src/utils/flat-config.ts similarity index 100% rename from packages/linter/src/utils/flat-config.ts rename to packages/eslint/src/utils/flat-config.ts diff --git a/packages/linter/src/utils/rules-requiring-type-checking.ts b/packages/eslint/src/utils/rules-requiring-type-checking.ts similarity index 100% rename from packages/linter/src/utils/rules-requiring-type-checking.ts rename to packages/eslint/src/utils/rules-requiring-type-checking.ts diff --git a/packages/linter/src/utils/versions.ts b/packages/eslint/src/utils/versions.ts similarity index 100% rename from packages/linter/src/utils/versions.ts rename to packages/eslint/src/utils/versions.ts diff --git a/packages/linter/src/utils/workspace-lint-rules.ts b/packages/eslint/src/utils/workspace-lint-rules.ts similarity index 100% rename from packages/linter/src/utils/workspace-lint-rules.ts rename to packages/eslint/src/utils/workspace-lint-rules.ts diff --git a/packages/linter/tsconfig.json b/packages/eslint/tsconfig.json similarity index 100% rename from packages/linter/tsconfig.json rename to packages/eslint/tsconfig.json diff --git a/packages/linter/tsconfig.lib.json b/packages/eslint/tsconfig.lib.json similarity index 100% rename from packages/linter/tsconfig.lib.json rename to packages/eslint/tsconfig.lib.json diff --git a/packages/linter/tsconfig.spec.json b/packages/eslint/tsconfig.spec.json similarity index 100% rename from packages/linter/tsconfig.spec.json rename to packages/eslint/tsconfig.spec.json diff --git a/packages/expo/package.json b/packages/expo/package.json index dca29c2fa0af6..f1132c184d93c 100644 --- a/packages/expo/package.json +++ b/packages/expo/package.json @@ -38,7 +38,7 @@ "@nx/devkit": "file:../devkit", "@nx/jest": "file:../jest", "@nx/js": "file:../js", - "@nx/linter": "file:../linter", + "@nx/eslint": "file:../eslint", "@nx/react": "file:../react", "@nx/webpack": "file:../webpack" }, diff --git a/packages/expo/src/generators/application/application.spec.ts b/packages/expo/src/generators/application/application.spec.ts index b19b193e5cd3e..02e79876e6a4d 100644 --- a/packages/expo/src/generators/application/application.spec.ts +++ b/packages/expo/src/generators/application/application.spec.ts @@ -5,7 +5,7 @@ import { Tree, } from '@nx/devkit'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import { expoApplicationGenerator } from './application'; describe('app', () => { diff --git a/packages/expo/src/generators/application/lib/add-detox.ts b/packages/expo/src/generators/application/lib/add-detox.ts index 93366950af185..ffe8be1c9de74 100644 --- a/packages/expo/src/generators/application/lib/add-detox.ts +++ b/packages/expo/src/generators/application/lib/add-detox.ts @@ -1,7 +1,7 @@ import { detoxApplicationGenerator } from '@nx/detox'; import { Tree } from '@nx/devkit'; import { NormalizedSchema } from './normalize-options'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; export async function addDetox(host: Tree, options: NormalizedSchema) { if (options?.e2eTestRunner !== 'detox') { diff --git a/packages/expo/src/generators/application/lib/nomalize-options.spec.ts b/packages/expo/src/generators/application/lib/nomalize-options.spec.ts index 393b162a7c80d..780322fe777b2 100644 --- a/packages/expo/src/generators/application/lib/nomalize-options.spec.ts +++ b/packages/expo/src/generators/application/lib/nomalize-options.spec.ts @@ -1,6 +1,6 @@ import { Tree } from '@nx/devkit'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import { Schema } from '../schema'; import { normalizeOptions } from './normalize-options'; diff --git a/packages/expo/src/generators/application/schema.d.ts b/packages/expo/src/generators/application/schema.d.ts index f1529d67f17eb..549d7683ee454 100644 --- a/packages/expo/src/generators/application/schema.d.ts +++ b/packages/expo/src/generators/application/schema.d.ts @@ -1,5 +1,5 @@ import type { ProjectNameAndRootFormat } from '@nx/devkit/src/generators/project-name-and-root-utils'; -import type { Linter } from '@nx/linter'; +import type { Linter } from '@nx/eslint'; export interface Schema { name: string; diff --git a/packages/expo/src/generators/component/component.spec.ts b/packages/expo/src/generators/component/component.spec.ts index 17ae43f94ff73..8c291a5e0d920 100644 --- a/packages/expo/src/generators/component/component.spec.ts +++ b/packages/expo/src/generators/component/component.spec.ts @@ -1,6 +1,6 @@ import { logger, Tree } from '@nx/devkit'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import expoApplicationGenerator from '../application/application'; import expoLibraryGenerator from '../library/library'; import { expoComponentGenerator } from './component'; diff --git a/packages/expo/src/generators/library/library.spec.ts b/packages/expo/src/generators/library/library.spec.ts index 9742eb061c51c..0664bc3749d0d 100644 --- a/packages/expo/src/generators/library/library.spec.ts +++ b/packages/expo/src/generators/library/library.spec.ts @@ -6,7 +6,7 @@ import { updateJson, } from '@nx/devkit'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import { expoLibraryGenerator } from './library'; import { Schema } from './schema'; @@ -40,7 +40,7 @@ describe('lib', () => { expect(projectConfiguration.root).toEqual('my-lib'); expect(projectConfiguration.targets.build).toBeUndefined(); expect(projectConfiguration.targets.lint).toEqual({ - executor: '@nx/linter:eslint', + executor: '@nx/eslint:lint', outputs: ['{options.outputFile}'], options: { lintFilePatterns: ['my-lib/**/*.{ts,tsx,js,jsx}'], @@ -149,7 +149,7 @@ describe('lib', () => { 'my-dir-my-lib' ); expect(projectConfiguration.targets.lint).toEqual({ - executor: '@nx/linter:eslint', + executor: '@nx/eslint:lint', outputs: ['{options.outputFile}'], options: { lintFilePatterns: ['my-dir/my-lib/**/*.{ts,tsx,js,jsx}'], @@ -199,7 +199,7 @@ describe('lib', () => { const projectConfiguration = readProjectConfiguration(appTree, 'my-lib'); expect(projectConfiguration.targets.test).toBeUndefined(); expect(projectConfiguration.targets.lint).toMatchObject({ - executor: '@nx/linter:eslint', + executor: '@nx/eslint:lint', options: { lintFilePatterns: ['my-lib/**/*.{ts,tsx,js,jsx}'], }, diff --git a/packages/expo/src/generators/library/schema.d.ts b/packages/expo/src/generators/library/schema.d.ts index 6407f8b80fd92..498a938462ecb 100644 --- a/packages/expo/src/generators/library/schema.d.ts +++ b/packages/expo/src/generators/library/schema.d.ts @@ -1,5 +1,5 @@ import type { ProjectNameAndRootFormat } from '@nx/devkit/src/generators/project-name-and-root-utils'; -import type { Linter } from '@nx/linter'; +import type { Linter } from '@nx/eslint'; /** * Same as the @nx/react library schema, except it removes keys: style, component, routing, appProject diff --git a/packages/expo/src/utils/add-linting.spec.ts b/packages/expo/src/utils/add-linting.spec.ts index 5d5d559b62ec2..7ca1407e85579 100644 --- a/packages/expo/src/utils/add-linting.spec.ts +++ b/packages/expo/src/utils/add-linting.spec.ts @@ -1,6 +1,6 @@ import { readProjectConfiguration, Tree } from '@nx/devkit'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import { libraryGenerator } from '@nx/js'; import { addLinting } from './add-linting'; @@ -26,7 +26,7 @@ describe('Add Linting', () => { const project = readProjectConfiguration(tree, 'my-lib'); expect(project.targets.lint).toBeDefined(); - expect(project.targets.lint.executor).toEqual('@nx/linter:eslint'); + expect(project.targets.lint.executor).toEqual('@nx/eslint:lint'); }); it('should not add lint target when "none" is passed', async () => { diff --git a/packages/expo/src/utils/add-linting.ts b/packages/expo/src/utils/add-linting.ts index 884f822776eb9..70ee6f3e2e078 100644 --- a/packages/expo/src/utils/add-linting.ts +++ b/packages/expo/src/utils/add-linting.ts @@ -1,4 +1,4 @@ -import { Linter, lintProjectGenerator } from '@nx/linter'; +import { Linter, lintProjectGenerator } from '@nx/eslint'; import { addDependenciesToPackageJson, GeneratorCallback, @@ -10,7 +10,7 @@ import { addExtendsToLintConfig, addIgnoresToLintConfig, isEslintConfigSupported, -} from '@nx/linter/src/generators/utils/eslint-file'; +} from '@nx/eslint/src/generators/utils/eslint-file'; interface NormalizedSchema { linter?: Linter; diff --git a/packages/express/.eslintrc.json b/packages/express/.eslintrc.json index cd27ca0d46d2a..9d46a2130fead 100644 --- a/packages/express/.eslintrc.json +++ b/packages/express/.eslintrc.json @@ -45,7 +45,7 @@ "buildTargets": ["build-base"], "ignoredDependencies": [ "nx", - "@nx/linter", + "@nx/eslint", "typescript", "eslint", "express" diff --git a/packages/express/src/generators/application/schema.d.ts b/packages/express/src/generators/application/schema.d.ts index 11b978cda9b38..676b4172061a3 100644 --- a/packages/express/src/generators/application/schema.d.ts +++ b/packages/express/src/generators/application/schema.d.ts @@ -1,5 +1,5 @@ import type { ProjectNameAndRootFormat } from '@nx/devkit/src/generators/project-name-and-root-utils'; -import type { Linter } from '@nx/linter'; +import type { Linter } from '@nx/eslint'; import type { UnitTestRunner } from '../../utils/test-runners'; export interface Schema { diff --git a/packages/jest/src/generators/configuration/configuration.spec.ts b/packages/jest/src/generators/configuration/configuration.spec.ts index 7d5446b94dbad..95f2f048498b5 100644 --- a/packages/jest/src/generators/configuration/configuration.spec.ts +++ b/packages/jest/src/generators/configuration/configuration.spec.ts @@ -31,7 +31,7 @@ describe('jestProject', () => { sourceRoot: 'libs/lib1/src', targets: { lint: { - executor: '@nx/linter:eslint', + executor: '@nx/eslint:lint', options: {}, }, }, diff --git a/packages/js/src/generators/library/library.spec.ts b/packages/js/src/generators/library/library.spec.ts index 1f1c4092d3ca0..4f2d76b06ad56 100644 --- a/packages/js/src/generators/library/library.spec.ts +++ b/packages/js/src/generators/library/library.spec.ts @@ -482,7 +482,7 @@ describe('lib', () => { const packageJson = readJson(tree, 'package.json'); expect(packageJson.devDependencies['eslint']).toBeDefined(); - expect(packageJson.devDependencies['@nx/linter']).toBeDefined(); + expect(packageJson.devDependencies['@nx/eslint']).toBeDefined(); expect(packageJson.devDependencies['@nx/eslint-plugin']).toBeDefined(); }); @@ -494,7 +494,7 @@ describe('lib', () => { projectNameAndRootFormat: 'as-provided', }); expect(readProjectConfiguration(tree, 'my-lib').targets.lint).toEqual({ - executor: '@nx/linter:eslint', + executor: '@nx/eslint:lint', outputs: ['{options.outputFile}'], options: { lintFilePatterns: ['my-lib/**/*.ts', 'my-lib/package.json'], @@ -567,7 +567,7 @@ describe('lib', () => { }); expect(readProjectConfiguration(tree, 'my-lib').targets.lint).toEqual({ - executor: '@nx/linter:eslint', + executor: '@nx/eslint:lint', outputs: ['{options.outputFile}'], options: { lintFilePatterns: [ diff --git a/packages/js/src/generators/library/library.ts b/packages/js/src/generators/library/library.ts index b9488428ca106..8aa6483bb7ecc 100644 --- a/packages/js/src/generators/library/library.ts +++ b/packages/js/src/generators/library/library.ts @@ -243,10 +243,10 @@ export async function addLint( tree: Tree, options: AddLintOptions ): Promise { - const { lintProjectGenerator } = ensurePackage('@nx/linter', nxVersion); + const { lintProjectGenerator } = ensurePackage('@nx/eslint', nxVersion); const { mapLintPattern } = // nx-ignore-next-line - require('@nx/linter/src/generators/lint-project/lint-project'); + require('@nx/eslint/src/generators/lint-project/lint-project'); const projectConfiguration = readProjectConfiguration(tree, options.name); const task = lintProjectGenerator(tree, { project: options.name, @@ -272,7 +272,7 @@ export async function addLint( isEslintConfigSupported, updateOverrideInLintConfig, // nx-ignore-next-line - } = require('@nx/linter/src/generators/utils/eslint-file'); + } = require('@nx/eslint/src/generators/utils/eslint-file'); // if config is not supported, we don't need to do anything if (!isEslintConfigSupported(tree)) { @@ -583,7 +583,7 @@ async function normalizeOptions( options.bundler = 'none'; } - const { Linter } = ensurePackage('@nx/linter', nxVersion); + const { Linter } = ensurePackage('@nx/eslint', nxVersion); if (options.config === 'npm-scripts') { options.unitTestRunner = 'none'; options.linter = Linter.None; diff --git a/packages/js/src/utils/schema.d.ts b/packages/js/src/utils/schema.d.ts index f02915696d0df..c6ef695061f56 100644 --- a/packages/js/src/utils/schema.d.ts +++ b/packages/js/src/utils/schema.d.ts @@ -2,7 +2,7 @@ import type { ProjectNameAndRootFormat } from '@nx/devkit/src/generators/project import type { AssetGlob, FileInputOutput } from './assets/assets'; import { TransformerEntry } from './typescript/types'; // nx-ignore-next-line -const { Linter } = require('@nx/linter'); // use require to import to avoid circular dependency +const { Linter } = require('@nx/eslint'); // use require to import to avoid circular dependency export type Compiler = 'tsc' | 'swc'; export type Bundler = 'swc' | 'tsc' | 'rollup' | 'vite' | 'esbuild' | 'none'; diff --git a/packages/linter/executors.json b/packages/linter/executors.json deleted file mode 100644 index ef774305dbbf1..0000000000000 --- a/packages/linter/executors.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "executors": { - "eslint": { - "implementation": "./src/executors/eslint/lint.impl", - "schema": "./src/executors/eslint/schema.json", - "hasher": "./src/executors/eslint/hasher", - "description": "Run ESLint on a project." - } - } -} diff --git a/packages/nest/package.json b/packages/nest/package.json index 5f2fe8b66d79e..4323724313d93 100644 --- a/packages/nest/package.json +++ b/packages/nest/package.json @@ -33,7 +33,7 @@ "@nestjs/schematics": "^9.1.0", "@nx/devkit": "file:../devkit", "@nx/js": "file:../js", - "@nx/linter": "file:../linter", + "@nx/eslint": "file:../eslint", "@nx/node": "file:../node", "@phenomnomnominal/tsquery": "~5.0.1", "tslib": "^2.3.0" diff --git a/packages/nest/project.json b/packages/nest/project.json index 098c84d405179..7a5ef344ef591 100644 --- a/packages/nest/project.json +++ b/packages/nest/project.json @@ -56,5 +56,5 @@ }, "lint": {} }, - "implicitDependencies": ["node", "linter"] + "implicitDependencies": ["node", "eslint"] } diff --git a/packages/nest/src/generators/application/lib/normalize-options.ts b/packages/nest/src/generators/application/lib/normalize-options.ts index 6116615458f14..3fee9ce4ff6bd 100644 --- a/packages/nest/src/generators/application/lib/normalize-options.ts +++ b/packages/nest/src/generators/application/lib/normalize-options.ts @@ -1,6 +1,6 @@ import { Tree } from '@nx/devkit'; import { determineProjectNameAndRootOptions } from '@nx/devkit/src/generators/project-name-and-root-utils'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import type { Schema as NodeApplicationGeneratorOptions } from '@nx/node/src/generators/application/schema'; import type { ApplicationGeneratorOptions, NormalizedOptions } from '../schema'; diff --git a/packages/nest/src/generators/application/schema.d.ts b/packages/nest/src/generators/application/schema.d.ts index a0a18e5b19704..65ce8b821c58f 100644 --- a/packages/nest/src/generators/application/schema.d.ts +++ b/packages/nest/src/generators/application/schema.d.ts @@ -1,5 +1,5 @@ import type { ProjectNameAndRootFormat } from '@nx/devkit/src/generators/project-name-and-root-utils'; -import type { Linter } from '@nx/linter'; +import type { Linter } from '@nx/eslint'; export interface ApplicationGeneratorOptions { name: string; diff --git a/packages/nest/src/generators/library/lib/normalize-options.ts b/packages/nest/src/generators/library/lib/normalize-options.ts index b7d515a97dd51..6c38f4e08612a 100644 --- a/packages/nest/src/generators/library/lib/normalize-options.ts +++ b/packages/nest/src/generators/library/lib/normalize-options.ts @@ -2,7 +2,7 @@ import { Tree } from '@nx/devkit'; import { determineProjectNameAndRootOptions } from '@nx/devkit/src/generators/project-name-and-root-utils'; import { getNpmScope } from '@nx/js/src/utils/package-json/get-npm-scope'; import type { LibraryGeneratorSchema as JsLibraryGeneratorSchema } from '@nx/js/src/utils/schema'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import type { LibraryGeneratorOptions, NormalizedOptions } from '../schema'; export async function normalizeOptions( diff --git a/packages/nest/src/generators/library/library.spec.ts b/packages/nest/src/generators/library/library.spec.ts index 7b6a719bc9b08..7a78e0126fe64 100644 --- a/packages/nest/src/generators/library/library.spec.ts +++ b/packages/nest/src/generators/library/library.spec.ts @@ -23,7 +23,7 @@ describe('lib', () => { expect(config.root).toEqual(`my-lib`); expect(config.targets.build).toBeUndefined(); expect(config.targets.lint).toEqual({ - executor: '@nx/linter:eslint', + executor: '@nx/eslint:lint', outputs: ['{options.outputFile}'], options: { lintFilePatterns: [`my-lib/**/*.ts`], @@ -219,7 +219,7 @@ describe('lib', () => { const project = readProjectConfiguration(tree, `my-lib`); expect(project.root).toEqual(`my-dir/my-lib`); expect(project.targets.lint).toEqual({ - executor: '@nx/linter:eslint', + executor: '@nx/eslint:lint', outputs: ['{options.outputFile}'], options: { lintFilePatterns: [`my-dir/my-lib/**/*.ts`], diff --git a/packages/nest/src/generators/library/schema.d.ts b/packages/nest/src/generators/library/schema.d.ts index 0588a2bc93817..fdce605ff5c70 100644 --- a/packages/nest/src/generators/library/schema.d.ts +++ b/packages/nest/src/generators/library/schema.d.ts @@ -1,5 +1,5 @@ import type { ProjectNameAndRootFormat } from '@nx/devkit/src/generators/project-name-and-root-utils'; -import type { Linter } from '@nx/linter'; +import type { Linter } from '@nx/eslint'; import type { UnitTestRunner } from '../utils'; export interface LibraryGeneratorOptions { diff --git a/packages/next/package.json b/packages/next/package.json index c4af16631c677..9da4307ea2ee3 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -46,7 +46,7 @@ "webpack-merge": "^5.8.0", "@nx/devkit": "file:../devkit", "@nx/js": "file:../js", - "@nx/linter": "file:../linter", + "@nx/eslint": "file:../eslint", "@nx/react": "file:../react", "@nx/web": "file:../web", "@nx/workspace": "file:../workspace" diff --git a/packages/next/src/generators/application/lib/add-e2e.ts b/packages/next/src/generators/application/lib/add-e2e.ts index 0f3f1857f70d9..b68e011d4fc00 100644 --- a/packages/next/src/generators/application/lib/add-e2e.ts +++ b/packages/next/src/generators/application/lib/add-e2e.ts @@ -5,7 +5,7 @@ import { joinPathFragments, Tree, } from '@nx/devkit'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import { nxVersion } from '../../../utils/versions'; import { NormalizedSchema } from './normalize-options'; diff --git a/packages/next/src/generators/application/lib/add-linting.spec.ts b/packages/next/src/generators/application/lib/add-linting.spec.ts index 1ccc352791e22..0f22cae88556b 100644 --- a/packages/next/src/generators/application/lib/add-linting.spec.ts +++ b/packages/next/src/generators/application/lib/add-linting.spec.ts @@ -6,7 +6,7 @@ import { } from '@nx/devkit'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; import { addLinting } from './add-linting'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import { NormalizedSchema } from './normalize-options'; describe('updateEslint', () => { @@ -128,7 +128,7 @@ describe('updateEslint', () => { baseDirectory: __dirname, recommendedConfig: js.configs.recommended, }); - + module.exports = [ { diff --git a/packages/next/src/generators/application/lib/add-linting.ts b/packages/next/src/generators/application/lib/add-linting.ts index 4ee945c296265..71ab2fa282844 100644 --- a/packages/next/src/generators/application/lib/add-linting.ts +++ b/packages/next/src/generators/application/lib/add-linting.ts @@ -1,4 +1,4 @@ -import { Linter, lintProjectGenerator } from '@nx/linter'; +import { Linter, lintProjectGenerator } from '@nx/eslint'; import { addDependenciesToPackageJson, GeneratorCallback, @@ -14,8 +14,8 @@ import { addOverrideToLintConfig, isEslintConfigSupported, updateOverrideInLintConfig, -} from '@nx/linter/src/generators/utils/eslint-file'; -import { mapLintPattern } from '@nx/linter/src/generators/lint-project/lint-project'; +} from '@nx/eslint/src/generators/utils/eslint-file'; +import { mapLintPattern } from '@nx/eslint/src/generators/lint-project/lint-project'; export async function addLinting( host: Tree, diff --git a/packages/next/src/generators/application/lib/normalize-options.ts b/packages/next/src/generators/application/lib/normalize-options.ts index 3c7238d8bd59e..d4b1850293e3d 100644 --- a/packages/next/src/generators/application/lib/normalize-options.ts +++ b/packages/next/src/generators/application/lib/normalize-options.ts @@ -1,6 +1,6 @@ import { joinPathFragments, names, Tree } from '@nx/devkit'; import { determineProjectNameAndRootOptions } from '@nx/devkit/src/generators/project-name-and-root-utils'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import { assertValidStyle } from '@nx/react/src/utils/assertion'; import { Schema } from '../schema'; diff --git a/packages/next/src/generators/application/schema.d.ts b/packages/next/src/generators/application/schema.d.ts index 08d8283ca904d..a83160ae6065d 100644 --- a/packages/next/src/generators/application/schema.d.ts +++ b/packages/next/src/generators/application/schema.d.ts @@ -1,5 +1,5 @@ import type { ProjectNameAndRootFormat } from '@nx/devkit/src/generators/project-name-and-root-utils'; -import type { Linter } from '@nx/linter'; +import type { Linter } from '@nx/eslint'; import type { SupportedStyles } from '@nx/react'; export interface Schema { diff --git a/packages/next/src/generators/component/component.spec.ts b/packages/next/src/generators/component/component.spec.ts index 4de4b892e4fce..2be24248203bc 100644 --- a/packages/next/src/generators/component/component.spec.ts +++ b/packages/next/src/generators/component/component.spec.ts @@ -3,7 +3,7 @@ import { componentGenerator } from './component'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; import { Tree } from '@nx/devkit'; import { libraryGenerator } from '@nx/react'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; describe('component', () => { let tree: Tree; diff --git a/packages/next/src/generators/cypress-component-configuration/cypress-component-configuration.spec.ts b/packages/next/src/generators/cypress-component-configuration/cypress-component-configuration.spec.ts index 547730e77dbca..e737f0992c589 100644 --- a/packages/next/src/generators/cypress-component-configuration/cypress-component-configuration.spec.ts +++ b/packages/next/src/generators/cypress-component-configuration/cypress-component-configuration.spec.ts @@ -4,7 +4,7 @@ import { cypressComponentConfiguration } from './cypress-component-configuration import { applicationGenerator } from '../application/application'; import { libraryGenerator } from '../library/library'; import { setupTailwindGenerator } from '@nx/react'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; describe('cypress-component-configuration generator', () => { let tree: Tree; diff --git a/packages/next/src/generators/library/lib/normalize-options.spec.ts b/packages/next/src/generators/library/lib/normalize-options.spec.ts index b15bba233259b..d5ce9890f9d11 100644 --- a/packages/next/src/generators/library/lib/normalize-options.spec.ts +++ b/packages/next/src/generators/library/lib/normalize-options.spec.ts @@ -1,5 +1,5 @@ import type { Tree } from '@nx/devkit'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; import { normalizeOptions } from './normalize-options'; diff --git a/packages/next/src/generators/library/library.spec.ts b/packages/next/src/generators/library/library.spec.ts index cd9a878e32075..b8992922e457e 100644 --- a/packages/next/src/generators/library/library.spec.ts +++ b/packages/next/src/generators/library/library.spec.ts @@ -1,7 +1,7 @@ import { installedCypressVersion } from '@nx/cypress/src/utils/cypress-version'; import { readJson } from '@nx/devkit'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import libraryGenerator from './library'; import { Schema } from './schema'; diff --git a/packages/next/src/generators/library/schema.d.ts b/packages/next/src/generators/library/schema.d.ts index ca0d398c6a587..08c05a2e0629b 100644 --- a/packages/next/src/generators/library/schema.d.ts +++ b/packages/next/src/generators/library/schema.d.ts @@ -1,5 +1,5 @@ import type { ProjectNameAndRootFormat } from '@nx/devkit/src/generators/project-name-directory-utils'; -import type { Linter } from '@nx/linter'; +import type { Linter } from '@nx/eslint'; import type { SupportedStyles } from '@nx/react'; export interface Schema { diff --git a/packages/node/package.json b/packages/node/package.json index fb042aca55f20..034d3f158324b 100644 --- a/packages/node/package.json +++ b/packages/node/package.json @@ -34,7 +34,7 @@ "@nx/devkit": "file:../devkit", "@nx/jest": "file:../jest", "@nx/js": "file:../js", - "@nx/linter": "file:../linter" + "@nx/eslint": "file:../eslint" }, "publishConfig": { "access": "public" diff --git a/packages/node/src/generators/application/application.spec.ts b/packages/node/src/generators/application/application.spec.ts index 61dd038c57fff..4ab6e7ab8f85a 100644 --- a/packages/node/src/generators/application/application.spec.ts +++ b/packages/node/src/generators/application/application.spec.ts @@ -69,7 +69,7 @@ describe('app', () => { }) ); expect(project.targets.lint).toEqual({ - executor: '@nx/linter:eslint', + executor: '@nx/eslint:lint', outputs: ['{options.outputFile}'], options: { lintFilePatterns: ['my-node-app/**/*.ts'], @@ -193,7 +193,7 @@ describe('app', () => { expect(project.root).toEqual('my-dir/my-node-app'); expect(project.targets.lint).toEqual({ - executor: '@nx/linter:eslint', + executor: '@nx/eslint:lint', outputs: ['{options.outputFile}'], options: { lintFilePatterns: ['my-dir/my-node-app/**/*.ts'], @@ -283,7 +283,7 @@ describe('app', () => { expect(project.targets.test).toBeUndefined(); expect(project.targets.lint).toMatchInlineSnapshot(` { - "executor": "@nx/linter:eslint", + "executor": "@nx/eslint:lint", "options": { "lintFilePatterns": [ "my-node-app/**/*.ts", diff --git a/packages/node/src/generators/application/application.ts b/packages/node/src/generators/application/application.ts index 195fa6230e600..939ce5b14429c 100644 --- a/packages/node/src/generators/application/application.ts +++ b/packages/node/src/generators/application/application.ts @@ -23,8 +23,8 @@ import { determineProjectNameAndRootOptions } from '@nx/devkit/src/generators/pr import { configurationGenerator } from '@nx/jest'; import { getRelativePathToRootTsConfig, tsConfigBaseOptions } from '@nx/js'; import { esbuildVersion } from '@nx/js/src/utils/versions'; -import { Linter, lintProjectGenerator } from '@nx/linter'; -import { mapLintPattern } from '@nx/linter/src/generators/lint-project/lint-project'; +import { Linter, lintProjectGenerator } from '@nx/eslint'; +import { mapLintPattern } from '@nx/eslint/src/generators/lint-project/lint-project'; import { join } from 'path'; import { expressTypingsVersion, diff --git a/packages/node/src/generators/application/schema.d.ts b/packages/node/src/generators/application/schema.d.ts index 5f7de5dae1b58..a38e4ed97f85a 100644 --- a/packages/node/src/generators/application/schema.d.ts +++ b/packages/node/src/generators/application/schema.d.ts @@ -1,5 +1,5 @@ import type { ProjectNameAndRootFormat } from '@nx/devkit/src/generators/project-name-and-root-utils'; -import type { Linter } from '@nx/linter'; +import type { Linter } from '@nx/eslint'; export interface Schema { name: string; diff --git a/packages/node/src/generators/e2e-project/e2e-project.ts b/packages/node/src/generators/e2e-project/e2e-project.ts index 3acac02165a74..aa84f6ac95b7f 100644 --- a/packages/node/src/generators/e2e-project/e2e-project.ts +++ b/packages/node/src/generators/e2e-project/e2e-project.ts @@ -12,11 +12,11 @@ import { Tree, } from '@nx/devkit'; import { determineProjectNameAndRootOptions } from '@nx/devkit/src/generators/project-name-and-root-utils'; -import { Linter, lintProjectGenerator } from '@nx/linter'; +import { Linter, lintProjectGenerator } from '@nx/eslint'; import { javaScriptOverride, typeScriptOverride, -} from '@nx/linter/src/generators/init/global-eslint-config'; +} from '@nx/eslint/src/generators/init/global-eslint-config'; import * as path from 'path'; import { axiosVersion } from '../../utils/versions'; import { Schema } from './schema'; @@ -24,7 +24,7 @@ import { addPluginsToLintConfig, isEslintConfigSupported, replaceOverridesInLintConfig, -} from '@nx/linter/src/generators/utils/eslint-file'; +} from '@nx/eslint/src/generators/utils/eslint-file'; export async function e2eProjectGenerator(host: Tree, options: Schema) { return await e2eProjectGeneratorInternal(host, { diff --git a/packages/node/src/generators/library/library.spec.ts b/packages/node/src/generators/library/library.spec.ts index a3e39f4a2bac9..57f5688f4b657 100644 --- a/packages/node/src/generators/library/library.spec.ts +++ b/packages/node/src/generators/library/library.spec.ts @@ -29,7 +29,7 @@ describe('lib', () => { expect(configuration.root).toEqual('my-lib'); expect(configuration.targets.build).toBeUndefined(); expect(configuration.targets.lint).toEqual({ - executor: '@nx/linter:eslint', + executor: '@nx/eslint:lint', outputs: ['{options.outputFile}'], options: { lintFilePatterns: ['my-lib/**/*.ts'], @@ -229,7 +229,7 @@ describe('lib', () => { const project = readProjectConfiguration(tree, 'my-lib'); expect(project.root).toEqual('my-dir/my-lib'); expect(project.targets.lint).toEqual({ - executor: '@nx/linter:eslint', + executor: '@nx/eslint:lint', outputs: ['{options.outputFile}'], options: { lintFilePatterns: ['my-dir/my-lib/**/*.ts'], diff --git a/packages/node/src/generators/library/schema.d.ts b/packages/node/src/generators/library/schema.d.ts index f277e7d848d58..4994e127b9382 100644 --- a/packages/node/src/generators/library/schema.d.ts +++ b/packages/node/src/generators/library/schema.d.ts @@ -1,5 +1,5 @@ import type { ProjectNameAndRootFormat } from '@nx/devkit/src/generators/project-name-and-root-utils'; -import type { Linter } from '@nx/linter'; +import type { Linter } from '@nx/eslint'; export interface Schema { name: string; diff --git a/packages/nx/package.json b/packages/nx/package.json index a2d5acd0f541a..cc13a901ad2a7 100644 --- a/packages/nx/package.json +++ b/packages/nx/package.json @@ -100,7 +100,7 @@ "@nrwl/js", "@nx/jest", "@nrwl/jest", - "@nx/linter", + "@nx/eslint", "@nrwl/linter", "@nx/workspace", "@nrwl/workspace", diff --git a/packages/nx/src/adapter/ngcli-adapter.ts b/packages/nx/src/adapter/ngcli-adapter.ts index a9f5c469ec647..d6348c3b34264 100644 --- a/packages/nx/src/adapter/ngcli-adapter.ts +++ b/packages/nx/src/adapter/ngcli-adapter.ts @@ -195,7 +195,7 @@ export async function scheduleTarget( tap( (output) => (lastOutputError = !output.success ? output.error : undefined), - (error) => {}, // do nothing, this could be an intentional error + (error) => { }, // do nothing, this could be an intentional error () => { lastOutputError ? logger.error(lastOutputError) : 0; } @@ -253,10 +253,9 @@ async function createRecorder( if (event.kind === 'error') { record.error = true; logger.warn( - `ERROR! ${eventPath} ${ - event.description == 'alreadyExist' - ? 'already exists' - : 'does not exist.' + `ERROR! ${eventPath} ${event.description == 'alreadyExist' + ? 'already exists' + : 'does not exist.' }.` ); } else if (event.kind === 'update') { @@ -513,8 +512,8 @@ export class NxScopedHost extends virtualFs.ScopedHost { concatMap((r) => r ? super - .read(path as any) - .pipe(map((r) => parseJson(arrayBufferToString(r)))) + .read(path as any) + .pipe(map((r) => parseJson(arrayBufferToString(r)))) : of(null) ) ); @@ -848,12 +847,12 @@ export function wrapAngularDevkitSchematic( } const emptyLogger = { - log: (e) => {}, - info: (e) => {}, - warn: (e) => {}, - debug: () => {}, - error: (e) => {}, - fatal: (e) => {}, + log: (e) => { }, + info: (e) => { }, + warn: (e) => { }, + debug: () => { }, + error: (e) => { }, + fatal: (e) => { }, } as any; emptyLogger.createChild = () => emptyLogger; @@ -1084,16 +1083,16 @@ async function getWrappedWorkspaceNodeModulesArchitectHost( const batchImplementationFactory = executorConfig.batchImplementation ? this.getImplementationFactory( - executorConfig.batchImplementation, - executorsDir - ) + executorConfig.batchImplementation, + executorsDir + ) : null; const hasherFactory = executorConfig.hasher ? this.getImplementationFactory( - executorConfig.hasher, - executorsDir - ) + executorConfig.hasher, + executorsDir + ) : null; return { diff --git a/packages/nx/src/command-line/init/implementation/add-nx-to-nest.ts b/packages/nx/src/command-line/init/implementation/add-nx-to-nest.ts index 8d9dab0119d33..aa647d07cb160 100644 --- a/packages/nx/src/command-line/init/implementation/add-nx-to-nest.ts +++ b/packages/nx/src/command-line/init/implementation/add-nx-to-nest.ts @@ -235,7 +235,7 @@ function createProjectJson( // lint json.targets['lint'] = { - executor: '@nx/linter:eslint', + executor: '@nx/eslint:lint', outputs: ['{options.outputFile}'], options: { lintFilePatterns: ['src/**/*.ts', 'test/**/*.ts'], diff --git a/packages/nx/src/utils/plugins/core-plugins.ts b/packages/nx/src/utils/plugins/core-plugins.ts index a2c473cde0861..c545b7685483d 100644 --- a/packages/nx/src/utils/plugins/core-plugins.ts +++ b/packages/nx/src/utils/plugins/core-plugins.ts @@ -37,7 +37,7 @@ export function fetchCorePlugins(): CorePlugin[] { capabilities: 'executors,generators', }, { - name: '@nx/linter', + name: '@nx/eslint', capabilities: 'executors,generators', }, { diff --git a/packages/playwright/package.json b/packages/playwright/package.json index ac5338062d8b5..b5ba99daef10d 100644 --- a/packages/playwright/package.json +++ b/packages/playwright/package.json @@ -33,7 +33,7 @@ }, "dependencies": { "@nx/devkit": "file:../devkit", - "@nx/linter": "file:../linter", + "@nx/eslint": "file:../eslint", "tslib": "^2.3.0" }, "peerDependencies": { diff --git a/packages/playwright/src/generators/configuration/schema.d.ts b/packages/playwright/src/generators/configuration/schema.d.ts index f3e88dcf1a7e4..2701b8ae27bb7 100644 --- a/packages/playwright/src/generators/configuration/schema.d.ts +++ b/packages/playwright/src/generators/configuration/schema.d.ts @@ -1,4 +1,4 @@ -import type { Linter } from '@nx/linter'; +import type { Linter } from '@nx/eslint'; export interface ConfigurationGeneratorSchema { project: string; diff --git a/packages/playwright/src/utils/add-linter.ts b/packages/playwright/src/utils/add-linter.ts index b14d133411991..dc1354f891fd9 100644 --- a/packages/playwright/src/utils/add-linter.ts +++ b/packages/playwright/src/utils/add-linter.ts @@ -6,8 +6,8 @@ import { runTasksInSerial, Tree, } from '@nx/devkit'; -import { Linter, lintProjectGenerator } from '@nx/linter'; -import { javaScriptOverride } from '@nx/linter/src/generators/init/global-eslint-config'; +import { Linter, lintProjectGenerator } from '@nx/eslint'; +import { javaScriptOverride } from '@nx/eslint/src/generators/init/global-eslint-config'; import { eslintPluginPlaywrightVersion } from './versions'; import { addExtendsToLintConfig, @@ -15,7 +15,7 @@ import { addPluginsToLintConfig, findEslintFile, isEslintConfigSupported, -} from '@nx/linter/src/generators/utils/eslint-file'; +} from '@nx/eslint/src/generators/utils/eslint-file'; export interface PlaywrightLinterOptions { project: string; diff --git a/packages/plugin/package.json b/packages/plugin/package.json index c4270f0d1ab0a..44823b513cf94 100644 --- a/packages/plugin/package.json +++ b/packages/plugin/package.json @@ -34,7 +34,7 @@ "@nx/devkit": "file:../devkit", "@nx/jest": "file:../jest", "@nx/js": "file:../js", - "@nx/linter": "file:../linter" + "@nx/eslint": "file:../eslint" }, "publishConfig": { "access": "public" diff --git a/packages/plugin/src/generators/create-package/create-package.spec.ts b/packages/plugin/src/generators/create-package/create-package.spec.ts index d2aca60feb035..b76013fca5ff3 100644 --- a/packages/plugin/src/generators/create-package/create-package.spec.ts +++ b/packages/plugin/src/generators/create-package/create-package.spec.ts @@ -5,7 +5,7 @@ import { Tree, } from '@nx/devkit'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import { PackageJson } from 'nx/src/utils/package-json'; import pluginGenerator from '../plugin/plugin'; import { createPackageGenerator } from './create-package'; diff --git a/packages/plugin/src/generators/create-package/schema.d.ts b/packages/plugin/src/generators/create-package/schema.d.ts index 1683b5f6e4a44..35acb9a68601c 100644 --- a/packages/plugin/src/generators/create-package/schema.d.ts +++ b/packages/plugin/src/generators/create-package/schema.d.ts @@ -1,5 +1,5 @@ import type { ProjectNameAndRootFormat } from '@nx/devkit/src/generators/project-name-directory-utils'; -import type { Linter } from '@nx/linter'; +import type { Linter } from '@nx/eslint'; export interface CreatePackageSchema { name: string; diff --git a/packages/plugin/src/generators/e2e-project/e2e.spec.ts b/packages/plugin/src/generators/e2e-project/e2e.spec.ts index c3fbd1da9f8bc..6e8e0a1ec366c 100644 --- a/packages/plugin/src/generators/e2e-project/e2e.spec.ts +++ b/packages/plugin/src/generators/e2e-project/e2e.spec.ts @@ -169,7 +169,7 @@ describe('NxPlugin e2e-project Generator', () => { const projectsConfigurations = getProjects(tree); expect(projectsConfigurations.get('my-plugin-e2e').targets.lint).toEqual({ - executor: '@nx/linter:eslint', + executor: '@nx/eslint:lint', outputs: ['{options.outputFile}'], options: { lintFilePatterns: ['apps/my-plugin-e2e/**/*.ts'], diff --git a/packages/plugin/src/generators/e2e-project/e2e.ts b/packages/plugin/src/generators/e2e-project/e2e.ts index 11811296957f2..b4a50e7809527 100644 --- a/packages/plugin/src/generators/e2e-project/e2e.ts +++ b/packages/plugin/src/generators/e2e-project/e2e.ts @@ -20,7 +20,7 @@ import { addPropertyToJestConfig, configurationGenerator } from '@nx/jest'; import { getRelativePathToRootTsConfig } from '@nx/js'; import { setupVerdaccio } from '@nx/js/src/generators/setup-verdaccio/generator'; import { addLocalRegistryScripts } from '@nx/js/src/utils/add-local-registry-scripts'; -import { Linter, lintProjectGenerator } from '@nx/linter'; +import { Linter, lintProjectGenerator } from '@nx/eslint'; import { join } from 'path'; import type { Schema } from './schema'; diff --git a/packages/plugin/src/generators/e2e-project/schema.d.ts b/packages/plugin/src/generators/e2e-project/schema.d.ts index 2e2b5c437aecf..ef0497c712ca9 100644 --- a/packages/plugin/src/generators/e2e-project/schema.d.ts +++ b/packages/plugin/src/generators/e2e-project/schema.d.ts @@ -1,5 +1,5 @@ import type { ProjectNameAndRootFormat } from '@nx/devkit/src/generators/project-name-directory-utils'; -import type { Linter } from '@nx/linter'; +import type { Linter } from '@nx/eslint'; export interface Schema { pluginName: string; diff --git a/packages/plugin/src/generators/lint-checks/generator.spec.ts b/packages/plugin/src/generators/lint-checks/generator.spec.ts index 8ce875b7b789a..3b6c4afaa115d 100644 --- a/packages/plugin/src/generators/lint-checks/generator.spec.ts +++ b/packages/plugin/src/generators/lint-checks/generator.spec.ts @@ -9,8 +9,8 @@ import { } from '@nx/devkit'; import type { Linter as ESLint } from 'eslint'; -import { Linter } from '@nx/linter'; -import { Schema as EsLintExecutorOptions } from '@nx/linter/src/executors/eslint/schema'; +import { Linter } from '@nx/eslint'; +import { Schema as EsLintExecutorOptions } from '@nx/eslint/src/executors/eslint/schema'; import generator from './generator'; import pluginGenerator from '../plugin/plugin'; diff --git a/packages/plugin/src/generators/lint-checks/generator.ts b/packages/plugin/src/generators/lint-checks/generator.ts index 16345f6715375..87a224b08c32c 100644 --- a/packages/plugin/src/generators/lint-checks/generator.ts +++ b/packages/plugin/src/generators/lint-checks/generator.ts @@ -12,7 +12,7 @@ import { writeJson, } from '@nx/devkit'; -import type { Schema as EsLintExecutorOptions } from '@nx/linter/src/executors/eslint/schema'; +import type { Schema as EsLintExecutorOptions } from '@nx/eslint/src/executors/lint/schema'; import { PluginLintChecksGeneratorSchema } from './schema'; import { NX_PREFIX } from 'nx/src/utils/logger'; @@ -22,8 +22,8 @@ import { isEslintConfigSupported, lintConfigHasOverride, updateOverrideInLintConfig, -} from '@nx/linter/src/generators/utils/eslint-file'; -import { useFlatConfig } from '@nx/linter/src/utils/flat-config'; +} from '@nx/eslint/src/generators/utils/eslint-file'; +import { useFlatConfig } from '@nx/eslint/src/utils/flat-config'; export default async function pluginLintCheckGenerator( host: Tree, @@ -135,6 +135,7 @@ function updateProjectTarget( for (const [target, configuration] of Object.entries(project.targets)) { if ( + configuration.executor === '@nx/eslint:lint' || configuration.executor === '@nx/linter:eslint' || configuration.executor === '@nrwl/linter:eslint' ) { @@ -292,6 +293,8 @@ export function getEsLintOptions( ): [target: string, configuration: TargetConfiguration] { return Object.entries(project.targets || {}).find( ([, x]) => - x.executor === '@nx/linter:eslint' || x.executor === '@nrwl/linter:eslint' + x.executor === '@nx/eslint:lint' || + x.executor === '@nx/linter:eslint' || + x.executor === '@nrwl/linter:eslint' ); } diff --git a/packages/plugin/src/generators/plugin/plugin.spec.ts b/packages/plugin/src/generators/plugin/plugin.spec.ts index b00754dc14ed9..20ca43d2d73a4 100644 --- a/packages/plugin/src/generators/plugin/plugin.spec.ts +++ b/packages/plugin/src/generators/plugin/plugin.spec.ts @@ -6,7 +6,7 @@ import { Tree, } from '@nx/devkit'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import { PackageJson } from 'nx/src/utils/package-json'; import { pluginGenerator } from './plugin'; import { Schema } from './schema'; @@ -68,7 +68,7 @@ describe('NxPlugin Plugin Generator', () => { }, }); expect(project.targets.lint).toEqual({ - executor: '@nx/linter:eslint', + executor: '@nx/eslint:lint', outputs: ['{options.outputFile}'], options: { lintFilePatterns: expect.arrayContaining([ diff --git a/packages/plugin/src/generators/plugin/plugin.ts b/packages/plugin/src/generators/plugin/plugin.ts index bab8142284d0b..cbdeca0d85782 100644 --- a/packages/plugin/src/generators/plugin/plugin.ts +++ b/packages/plugin/src/generators/plugin/plugin.ts @@ -12,7 +12,7 @@ import { } from '@nx/devkit'; import { libraryGenerator as jsLibraryGenerator } from '@nx/js'; import { addSwcDependencies } from '@nx/js/src/utils/swc/add-swc-dependencies'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import * as path from 'path'; import { e2eProjectGenerator } from '../e2e-project/e2e'; import pluginLintCheckGenerator from '../lint-checks/generator'; diff --git a/packages/plugin/src/generators/plugin/schema.d.ts b/packages/plugin/src/generators/plugin/schema.d.ts index 0b77a9be7fc56..470fa7f14f362 100644 --- a/packages/plugin/src/generators/plugin/schema.d.ts +++ b/packages/plugin/src/generators/plugin/schema.d.ts @@ -1,5 +1,5 @@ import type { ProjectNameAndRootFormat } from '@nx/devkit/src/generators/project-name-directory-utils'; -import type { Linter } from '@nx/linter'; +import type { Linter } from '@nx/eslint'; export interface Schema { name: string; diff --git a/packages/plugin/src/generators/preset/generator.ts b/packages/plugin/src/generators/preset/generator.ts index 47769716d5b06..5f9478cbf8dcd 100644 --- a/packages/plugin/src/generators/preset/generator.ts +++ b/packages/plugin/src/generators/preset/generator.ts @@ -8,7 +8,7 @@ import { GeneratorCallback, names, } from '@nx/devkit'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import { PackageJson } from 'nx/src/utils/package-json'; import { pluginGenerator } from '../plugin/plugin'; import { PresetGeneratorSchema } from './schema'; diff --git a/packages/plugin/src/migrations/update-15-0-0/specify-output-capture.spec.ts b/packages/plugin/src/migrations/update-15-0-0/specify-output-capture.spec.ts index 6ec8486e616fb..cc9167fc4bdae 100644 --- a/packages/plugin/src/migrations/update-15-0-0/specify-output-capture.spec.ts +++ b/packages/plugin/src/migrations/update-15-0-0/specify-output-capture.spec.ts @@ -1,6 +1,6 @@ import { readJson, updateJson } from '@nx/devkit'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import { assertRunsAgainstNxRepo } from '@nx/devkit/internal-testing-utils'; import { ExecutorConfig } from 'nx/src/config/misc-interfaces'; import executorGenerator from '../../generators/executor/executor'; diff --git a/packages/plugin/src/migrations/update-16-0-0/cli-in-schema-json.spec.ts b/packages/plugin/src/migrations/update-16-0-0/cli-in-schema-json.spec.ts index 77c49e508bbd4..8e021a2463995 100644 --- a/packages/plugin/src/migrations/update-16-0-0/cli-in-schema-json.spec.ts +++ b/packages/plugin/src/migrations/update-16-0-0/cli-in-schema-json.spec.ts @@ -10,7 +10,7 @@ import { writeJson, } from '@nx/devkit'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import { assertRunsAgainstNxRepo } from '@nx/devkit/internal-testing-utils'; import { PackageJson } from 'nx/src/utils/package-json'; import executorGenerator from '../../generators/executor/executor'; diff --git a/packages/react-native/package.json b/packages/react-native/package.json index a2053e828e42c..750392fb29158 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -40,7 +40,7 @@ "@nx/devkit": "file:../devkit", "@nx/jest": "file:../jest", "@nx/js": "file:../js", - "@nx/linter": "file:../linter", + "@nx/eslint": "file:../eslint", "@nx/react": "file:../react", "@nx/workspace": "file:../workspace" }, diff --git a/packages/react-native/src/generators/application/application.spec.ts b/packages/react-native/src/generators/application/application.spec.ts index eb234bee90489..450d2ed8a27d8 100644 --- a/packages/react-native/src/generators/application/application.spec.ts +++ b/packages/react-native/src/generators/application/application.spec.ts @@ -5,7 +5,7 @@ import { readProjectConfiguration, } from '@nx/devkit'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import { reactNativeApplicationGenerator } from './application'; describe('app', () => { diff --git a/packages/react-native/src/generators/application/lib/add-detox.ts b/packages/react-native/src/generators/application/lib/add-detox.ts index 981a118169afc..e3ebc558b25d1 100644 --- a/packages/react-native/src/generators/application/lib/add-detox.ts +++ b/packages/react-native/src/generators/application/lib/add-detox.ts @@ -1,7 +1,7 @@ import { detoxApplicationGenerator } from '@nx/detox'; import { Tree } from '@nx/devkit'; import { NormalizedSchema } from './normalize-options'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; export async function addDetox(host: Tree, options: NormalizedSchema) { if (options?.e2eTestRunner !== 'detox') { diff --git a/packages/react-native/src/generators/application/lib/nomalize-options.spec.ts b/packages/react-native/src/generators/application/lib/nomalize-options.spec.ts index f2c7c13bb6339..c3075e9f65f41 100644 --- a/packages/react-native/src/generators/application/lib/nomalize-options.spec.ts +++ b/packages/react-native/src/generators/application/lib/nomalize-options.spec.ts @@ -1,6 +1,6 @@ import { Tree } from '@nx/devkit'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import { Schema } from '../schema'; import { normalizeOptions } from './normalize-options'; diff --git a/packages/react-native/src/generators/application/schema.d.ts b/packages/react-native/src/generators/application/schema.d.ts index fa553bc5c4dcd..749b5897f45cb 100644 --- a/packages/react-native/src/generators/application/schema.d.ts +++ b/packages/react-native/src/generators/application/schema.d.ts @@ -1,5 +1,5 @@ import type { ProjectNameAndRootFormat } from '@nx/devkit/src/generators/project-name-and-root-utils'; -import type { Linter } from '@nx/linter'; +import type { Linter } from '@nx/eslint'; export interface Schema { name: string; diff --git a/packages/react-native/src/generators/component-story/component-story.spec.ts b/packages/react-native/src/generators/component-story/component-story.spec.ts index 29a4e1b4caaa0..dfb22bd2f8a61 100644 --- a/packages/react-native/src/generators/component-story/component-story.spec.ts +++ b/packages/react-native/src/generators/component-story/component-story.spec.ts @@ -1,7 +1,7 @@ import { getProjects, Tree, updateProjectConfiguration } from '@nx/devkit'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; import componentStoryGenerator from './component-story'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import { formatFile } from '../../utils/format-file'; import libraryGenerator from '../library/library'; @@ -75,9 +75,9 @@ describe('react-native:component-story', () => { appTree.write( 'test-ui-lib/src/lib/test-ui-libplain.jsx', `import React from 'react'; - + import './test.scss'; - + export const Test = () => { return (
@@ -85,8 +85,8 @@ describe('react-native:component-story', () => {
); }; - - export default Test; + + export default Test; ` ); @@ -117,7 +117,7 @@ describe('react-native:component-story', () => { `import React from 'react'; import { View, Text } from 'react-native'; - + export function Test() { return ( @@ -125,8 +125,8 @@ describe('react-native:component-story', () => { ); } - - export default Test; + + export default Test; ` ); await componentStoryGenerator(appTree, { @@ -178,14 +178,14 @@ describe('react-native:component-story', () => { `import React from 'react'; export type ButtonStyle = 'default' | 'primary' | 'warning'; - + export interface TestProps { name: string; displayAge: boolean; someAction: (e: unknown) => void; style: ButtonStyle; } - + export const Test = (props: TestProps) => { return (
@@ -194,8 +194,8 @@ describe('react-native:component-story', () => {
); }; - - export default Test; + + export default Test; ` ); @@ -337,12 +337,12 @@ describe('react-native:component-story', () => { appTree.write( cmpPath, `import React from 'react'; - + export interface TestProps { name: string; displayAge: boolean; } - + ${config.src} ` ); diff --git a/packages/react-native/src/generators/library/library.spec.ts b/packages/react-native/src/generators/library/library.spec.ts index 32cfa2a57a761..77eb8883ce35f 100644 --- a/packages/react-native/src/generators/library/library.spec.ts +++ b/packages/react-native/src/generators/library/library.spec.ts @@ -6,7 +6,7 @@ import { } from '@nx/devkit'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; import libraryGenerator from './library'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import { Schema } from './schema'; describe('lib', () => { @@ -34,7 +34,7 @@ describe('lib', () => { expect(projectConfiguration.root).toEqual('my-lib'); expect(projectConfiguration.targets.build).toBeUndefined(); expect(projectConfiguration.targets.lint).toEqual({ - executor: '@nx/linter:eslint', + executor: '@nx/eslint:lint', outputs: ['{options.outputFile}'], options: { lintFilePatterns: ['my-lib/**/*.{ts,tsx,js,jsx}'], @@ -155,7 +155,7 @@ describe('lib', () => { expect(projectConfiguration.root).toEqual('my-dir'); expect(projectConfiguration.targets.lint).toEqual({ - executor: '@nx/linter:eslint', + executor: '@nx/eslint:lint', outputs: ['{options.outputFile}'], options: { lintFilePatterns: ['my-dir/**/*.{ts,tsx,js,jsx}'], @@ -225,7 +225,7 @@ describe('lib', () => { const projectConfiguration = readProjectConfiguration(appTree, 'my-lib'); expect(projectConfiguration.targets.test).toBeUndefined(); expect(projectConfiguration.targets.lint).toMatchObject({ - executor: '@nx/linter:eslint', + executor: '@nx/eslint:lint', options: { lintFilePatterns: ['my-lib/**/*.{ts,tsx,js,jsx}'], }, diff --git a/packages/react-native/src/generators/library/schema.d.ts b/packages/react-native/src/generators/library/schema.d.ts index b4ae7b807f59d..e515465f19982 100644 --- a/packages/react-native/src/generators/library/schema.d.ts +++ b/packages/react-native/src/generators/library/schema.d.ts @@ -1,5 +1,5 @@ import type { ProjectNameAndRootFormat } from '@nx/devkit/src/generators/project-name-and-root-utils'; -import type { Linter } from '@nx/linter'; +import type { Linter } from '@nx/eslint'; /** * Same as the @nx/react library schema, except it removes keys: style, component, routing, appProject diff --git a/packages/react-native/src/generators/stories/stories-app.spec.ts b/packages/react-native/src/generators/stories/stories-app.spec.ts index 52a4ae7487b08..6b971efac5e3b 100644 --- a/packages/react-native/src/generators/stories/stories-app.spec.ts +++ b/packages/react-native/src/generators/stories/stories-app.spec.ts @@ -2,7 +2,7 @@ import { Tree } from '@nx/devkit'; import storiesGenerator from './stories'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; import applicationGenerator from '../application/application'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import { reactNativeComponentGenerator } from '../component/component'; describe('react:stories for applications', () => { diff --git a/packages/react-native/src/generators/stories/stories-lib.spec.ts b/packages/react-native/src/generators/stories/stories-lib.spec.ts index 8c16586ab6337..d9337b4069cd8 100644 --- a/packages/react-native/src/generators/stories/stories-lib.spec.ts +++ b/packages/react-native/src/generators/stories/stories-lib.spec.ts @@ -2,7 +2,7 @@ import { Tree } from '@nx/devkit'; import storiesGenerator from './stories'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; import applicationGenerator from '../application/application'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import libraryGenerator from '../library/library'; import reactNativeComponentGenerator from '../component/component'; diff --git a/packages/react-native/src/generators/storybook-configuration/configuration.spec.ts b/packages/react-native/src/generators/storybook-configuration/configuration.spec.ts index 98722e9af32ee..ee57a0ac5effd 100644 --- a/packages/react-native/src/generators/storybook-configuration/configuration.spec.ts +++ b/packages/react-native/src/generators/storybook-configuration/configuration.spec.ts @@ -1,6 +1,6 @@ import { Tree } from '@nx/devkit'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import { logger } from '@nx/devkit'; import libraryGenerator from '../library/library'; diff --git a/packages/react-native/src/generators/storybook-configuration/schema.d.ts b/packages/react-native/src/generators/storybook-configuration/schema.d.ts index 74cb2eb735630..6df0723281297 100644 --- a/packages/react-native/src/generators/storybook-configuration/schema.d.ts +++ b/packages/react-native/src/generators/storybook-configuration/schema.d.ts @@ -1,4 +1,4 @@ -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; export interface StorybookConfigureSchema { name: string; diff --git a/packages/react-native/src/generators/upgrade-native/schema.d.ts b/packages/react-native/src/generators/upgrade-native/schema.d.ts index dd8403a234a5e..a492a56913a7d 100644 --- a/packages/react-native/src/generators/upgrade-native/schema.d.ts +++ b/packages/react-native/src/generators/upgrade-native/schema.d.ts @@ -1,4 +1,4 @@ -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; export interface UpgradeNativeConfigureSchema { name: string; diff --git a/packages/react-native/src/utils/add-linting.spec.ts b/packages/react-native/src/utils/add-linting.spec.ts index f233d7bf1307f..03fa628105fa1 100644 --- a/packages/react-native/src/utils/add-linting.spec.ts +++ b/packages/react-native/src/utils/add-linting.spec.ts @@ -1,6 +1,6 @@ import { readProjectConfiguration, Tree } from '@nx/devkit'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import { libraryGenerator } from '@nx/js'; import { addLinting } from './add-linting'; @@ -25,7 +25,7 @@ describe('Add Linting', () => { const project = readProjectConfiguration(tree, 'my-lib'); expect(project.targets.lint).toBeDefined(); - expect(project.targets.lint.executor).toEqual('@nx/linter:eslint'); + expect(project.targets.lint.executor).toEqual('@nx/eslint:lint'); }); it('should not add lint target when "none" is passed', async () => { diff --git a/packages/react-native/src/utils/add-linting.ts b/packages/react-native/src/utils/add-linting.ts index cc3617e4d5e27..332a7293bee4e 100644 --- a/packages/react-native/src/utils/add-linting.ts +++ b/packages/react-native/src/utils/add-linting.ts @@ -1,4 +1,4 @@ -import { Linter, lintProjectGenerator } from '@nx/linter'; +import { Linter, lintProjectGenerator } from '@nx/eslint'; import { addDependenciesToPackageJson, GeneratorCallback, @@ -10,7 +10,7 @@ import { addExtendsToLintConfig, addIgnoresToLintConfig, isEslintConfigSupported, -} from '@nx/linter/src/generators/utils/eslint-file'; +} from '@nx/eslint/src/generators/utils/eslint-file'; interface NormalizedSchema { linter?: Linter; diff --git a/packages/react-native/src/utils/testing-generators.ts b/packages/react-native/src/utils/testing-generators.ts index ca6cb58f730b5..883bfeca750d0 100644 --- a/packages/react-native/src/utils/testing-generators.ts +++ b/packages/react-native/src/utils/testing-generators.ts @@ -1,6 +1,6 @@ import { addProjectConfiguration, names, Tree } from '@nx/devkit'; import applicationGenerator from '../generators/application/application'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; export async function createApp(tree: Tree, appName: string): Promise { await applicationGenerator(tree, { diff --git a/packages/react/package.json b/packages/react/package.json index 21b6a5b45caa4..72e72e444bbc5 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -39,7 +39,7 @@ "tslib": "^2.3.0", "@nx/devkit": "file:../devkit", "@nx/js": "file:../js", - "@nx/linter": "file:../linter", + "@nx/eslint": "file:../eslint", "@nx/web": "file:../web" }, "publishConfig": { diff --git a/packages/react/src/generators/application/application.spec.ts b/packages/react/src/generators/application/application.spec.ts index ac1f42bea53ec..82735dc73959d 100644 --- a/packages/react/src/generators/application/application.spec.ts +++ b/packages/react/src/generators/application/application.spec.ts @@ -8,7 +8,7 @@ import { updateNxJson, } from '@nx/devkit'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import { applicationGenerator } from './application'; import { Schema } from './schema'; // need to mock cypress otherwise it'll use the nx installed version from package.json @@ -463,7 +463,7 @@ describe('app', () => { const projectsConfigurations = getProjects(appTree); expect(projectsConfigurations.get('my-app').targets.lint).toEqual({ - executor: '@nx/linter:eslint', + executor: '@nx/eslint:lint', outputs: ['{options.outputFile}'], options: { lintFilePatterns: ['my-app/**/*.{ts,tsx,js,jsx}'], @@ -487,7 +487,7 @@ describe('app', () => { expect(projectsConfigurations.get('my-app').targets.lint) .toMatchInlineSnapshot(` { - "executor": "@nx/linter:eslint", + "executor": "@nx/eslint:lint", "options": { "lintFilePatterns": [ "my-app/**/*.{ts,tsx,js,jsx}", @@ -570,7 +570,7 @@ describe('app', () => { const packageJson = readJson(appTree, '/package.json'); expect(packageJson.devDependencies.eslint).toBeDefined(); - expect(packageJson.devDependencies['@nx/linter']).toBeDefined(); + expect(packageJson.devDependencies['@nx/eslint']).toBeDefined(); expect(packageJson.devDependencies['@nx/eslint-plugin']).toBeDefined(); expect(packageJson.devDependencies['eslint-plugin-react']).toBeDefined(); expect( diff --git a/packages/react/src/generators/application/application.ts b/packages/react/src/generators/application/application.ts index 4fc587c915780..83c8c4b1422d2 100644 --- a/packages/react/src/generators/application/application.ts +++ b/packages/react/src/generators/application/application.ts @@ -21,8 +21,8 @@ import { } from '@nx/devkit'; import reactInitGenerator from '../init/init'; -import { Linter, lintProjectGenerator } from '@nx/linter'; -import { mapLintPattern } from '@nx/linter/src/generators/lint-project/lint-project'; +import { Linter, lintProjectGenerator } from '@nx/eslint'; +import { mapLintPattern } from '@nx/eslint/src/generators/lint-project/lint-project'; import { babelLoaderVersion, nxRspackVersion, @@ -37,7 +37,7 @@ import { addE2e } from './lib/add-e2e'; import { addExtendsToLintConfig, isEslintConfigSupported, -} from '@nx/linter/src/generators/utils/eslint-file'; +} from '@nx/eslint/src/generators/utils/eslint-file'; async function addLinting(host: Tree, options: NormalizedSchema) { const tasks: GeneratorCallback[] = []; diff --git a/packages/react/src/generators/application/schema.d.ts b/packages/react/src/generators/application/schema.d.ts index 7889227778ac5..5b7421d540dc1 100644 --- a/packages/react/src/generators/application/schema.d.ts +++ b/packages/react/src/generators/application/schema.d.ts @@ -1,5 +1,5 @@ import type { ProjectNameAndRootFormat } from '@nx/devkit/src/generators/project-name-and-root-utils'; -import type { Linter } from '@nx/linter'; +import type { Linter } from '@nx/eslint'; import type { SupportedStyles } from '../../../typings/style'; export interface Schema { diff --git a/packages/react/src/generators/component-cypress-spec/component-cypress-spec.spec.ts b/packages/react/src/generators/component-cypress-spec/component-cypress-spec.spec.ts index 940b13ef5c67a..42bb2ac866ebe 100644 --- a/packages/react/src/generators/component-cypress-spec/component-cypress-spec.spec.ts +++ b/packages/react/src/generators/component-cypress-spec/component-cypress-spec.spec.ts @@ -1,6 +1,6 @@ import { Tree } from '@nx/devkit'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import { formatFile } from '../../utils/format-file'; import applicationGenerator from '../application/application'; import libraryGenerator from '../library/library'; @@ -13,14 +13,14 @@ describe('react:component-cypress-spec', () => { { plainJS: false, testCmpSrcWithProps: `import React from 'react'; - + import './test.scss'; - + export interface TestProps { name: string; displayAge: boolean; } - + export const Test = (props: TestProps) => { return (
@@ -28,13 +28,13 @@ describe('react:component-cypress-spec', () => {
); }; - - export default Test; + + export default Test; `, testCmpSrcWithoutProps: `import React from 'react'; - + import './test.scss'; - + export const Test = () => { return (
@@ -42,15 +42,15 @@ describe('react:component-cypress-spec', () => {
); }; - - export default Test; + + export default Test; `, }, { plainJS: true, testCmpSrcWithProps: `import React from 'react'; - - import './test.scss'; + + import './test.scss'; export const Test = (props: TestProps) => { return (
@@ -58,8 +58,8 @@ describe('react:component-cypress-spec', () => {
); }; - - export default Test; + + export default Test; `, testCmpSrcWithoutProps: `import React from 'react'; import './test.scss'; @@ -70,8 +70,8 @@ describe('react:component-cypress-spec', () => { ); }; - - export default Test; + + export default Test; `, }, ].forEach((testConfig) => { @@ -106,7 +106,7 @@ describe('react:component-cypress-spec', () => { ) .toContain(formatFile`describe('test-ui-lib: Test component', () => { beforeEach(() => cy.visit('/iframe.html?id=test--primary&args=name;displayAge:false;')); - + it('should render the component', () => { cy.get('h1').should('contain', 'Welcome to Test!'); }); @@ -133,7 +133,7 @@ describe('react:component-cypress-spec', () => { expect(formatFile`${appTree.read(cypressStorySpecFilePath, 'utf-8')}`) .toContain(formatFile`describe('test-ui-lib: Test component', () => { beforeEach(() => cy.visit('/iframe.html?id=test--primary')); - + it('should render the component', () => { cy.get('h1').should('contain', 'Welcome to Test!'); }); diff --git a/packages/react/src/generators/component-story/component-story.spec.ts b/packages/react/src/generators/component-story/component-story.spec.ts index 0b7b3f73a107e..e3e8a83e66233 100644 --- a/packages/react/src/generators/component-story/component-story.spec.ts +++ b/packages/react/src/generators/component-story/component-story.spec.ts @@ -2,7 +2,7 @@ import { getProjects, Tree, updateProjectConfiguration } from '@nx/devkit'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; import libraryGenerator from '../library/library'; import componentStoryGenerator from './component-story'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; describe('react:component-story', () => { let appTree: Tree; @@ -62,9 +62,9 @@ describe('react:component-story', () => { appTree.write( 'test-ui-lib/src/lib/test-ui-libplain.jsx', `import React from 'react'; - + import './test.scss'; - + export const Test = () => { return (
@@ -72,8 +72,8 @@ describe('react:component-story', () => {
); }; - - export default Test; + + export default Test; ` ); @@ -97,9 +97,9 @@ describe('react:component-story', () => { appTree.write( cmpPath, `import React from 'react'; - + import './test.scss'; - + export const Test = () => { return (
@@ -107,8 +107,8 @@ describe('react:component-story', () => {
); }; - - export default Test; + + export default Test; ` ); @@ -128,14 +128,14 @@ describe('react:component-story', () => { appTree.write( cmpPath, `import React from 'react'; - + import './test.scss'; - + export interface TestProps { name: string; displayAge: boolean; } - + export const Test = (props: TestProps) => { return (
@@ -143,8 +143,8 @@ describe('react:component-story', () => {
); }; - - export default Test; + + export default Test; ` ); @@ -164,18 +164,18 @@ describe('react:component-story', () => { appTree.write( cmpPath, `import React from 'react'; - + import './test.scss'; export type ButtonStyle = 'default' | 'primary' | 'warning'; - + export interface TestProps { name: string; displayAge: boolean; someAction: (e: unknown) => void; style: ButtonStyle; } - + export const Test = (props: TestProps) => { return (
@@ -184,8 +184,8 @@ describe('react:component-story', () => {
); }; - - export default Test; + + export default Test; ` ); @@ -320,14 +320,14 @@ describe('react:component-story', () => { appTree.write( cmpPath, `import React from 'react'; - + import './test.scss'; - + export interface TestProps { name: string; displayAge: boolean; } - + ${src} ` ); @@ -435,14 +435,14 @@ describe('react:component-story', () => { appTree.write( cmpPath, `import React from 'react'; - + import './test.scss'; - + export interface TestProps { name: string; displayAge: boolean; } - + ${src} ` ); @@ -463,19 +463,19 @@ describe('react:component-story', () => { appTree.write( cmpPath, `import React from 'react'; - + function One() { return
Hello one
; } - + function Two() { return
Hello two
; } - + export interface ThreeProps { name: string; - } - + } + function Three(props: ThreeProps) { return (
@@ -483,8 +483,8 @@ describe('react:component-story', () => {
); } - - export { One, Two, Three }; + + export { One, Two, Three }; ` ); diff --git a/packages/react/src/generators/component-test/component-test.spec.ts b/packages/react/src/generators/component-test/component-test.spec.ts index 174faf4edda6b..4b5fa164ec71c 100644 --- a/packages/react/src/generators/component-test/component-test.spec.ts +++ b/packages/react/src/generators/component-test/component-test.spec.ts @@ -1,7 +1,7 @@ import { assertMinimumCypressVersion } from '@nx/cypress/src/utils/cypress-version'; import { Tree } from '@nx/devkit'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import libraryGenerator from '../library/library'; import { componentTestGenerator } from './component-test'; diff --git a/packages/react/src/generators/cypress-component-configuration/cypress-component-configuration.spec.ts b/packages/react/src/generators/cypress-component-configuration/cypress-component-configuration.spec.ts index f721f7e910c52..ecd17bd11ff14 100644 --- a/packages/react/src/generators/cypress-component-configuration/cypress-component-configuration.spec.ts +++ b/packages/react/src/generators/cypress-component-configuration/cypress-component-configuration.spec.ts @@ -7,7 +7,7 @@ import { updateProjectConfiguration, } from '@nx/devkit'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import { applicationGenerator } from '../application/application'; import { componentGenerator } from '../component/component'; import { libraryGenerator } from '../library/library'; diff --git a/packages/react/src/generators/federate-module/federate-module.spec.ts b/packages/react/src/generators/federate-module/federate-module.spec.ts index 1ebce3f368103..12ce7b19b8747 100644 --- a/packages/react/src/generators/federate-module/federate-module.spec.ts +++ b/packages/react/src/generators/federate-module/federate-module.spec.ts @@ -3,7 +3,7 @@ import { Schema } from './schema'; import { Schema as remoteSchma } from '../remote/schema'; import { federateModuleGenerator } from './federate-module'; import { createTreeWithEmptyWorkspace } from 'nx/src/devkit-testing-exports'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import { remoteGeneratorInternal } from '../remote/remote'; describe('federate-module', () => { diff --git a/packages/react/src/generators/host/host.spec.ts b/packages/react/src/generators/host/host.spec.ts index 9c6aa8bb70be8..5ef088edc1a5c 100644 --- a/packages/react/src/generators/host/host.spec.ts +++ b/packages/react/src/generators/host/host.spec.ts @@ -2,7 +2,7 @@ import type { Tree } from '@nx/devkit'; import { readJson } from '@nx/devkit'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; import hostGenerator from './host'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; describe('hostGenerator', () => { let tree: Tree; diff --git a/packages/react/src/generators/host/schema.d.ts b/packages/react/src/generators/host/schema.d.ts index 51dc14d63b688..6b399c2b07682 100644 --- a/packages/react/src/generators/host/schema.d.ts +++ b/packages/react/src/generators/host/schema.d.ts @@ -1,5 +1,5 @@ import type { ProjectNameAndRootFormat } from '@nx/devkit/src/generators/project-name-and-root-utils'; -import type { Linter } from '@nx/linter'; +import type { Linter } from '@nx/eslint'; import type { SupportedStyles } from '../../../typings'; export interface Schema { diff --git a/packages/react/src/generators/library/lib/add-linting.ts b/packages/react/src/generators/library/lib/add-linting.ts index 0834a21f8665b..610f83660a2a9 100644 --- a/packages/react/src/generators/library/lib/add-linting.ts +++ b/packages/react/src/generators/library/lib/add-linting.ts @@ -1,5 +1,5 @@ import { Tree } from 'nx/src/generators/tree'; -import { Linter, lintProjectGenerator } from '@nx/linter'; +import { Linter, lintProjectGenerator } from '@nx/eslint'; import { joinPathFragments } from 'nx/src/utils/path'; import { addDependenciesToPackageJson, runTasksInSerial } from '@nx/devkit'; @@ -8,7 +8,7 @@ import { extraEslintDependencies } from '../../../utils/lint'; import { addExtendsToLintConfig, isEslintConfigSupported, -} from '@nx/linter/src/generators/utils/eslint-file'; +} from '@nx/eslint/src/generators/utils/eslint-file'; export async function addLinting(host: Tree, options: NormalizedSchema) { if (options.linter === Linter.EsLint) { diff --git a/packages/react/src/generators/library/lib/normalize-options.spec.ts b/packages/react/src/generators/library/lib/normalize-options.spec.ts index fda0e2648fb75..0e1bafc067fbd 100644 --- a/packages/react/src/generators/library/lib/normalize-options.spec.ts +++ b/packages/react/src/generators/library/lib/normalize-options.spec.ts @@ -1,5 +1,5 @@ import type { Tree } from '@nx/devkit'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; import { normalizeOptions } from './normalize-options'; diff --git a/packages/react/src/generators/library/library.spec.ts b/packages/react/src/generators/library/library.spec.ts index 6837396688e30..3f6235bb9e8d0 100644 --- a/packages/react/src/generators/library/library.spec.ts +++ b/packages/react/src/generators/library/library.spec.ts @@ -7,7 +7,7 @@ import { updateJson, } from '@nx/devkit'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import { nxVersion } from '../../utils/versions'; import applicationGenerator from '../application/application'; import libraryGenerator from './library'; @@ -53,7 +53,7 @@ describe('lib', () => { expect(project.root).toEqual('my-lib'); expect(project.targets.build).toBeUndefined(); expect(project.targets.lint).toEqual({ - executor: '@nx/linter:eslint', + executor: '@nx/eslint:lint', outputs: ['{options.outputFile}'], options: { lintFilePatterns: ['my-lib/**/*.{ts,tsx,js,jsx}'], @@ -316,7 +316,7 @@ describe('lib', () => { expect(config.root).toEqual('my-dir/my-lib'); expect(config.targets.lint).toEqual({ - executor: '@nx/linter:eslint', + executor: '@nx/eslint:lint', outputs: ['{options.outputFile}'], options: { lintFilePatterns: ['my-dir/my-lib/**/*.{ts,tsx,js,jsx}'], @@ -414,7 +414,7 @@ describe('lib', () => { expect(config.targets.test).toBeUndefined(); expect(config.targets.lint).toMatchInlineSnapshot(` { - "executor": "@nx/linter:eslint", + "executor": "@nx/eslint:lint", "options": { "lintFilePatterns": [ "my-lib/**/*.{ts,tsx,js,jsx}", diff --git a/packages/react/src/generators/library/schema.d.ts b/packages/react/src/generators/library/schema.d.ts index 21621995c024c..8de7282dcde53 100644 --- a/packages/react/src/generators/library/schema.d.ts +++ b/packages/react/src/generators/library/schema.d.ts @@ -1,5 +1,5 @@ import type { ProjectNameAndRootFormat } from '@nx/devkit/src/generators/project-name-and-root-utils'; -import type { Linter } from '@nx/linter'; +import type { Linter } from '@nx/eslint'; import type { SupportedStyles } from '../../../typings/style'; export interface Schema { diff --git a/packages/react/src/generators/redux/redux.spec.ts b/packages/react/src/generators/redux/redux.spec.ts index f278fbc0d19b9..89bf93826d697 100644 --- a/packages/react/src/generators/redux/redux.spec.ts +++ b/packages/react/src/generators/redux/redux.spec.ts @@ -1,6 +1,6 @@ import { readJson, Tree } from '@nx/devkit'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import { applicationGenerator } from '../application/application'; import { libraryGenerator } from '../library/library'; import { reduxGenerator } from './redux'; diff --git a/packages/react/src/generators/remote/remote.spec.ts b/packages/react/src/generators/remote/remote.spec.ts index b4f5755f36b2d..1d1e250d2fa79 100644 --- a/packages/react/src/generators/remote/remote.spec.ts +++ b/packages/react/src/generators/remote/remote.spec.ts @@ -1,6 +1,6 @@ import { readJson, readNxJson } from '@nx/devkit'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import remote from './remote'; import { getRootTsConfigPath, getRootTsConfigPathInTree } from '@nx/js'; diff --git a/packages/react/src/generators/remote/schema.d.ts b/packages/react/src/generators/remote/schema.d.ts index cbcb6a96f17c1..cb57362406bab 100644 --- a/packages/react/src/generators/remote/schema.d.ts +++ b/packages/react/src/generators/remote/schema.d.ts @@ -1,5 +1,5 @@ import type { ProjectNameAndRootFormat } from '@nx/devkit/src/generators/project-name-and-root-utils'; -import type { Linter } from '@nx/linter'; +import type { Linter } from '@nx/eslint'; import type { SupportedStyles } from '../../../typings'; import type { NormalizedSchema as ApplicationNormalizedSchema } from '../application/schema'; diff --git a/packages/react/src/generators/setup-ssr/setup-ssr.spec.ts b/packages/react/src/generators/setup-ssr/setup-ssr.spec.ts index 9da982b444af3..21d89d43fcd03 100644 --- a/packages/react/src/generators/setup-ssr/setup-ssr.spec.ts +++ b/packages/react/src/generators/setup-ssr/setup-ssr.spec.ts @@ -2,7 +2,7 @@ import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; import { readJson, Tree } from '@nx/devkit'; import applicationGenerator from '../application/application'; import setupSsrGenerator from './setup-ssr'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; describe('setupSsrGenerator', () => { let tree: Tree; diff --git a/packages/react/src/generators/stories/stories.app.spec.ts b/packages/react/src/generators/stories/stories.app.spec.ts index 31302908f4c7a..eff11ed002c5b 100644 --- a/packages/react/src/generators/stories/stories.app.spec.ts +++ b/packages/react/src/generators/stories/stories.app.spec.ts @@ -1,7 +1,7 @@ import { installedCypressVersion } from '@nx/cypress/src/utils/cypress-version'; import { Tree } from '@nx/devkit'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import applicationGenerator from '../application/application'; import storiesGenerator from './stories'; // need to mock cypress otherwise it'll use the nx installed version from package.json @@ -112,14 +112,14 @@ describe('react:stories for applications', () => { appTree.write( 'test-ui-app/src/app/test-path/ignore-it/another-one.tsx', `import React from 'react'; - + import './test.scss'; - + export interface TestProps { name: string; displayAge: boolean; } - + export const Test = (props: TestProps) => { return (
@@ -127,7 +127,7 @@ describe('react:stories for applications', () => {
); }; - + export default Test; ` ); @@ -135,14 +135,14 @@ describe('react:stories for applications', () => { appTree.write( 'test-ui-app/src/app/anothercmp/another-cmp-test.skip.tsx', `import React from 'react'; - + import './test.scss'; - + export interface TestProps { name: string; displayAge: boolean; } - + export const Test = (props: TestProps) => { return (
@@ -150,7 +150,7 @@ describe('react:stories for applications', () => {
); }; - + export default Test; ` ); @@ -268,14 +268,14 @@ describe('react:stories for applications', () => { appTree.write( 'test-ui-app/src/app/anothercmp/comp-a/comp-a.tsx', `import React from 'react'; - + import './test.scss'; - + export interface TestProps { name: string; displayAge: boolean; } - + export const Test = (props: TestProps) => { return (
@@ -283,7 +283,7 @@ describe('react:stories for applications', () => {
); }; - + export default Test; ` ); diff --git a/packages/react/src/generators/stories/stories.lib.spec.ts b/packages/react/src/generators/stories/stories.lib.spec.ts index 958124e9ad086..ad89c17b7d962 100644 --- a/packages/react/src/generators/stories/stories.lib.spec.ts +++ b/packages/react/src/generators/stories/stories.lib.spec.ts @@ -2,7 +2,7 @@ import { Tree } from '@nx/devkit'; import storiesGenerator from './stories'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; import applicationGenerator from '../application/application'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import libraryGenerator from '../library/library'; describe('react:stories for libraries', () => { @@ -92,12 +92,12 @@ describe('react:stories for libraries', () => { appTree.write( 'test-ui-lib/src/lib/test-path/ignore-it/another-one.tsx', `import React from 'react'; - + export interface IgnoreProps { name: string; displayAge: boolean; } - + export const Ignored = (props: IgnoreProps) => { return (
@@ -105,7 +105,7 @@ describe('react:stories for libraries', () => {
); }; - + export default Ignored; ` ); @@ -113,12 +113,12 @@ describe('react:stories for libraries', () => { appTree.write( 'test-ui-lib/src/lib/anothercmp/another-cmp.skip.tsx', `import React from 'react'; - + export interface OtherTestProps { name: string; displayAge: boolean; } - + export const OtherTest = (props: OtherTestProps) => { return (
@@ -126,7 +126,7 @@ describe('react:stories for libraries', () => {
); }; - + export default OtherTest; ` ); diff --git a/packages/react/src/generators/stories/stories.nextjs.spec.ts b/packages/react/src/generators/stories/stories.nextjs.spec.ts index 1b02328f0e010..8b7ba5908d34e 100644 --- a/packages/react/src/generators/stories/stories.nextjs.spec.ts +++ b/packages/react/src/generators/stories/stories.nextjs.spec.ts @@ -6,7 +6,7 @@ import { import storiesGenerator from './stories'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; import applicationGenerator from '../application/application'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; describe('nextjs:stories for applications', () => { let tree: Tree; diff --git a/packages/react/src/generators/storybook-configuration/configuration.spec.ts b/packages/react/src/generators/storybook-configuration/configuration.spec.ts index 9b6b0a7509571..ea4a1df2bfa96 100644 --- a/packages/react/src/generators/storybook-configuration/configuration.spec.ts +++ b/packages/react/src/generators/storybook-configuration/configuration.spec.ts @@ -2,7 +2,7 @@ import { installedCypressVersion } from '@nx/cypress/src/utils/cypress-version'; import { logger, Tree } from '@nx/devkit'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import applicationGenerator from '../application/application'; import componentGenerator from '../component/component'; import libraryGenerator from '../library/library'; diff --git a/packages/react/src/generators/storybook-configuration/schema.d.ts b/packages/react/src/generators/storybook-configuration/schema.d.ts index 8d28fc9293988..ddfd30192f217 100644 --- a/packages/react/src/generators/storybook-configuration/schema.d.ts +++ b/packages/react/src/generators/storybook-configuration/schema.d.ts @@ -1,4 +1,4 @@ -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; export interface StorybookConfigureSchema { name: string; diff --git a/packages/react/src/utils/testing-generators.ts b/packages/react/src/utils/testing-generators.ts index fa459b927a1c6..e495057985a63 100644 --- a/packages/react/src/utils/testing-generators.ts +++ b/packages/react/src/utils/testing-generators.ts @@ -1,6 +1,6 @@ import { addProjectConfiguration, names, Tree } from '@nx/devkit'; import applicationGenerator from '../generators/application/application'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; export async function createApp(tree: Tree, appName: string): Promise { await applicationGenerator(tree, { diff --git a/packages/storybook/package.json b/packages/storybook/package.json index 6893fdfa4c1af..6398706697fca 100644 --- a/packages/storybook/package.json +++ b/packages/storybook/package.json @@ -36,7 +36,7 @@ "@nx/cypress": "file:../cypress", "@nx/devkit": "file:../devkit", "@nx/js": "file:../js", - "@nx/linter": "file:../linter" + "@nx/eslint": "file:../eslint" }, "publishConfig": { "access": "public" diff --git a/packages/storybook/src/generators/configuration/configuration.spec.ts b/packages/storybook/src/generators/configuration/configuration.spec.ts index 29f3adad089ed..ad4d72d9f15f8 100644 --- a/packages/storybook/src/generators/configuration/configuration.spec.ts +++ b/packages/storybook/src/generators/configuration/configuration.spec.ts @@ -11,7 +11,7 @@ import { } from '@nx/devkit'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import { libraryGenerator } from '@nx/js'; import { TsConfig } from '../../utils/utilities'; import { storybookVersion } from '../../utils/versions'; diff --git a/packages/storybook/src/generators/configuration/configuration.ts b/packages/storybook/src/generators/configuration/configuration.ts index 606c1e297bb85..ab8edae9eaced 100644 --- a/packages/storybook/src/generators/configuration/configuration.ts +++ b/packages/storybook/src/generators/configuration/configuration.ts @@ -28,7 +28,7 @@ import { projectIsRootProjectInStandaloneWorkspace, updateLintConfig, } from './lib/util-functions'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import { findStorybookAndBuildTargetsAndCompiler, pleaseUpgrade, @@ -69,14 +69,14 @@ export async function configurationGenerator( if (viteBuildTarget) { if (schema.uiFramework === '@storybook/react-webpack5') { logger.info( - `Your project ${schema.name} uses Vite as a bundler. + `Your project ${schema.name} uses Vite as a bundler. Nx will configure Storybook for this project to use Vite as well.` ); schema.uiFramework = '@storybook/react-vite'; } if (schema.uiFramework === '@storybook/web-components-webpack5') { logger.info( - `Your project ${schema.name} uses Vite as a bundler. + `Your project ${schema.name} uses Vite as a bundler. Nx will configure Storybook for this project to use Vite as well.` ); schema.uiFramework = '@storybook/web-components-vite'; diff --git a/packages/storybook/src/generators/configuration/lib/util-functions.ts b/packages/storybook/src/generators/configuration/lib/util-functions.ts index 5bb38a7d98b52..67e525de3f014 100644 --- a/packages/storybook/src/generators/configuration/lib/util-functions.ts +++ b/packages/storybook/src/generators/configuration/lib/util-functions.ts @@ -18,7 +18,7 @@ import { writeJson, } from '@nx/devkit'; import { forEachExecutorOptions } from '@nx/devkit/src/generators/executor-options-utils'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import { join, relative } from 'path'; import { dedupe, @@ -28,8 +28,8 @@ import { import { StorybookConfigureSchema } from '../schema'; import { UiFramework } from '../../../utils/models'; import { nxVersion } from '../../../utils/versions'; -import { findEslintFile } from '@nx/linter/src/generators/utils/eslint-file'; -import { useFlatConfig } from '@nx/linter/src/utils/flat-config'; +import { findEslintFile } from '@nx/eslint/src/generators/utils/eslint-file'; +import { useFlatConfig } from '@nx/eslint/src/utils/flat-config'; const DEFAULT_PORT = 4400; diff --git a/packages/storybook/src/generators/configuration/schema.d.ts b/packages/storybook/src/generators/configuration/schema.d.ts index 809f733919348..8aeee29c89dcc 100644 --- a/packages/storybook/src/generators/configuration/schema.d.ts +++ b/packages/storybook/src/generators/configuration/schema.d.ts @@ -1,4 +1,4 @@ -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import { UiFramework } from '../../utils/models'; export interface StorybookConfigureSchema { diff --git a/packages/storybook/src/generators/cypress-project/cypress-project.spec.ts b/packages/storybook/src/generators/cypress-project/cypress-project.spec.ts index 0dc2fb7533af8..3365702123f05 100644 --- a/packages/storybook/src/generators/cypress-project/cypress-project.spec.ts +++ b/packages/storybook/src/generators/cypress-project/cypress-project.spec.ts @@ -1,7 +1,7 @@ import { installedCypressVersion } from '@nx/cypress/src/utils/cypress-version'; import { readJson, readProjectConfiguration, Tree } from '@nx/devkit'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import { libraryGenerator } from '@nx/js'; import { cypressProjectGenerator } from './cypress-project'; diff --git a/packages/storybook/src/generators/cypress-project/cypress-project.ts b/packages/storybook/src/generators/cypress-project/cypress-project.ts index f43b85f802b60..0b7246091cf4d 100644 --- a/packages/storybook/src/generators/cypress-project/cypress-project.ts +++ b/packages/storybook/src/generators/cypress-project/cypress-project.ts @@ -17,7 +17,7 @@ import { updateJson, updateProjectConfiguration, } from '@nx/devkit'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import { join } from 'path'; import { safeFileDelete } from '../../utils/utilities'; diff --git a/packages/storybook/src/utils/testing.ts b/packages/storybook/src/utils/testing.ts index c89f80f34e16e..c09e372f98864 100644 --- a/packages/storybook/src/utils/testing.ts +++ b/packages/storybook/src/utils/testing.ts @@ -1,7 +1,7 @@ import { Tree } from '@nx/devkit'; import { libraryGenerator } from '@nx/js'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; export async function createTestUILibNoNgDevkit( appTree: Tree, diff --git a/packages/vue/package.json b/packages/vue/package.json index 14adaf42e9dab..be32b1d2c354c 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -33,7 +33,7 @@ "@nx/devkit": "file:../devkit", "@nx/jest": "file:../jest", "@nx/js": "file:../js", - "@nx/linter": "file:../linter", + "@nx/eslint": "file:../eslint", "@nx/vite": "file:../vite", "@nx/web": "file:../web", "@phenomnomnominal/tsquery": "~5.0.1" diff --git a/packages/vue/src/generators/application/application.ts b/packages/vue/src/generators/application/application.ts index 01a699e88be70..d6faa7b31184b 100644 --- a/packages/vue/src/generators/application/application.ts +++ b/packages/vue/src/generators/application/application.ts @@ -6,7 +6,7 @@ import { toJS, Tree, } from '@nx/devkit'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import { Schema } from './schema'; import { normalizeOptions } from './lib/normalize-options'; import { vueInitGenerator } from '../init/init'; diff --git a/packages/vue/src/generators/application/schema.d.ts b/packages/vue/src/generators/application/schema.d.ts index 3ce0654f7236a..7df31a02a396d 100644 --- a/packages/vue/src/generators/application/schema.d.ts +++ b/packages/vue/src/generators/application/schema.d.ts @@ -1,5 +1,5 @@ import type { ProjectNameAndRootFormat } from '@nx/devkit/src/generators/project-name-and-root-utils'; -import type { Linter } from '@nx/linter'; +import type { Linter } from '@nx/eslint'; export interface Schema { name: string; diff --git a/packages/vue/src/generators/library/__snapshots__/library.spec.ts.snap b/packages/vue/src/generators/library/__snapshots__/library.spec.ts.snap index b9ab33d354d6d..c038d3c446084 100644 --- a/packages/vue/src/generators/library/__snapshots__/library.spec.ts.snap +++ b/packages/vue/src/generators/library/__snapshots__/library.spec.ts.snap @@ -39,7 +39,7 @@ exports[`lib should add correct jest.config.ts and dependencies to package.json "@nx/eslint-plugin": "0.0.1", "@nx/jest": "0.0.1", "@nx/js": "0.0.1", - "@nx/linter": "0.0.1", + "@nx/eslint": "0.0.1", "@nx/rollup": "0.0.1", "@nx/vite": "0.0.1", "@nx/vue": "0.0.1", @@ -234,7 +234,7 @@ exports[`lib should add vue, vite and vitest to package.json 1`] = ` "@nx/cypress": "0.0.1", "@nx/eslint-plugin": "0.0.1", "@nx/js": "0.0.1", - "@nx/linter": "0.0.1", + "@nx/eslint": "0.0.1", "@nx/rollup": "0.0.1", "@nx/vite": "0.0.1", "@nx/vue": "0.0.1", diff --git a/packages/vue/src/generators/library/lib/normalize-options.spec.ts b/packages/vue/src/generators/library/lib/normalize-options.spec.ts index c126e30d8db32..6378029e20099 100644 --- a/packages/vue/src/generators/library/lib/normalize-options.spec.ts +++ b/packages/vue/src/generators/library/lib/normalize-options.spec.ts @@ -1,5 +1,5 @@ import type { Tree } from '@nx/devkit'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; import { normalizeOptions } from './normalize-options'; diff --git a/packages/vue/src/generators/library/library.spec.ts b/packages/vue/src/generators/library/library.spec.ts index 9d5d6bde90dfe..2713f20d5e7a8 100644 --- a/packages/vue/src/generators/library/library.spec.ts +++ b/packages/vue/src/generators/library/library.spec.ts @@ -6,7 +6,7 @@ import { updateJson, } from '@nx/devkit'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import { nxVersion } from '../../utils/versions'; import libraryGenerator from './library'; import { Schema } from './schema'; @@ -42,7 +42,7 @@ describe('lib', () => { expect(project.root).toEqual('my-lib'); expect(project.targets.build).toBeUndefined(); expect(project.targets.lint).toEqual({ - executor: '@nx/linter:eslint', + executor: '@nx/eslint:lint', outputs: ['{options.outputFile}'], options: { lintFilePatterns: ['my-lib/**/*.{ts,tsx,js,jsx,vue}'], @@ -214,7 +214,7 @@ describe('lib', () => { expect(config.root).toEqual('my-dir/my-lib'); expect(config.targets.lint).toEqual({ - executor: '@nx/linter:eslint', + executor: '@nx/eslint:lint', outputs: ['{options.outputFile}'], options: { lintFilePatterns: ['my-dir/my-lib/**/*.{ts,tsx,js,jsx,vue}'], @@ -261,7 +261,7 @@ describe('lib', () => { expect(config.targets.test).toBeUndefined(); expect(config.targets.lint).toMatchInlineSnapshot(` { - "executor": "@nx/linter:eslint", + "executor": "@nx/eslint:lint", "options": { "lintFilePatterns": [ "my-lib/**/*.{ts,tsx,js,jsx,vue}", diff --git a/packages/vue/src/generators/library/schema.d.ts b/packages/vue/src/generators/library/schema.d.ts index 6b08f31cb153a..dca9062124bc1 100644 --- a/packages/vue/src/generators/library/schema.d.ts +++ b/packages/vue/src/generators/library/schema.d.ts @@ -1,5 +1,5 @@ import type { ProjectNameAndRootFormat } from '@nx/devkit/src/generators/project-name-and-root-utils'; -import type { Linter } from '@nx/linter'; +import type { Linter } from '@nx/eslint'; import type { SupportedStyles } from '../../../typings/style'; export interface Schema { diff --git a/packages/vue/src/generators/stories/lib/component-story.spec.ts b/packages/vue/src/generators/stories/lib/component-story.spec.ts index e000fbaef974a..6e68c1cb07e9d 100644 --- a/packages/vue/src/generators/stories/lib/component-story.spec.ts +++ b/packages/vue/src/generators/stories/lib/component-story.spec.ts @@ -2,7 +2,7 @@ import { getProjects, Tree, updateProjectConfiguration } from '@nx/devkit'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; import libraryGenerator from '../../library/library'; import { createComponentStories } from './component-story'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; describe('vue:component-story', () => { let appTree: Tree; @@ -42,11 +42,11 @@ describe('vue:component-story', () => { age: number; }>(); - + - + ` @@ -81,11 +81,11 @@ describe('vue:component-story', () => { } } - + - + ` diff --git a/packages/vue/src/generators/stories/stories.app.spec.ts b/packages/vue/src/generators/stories/stories.app.spec.ts index b9a327d573f47..dded11aaa60fd 100644 --- a/packages/vue/src/generators/stories/stories.app.spec.ts +++ b/packages/vue/src/generators/stories/stories.app.spec.ts @@ -1,6 +1,6 @@ import { Tree } from '@nx/devkit'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import applicationGenerator from '../application/application'; import storiesGenerator from './stories'; diff --git a/packages/vue/src/generators/stories/stories.lib.spec.ts b/packages/vue/src/generators/stories/stories.lib.spec.ts index d0b48c27fbdaf..55cf9a5ac02f9 100644 --- a/packages/vue/src/generators/stories/stories.lib.spec.ts +++ b/packages/vue/src/generators/stories/stories.lib.spec.ts @@ -1,7 +1,7 @@ import { Tree } from '@nx/devkit'; import storiesGenerator from './stories'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; -import { Linter } from '@nx/linter'; +import { Linter } from '@nx/eslint'; import libraryGenerator from '../library/library'; const componentContent = `