From 09ff419040e350ba58c821dcd5c6398196e9db8c Mon Sep 17 00:00:00 2001 From: Craigory Coppola Date: Fri, 13 Oct 2023 13:08:44 -0400 Subject: [PATCH] feat(core): remove deprecated workspace-lint (#16212) --- docs/generated/cli/workspace-lint.md | 18 ------------------ docs/generated/manifests/menus.json | 8 -------- docs/generated/manifests/nx-api.json | 11 ----------- docs/generated/manifests/tags.json | 7 ------- docs/generated/packages-metadata.json | 11 ----------- .../packages/nx/documents/workspace-lint.md | 18 ------------------ docs/map.json | 6 ------ docs/shared/mental-model/large-tasks.json | 8 -------- docs/shared/monorepo-ci-azure.md | 1 - docs/shared/reference/nxignore.md | 1 - docs/shared/reference/sitemap.md | 1 - .../src/additional-api-references.spec.ts | 1 - nx-dev/nx-dev/redirect-rules.js | 2 -- packages/nx/src/command-line/nx-commands.ts | 2 -- .../workspace-lint/command-object.ts | 15 --------------- .../workspace-lint/workspace-lint.ts | 11 ----------- 16 files changed, 121 deletions(-) delete mode 100644 docs/generated/cli/workspace-lint.md delete mode 100644 docs/generated/packages/nx/documents/workspace-lint.md delete mode 100644 packages/nx/src/command-line/workspace-lint/command-object.ts delete mode 100644 packages/nx/src/command-line/workspace-lint/workspace-lint.ts diff --git a/docs/generated/cli/workspace-lint.md b/docs/generated/cli/workspace-lint.md deleted file mode 100644 index a77e61ffa2..0000000000 --- a/docs/generated/cli/workspace-lint.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: 'workspace-lint - CLI command' -description: 'Lint nx specific workspace files (nx.json, workspace.json)' ---- - -# workspace-lint - -**Deprecated:** workspace-lint is deprecated, and will be removed in v17. The checks it used to perform are no longer relevant. See: https://nx.dev/deprecated/workspace-lint - -Lint nx specific workspace files (nx.json, workspace.json) - -## Usage - -```shell -nx workspace-lint [files..] -``` - -Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`. diff --git a/docs/generated/manifests/menus.json b/docs/generated/manifests/menus.json index aaf729c115..5f632c9908 100644 --- a/docs/generated/manifests/menus.json +++ b/docs/generated/manifests/menus.json @@ -7550,14 +7550,6 @@ "children": [], "disableCollapsible": false }, - { - "name": "workspace-lint", - "path": "/nx-api/nx/documents/workspace-lint", - "id": "workspace-lint", - "isExternal": false, - "children": [], - "disableCollapsible": false - }, { "name": "connect-to-nx-cloud", "path": "/nx-api/nx/documents/connect-to-nx-cloud", diff --git a/docs/generated/manifests/nx-api.json b/docs/generated/manifests/nx-api.json index f3d78a32c7..134288a6af 100644 --- a/docs/generated/manifests/nx-api.json +++ b/docs/generated/manifests/nx-api.json @@ -1675,17 +1675,6 @@ "tags": [], "originalFilePath": "generated/cli/list" }, - "/nx-api/nx/documents/workspace-lint": { - "id": "workspace-lint", - "name": "workspace-lint", - "description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.", - "file": "generated/packages/nx/documents/workspace-lint", - "itemList": [], - "isExternal": false, - "path": "/nx-api/nx/documents/workspace-lint", - "tags": ["enforce-module-boundaries"], - "originalFilePath": "generated/cli/workspace-lint" - }, "/nx-api/nx/documents/connect-to-nx-cloud": { "id": "connect-to-nx-cloud", "name": "connect-to-nx-cloud", diff --git a/docs/generated/manifests/tags.json b/docs/generated/manifests/tags.json index e57578dac1..3b54274360 100644 --- a/docs/generated/manifests/tags.json +++ b/docs/generated/manifests/tags.json @@ -361,13 +361,6 @@ "id": "format-write", "name": "format:write", "path": "/nx-api/nx/documents/format-write" - }, - { - "description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.", - "file": "generated/packages/generated/packages/nx/documents/workspace-lint", - "id": "workspace-lint", - "name": "workspace-lint", - "path": "/nx-api/nx/documents/workspace-lint" } ], "integrate-with-editors": [ diff --git a/docs/generated/packages-metadata.json b/docs/generated/packages-metadata.json index 2b01aefc29..701d8f6c1f 100644 --- a/docs/generated/packages-metadata.json +++ b/docs/generated/packages-metadata.json @@ -1656,17 +1656,6 @@ "tags": [], "originalFilePath": "generated/cli/list" }, - { - "id": "workspace-lint", - "name": "workspace-lint", - "description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.", - "file": "generated/packages/nx/documents/workspace-lint", - "itemList": [], - "isExternal": false, - "path": "nx/documents/workspace-lint", - "tags": ["enforce-module-boundaries"], - "originalFilePath": "generated/cli/workspace-lint" - }, { "id": "connect-to-nx-cloud", "name": "connect-to-nx-cloud", diff --git a/docs/generated/packages/nx/documents/workspace-lint.md b/docs/generated/packages/nx/documents/workspace-lint.md deleted file mode 100644 index a77e61ffa2..0000000000 --- a/docs/generated/packages/nx/documents/workspace-lint.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: 'workspace-lint - CLI command' -description: 'Lint nx specific workspace files (nx.json, workspace.json)' ---- - -# workspace-lint - -**Deprecated:** workspace-lint is deprecated, and will be removed in v17. The checks it used to perform are no longer relevant. See: https://nx.dev/deprecated/workspace-lint - -Lint nx specific workspace files (nx.json, workspace.json) - -## Usage - -```shell -nx workspace-lint [files..] -``` - -Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`. diff --git a/docs/map.json b/docs/map.json index be544d272c..4e5a7df55f 100644 --- a/docs/map.json +++ b/docs/map.json @@ -1855,12 +1855,6 @@ "id": "list", "file": "generated/cli/list" }, - { - "name": "workspace-lint", - "id": "workspace-lint", - "tags": ["enforce-module-boundaries"], - "file": "generated/cli/workspace-lint" - }, { "name": "connect-to-nx-cloud", "id": "connect-to-nx-cloud", diff --git a/docs/shared/mental-model/large-tasks.json b/docs/shared/mental-model/large-tasks.json index 1cdf36e72c..2010d74a49 100644 --- a/docs/shared/mental-model/large-tasks.json +++ b/docs/shared/mental-model/large-tasks.json @@ -24995,10 +24995,6 @@ "file": "docs/generated/cli/workspace-generator.md", "hash": "c602609d311a8f3b028cdde9d83a1bd860a53870" }, - { - "file": "docs/generated/cli/workspace-lint.md", - "hash": "c5bc40d3a8198ca5eebdcd851dff5e85d9ce3912" - }, { "file": "docs/generated/devkit/index.md", "hash": "0d2ed5a146246b4ead2e2ed41f1fccb36f744f2b" @@ -25435,10 +25431,6 @@ "file": "docs/nx-cloud/set-up/record-report.png", "hash": "53bc7135364d69e45ba9c9c03ae5dc369ff8770f" }, - { - "file": "docs/nx-cloud/set-up/record-workspace-lint.png", - "hash": "c5f64a0d41f8e206e0ba69f3aa256fd418dbb9c5" - }, { "file": "docs/packages.json", "hash": "4b70f786be62411165df5819ee41d8787287d841" diff --git a/docs/shared/monorepo-ci-azure.md b/docs/shared/monorepo-ci-azure.md index f2a9ec219e..4b858217c5 100644 --- a/docs/shared/monorepo-ci-azure.md +++ b/docs/shared/monorepo-ci-azure.md @@ -141,7 +141,6 @@ jobs: - script: npm ci - - script: npx nx workspace-lint - script: npx nx format:check - script: npx nx affected --base=$(BASE_SHA) -t lint --parallel=3 diff --git a/docs/shared/reference/nxignore.md b/docs/shared/reference/nxignore.md index 0288ff2127..0cd6155b6f 100644 --- a/docs/shared/reference/nxignore.md +++ b/docs/shared/reference/nxignore.md @@ -9,4 +9,3 @@ a [`.gitignore` file](https://git-scm.com/book/en/v2/Git-Basics-Recording-Change **When a file is specified in the `.nxignore` file:** 1. Changes to that file are not taken into account in the `affected` calculations. -2. Even if the file is outside an app or library, `nx workspace-lint` won't warn about it. diff --git a/docs/shared/reference/sitemap.md b/docs/shared/reference/sitemap.md index a8d45897ec..95edbb72bc 100644 --- a/docs/shared/reference/sitemap.md +++ b/docs/shared/reference/sitemap.md @@ -497,7 +497,6 @@ - [migrate](/nx-api/nx/documents/migrate) - [report](/nx-api/nx/documents/report) - [list](/nx-api/nx/documents/list) - - [workspace-lint](/nx-api/nx/documents/workspace-lint) - [connect-to-nx-cloud](/nx-api/nx/documents/connect-to-nx-cloud) - [reset](/nx-api/nx/documents/reset) - [repair](/nx-api/nx/documents/repair) diff --git a/nx-dev/nx-dev-e2e/src/additional-api-references.spec.ts b/nx-dev/nx-dev-e2e/src/additional-api-references.spec.ts index 445567899b..1a74ea58ca 100644 --- a/nx-dev/nx-dev-e2e/src/additional-api-references.spec.ts +++ b/nx-dev/nx-dev-e2e/src/additional-api-references.spec.ts @@ -16,7 +16,6 @@ const pages: Array<{ title: string; path: string }> = [ { title: 'migrate', path: '/cli/migrate' }, { title: 'report', path: '/cli/report' }, { title: 'list', path: '/cli/list' }, - { title: 'workspace-lint', path: '/cli/workspace-lint' }, { title: 'connect', path: '/cli/connect-to-nx-cloud' }, { title: 'reset', path: '/cli/reset' }, { title: 'Storybook', path: '/storybook/overview-react' }, diff --git a/nx-dev/nx-dev/redirect-rules.js b/nx-dev/nx-dev/redirect-rules.js index d4e2e371c3..bedbe912c3 100644 --- a/nx-dev/nx-dev/redirect-rules.js +++ b/nx-dev/nx-dev/redirect-rules.js @@ -337,7 +337,6 @@ const cliUrls = { '/cli/migrate': '/nx/migrate', '/cli/report': '/nx/report', '/cli/list': '/nx/list', - '/cli/workspace-lint': '/nx/workspace-lint', '/cli/connect-to-nx-cloud': '/nx/connect-to-nx-cloud', '/cli/reset': '/nx/reset', }; @@ -576,7 +575,6 @@ const packagesDocuments = { '/nx/migrate': '/packages/nx/documents/migrate', '/nx/report': '/packages/nx/documents/report', '/nx/list': '/packages/nx/documents/list', - '/nx/workspace-lint': '/packages/nx/documents/workspace-lint', '/nx/workspace-generator': '/packages/nx/documents/workspace-generator', '/nx/connect-to-nx-cloud': '/packages/nx/documents/connect-to-nx-cloud', '/nx/reset': '/packages/nx/documents/reset', diff --git a/packages/nx/src/command-line/nx-commands.ts b/packages/nx/src/command-line/nx-commands.ts index 7fe5aec64d..46879e81f5 100644 --- a/packages/nx/src/command-line/nx-commands.ts +++ b/packages/nx/src/command-line/nx-commands.ts @@ -35,7 +35,6 @@ import { yargsRunCommand } from './run/command-object'; import { yargsRunManyCommand } from './run-many/command-object'; import { yargsShowCommand } from './show/command-object'; import { yargsWatchCommand } from './watch/command-object'; -import { yargsWorkspaceLintCommand } from './workspace-lint/command-object'; import { yargsResetCommand } from './reset/command-object'; import { yargsReleaseCommand } from './release/command-object'; @@ -85,7 +84,6 @@ export const commandsObject = yargs .command(yargsShowCommand) .command(yargsViewLogsCommand) .command(yargsWatchCommand) - .command(yargsWorkspaceLintCommand) .scriptName('nx') .help() // NOTE: we handle --version in nx.ts, this just tells yargs that the option exists diff --git a/packages/nx/src/command-line/workspace-lint/command-object.ts b/packages/nx/src/command-line/workspace-lint/command-object.ts deleted file mode 100644 index 41da302bcd..0000000000 --- a/packages/nx/src/command-line/workspace-lint/command-object.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { CommandModule } from 'yargs'; - -/** - * @deprecated workspace-lint is deprecated, and will be removed in v17. The checks it used to perform are no longer relevant. - */ -export const yargsWorkspaceLintCommand: CommandModule = { - command: 'workspace-lint [files..]', - describe: 'Lint nx specific workspace files (nx.json, workspace.json)', - deprecated: - 'workspace-lint is deprecated, and will be removed in v17. The checks it used to perform are no longer relevant. See: https://nx.dev/deprecated/workspace-lint', - handler: async () => { - await (await import('./workspace-lint')).workspaceLint(); - process.exit(0); - }, -}; diff --git a/packages/nx/src/command-line/workspace-lint/workspace-lint.ts b/packages/nx/src/command-line/workspace-lint/workspace-lint.ts deleted file mode 100644 index 7d9e538169..0000000000 --- a/packages/nx/src/command-line/workspace-lint/workspace-lint.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { output } from '../../utils/output'; - -export async function workspaceLint(): Promise { - output.warn({ - title: `"nx workspace-lint" has been deprecated.`, - bodyLines: [ - `Nx has been reworked to make sure that the issues workspace-lint used to catch are no longer possible.`, - `Remove "nx workspace-lint" from your CI.`, - ], - }); -}