feat(core): remove deprecated workspace-lint (#16212)
This commit is contained in:
parent
80fde79374
commit
09ff419040
@ -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`.
|
||||
@ -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",
|
||||
|
||||
@ -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",
|
||||
|
||||
@ -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": [
|
||||
|
||||
@ -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",
|
||||
|
||||
@ -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`.
|
||||
@ -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",
|
||||
|
||||
@ -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"
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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' },
|
||||
|
||||
@ -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',
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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);
|
||||
},
|
||||
};
|
||||
@ -1,11 +0,0 @@
|
||||
import { output } from '../../utils/output';
|
||||
|
||||
export async function workspaceLint(): Promise<void> {
|
||||
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.`,
|
||||
],
|
||||
});
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user