Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(repo): add valid-command-object lint rule #27777

Merged
merged 12 commits into from
Sep 5, 2024
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@
}
]
}
]
],
"@nx/workspace/valid-command-object": "error"
}
}
]
Expand Down
14 changes: 7 additions & 7 deletions docs/generated/cli/add.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ Install version `17.0.0` of the `@nx/react` package and run its `@nx/react:init`

## Options

| Option | Type | Description |
| ------------------------ | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--help` | boolean | Show help |
| `--packageSpecifier` | string | The package name and optional version (e.g. `@nx/react` or `@nx/react@latest`) to install and initialize. If the version is not specified it will install the same version as the `nx` package for Nx core plugins or the latest version for other packages |
| `--updatePackageScripts` | boolean | Update `package.json` scripts with inferred targets. Defaults to `true` when the package is a core Nx plugin |
| `--verbose` | boolean | Prints additional information about the commands (e.g., stack traces) |
| `--version` | boolean | Show version number |
| Option | Type | Description |
| ------------------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `--help` | boolean | Show help. |
| `--packageSpecifier` | string | The package name and optional version (e.g. `@nx/react` or `@nx/react@latest`) to install and initialize. If the version is not specified it will install the same version as the `nx` package for Nx core plugins or the latest version for other packages. |
| `--updatePackageScripts` | boolean | Update `package.json` scripts with inferred targets. Defaults to `true` when the package is a core Nx plugin. |
| `--verbose` | boolean | Prints additional information about the commands (e.g., stack traces). |
| `--version` | boolean | Show version number. |
40 changes: 20 additions & 20 deletions docs/generated/cli/affected.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
title: 'affected - CLI command'
description: 'Run target for affected projects'
description: 'Run target for affected projects.'
---

# affected

Run target for affected projects
Run target for affected projects.

## Usage

Expand Down Expand Up @@ -91,23 +91,23 @@ Print the task graph to the console:

|

| `--base` | string | Base of the current branch (usually main) |
| `--batch` | boolean | Run task(s) in batches for executors which support batches (Default: `false`) |
| `--configuration` | string | This is the configuration to use when performing tasks on projects |
| `--exclude` | string | Exclude certain projects from being processed |
| `--excludeTaskDependencies` | boolean | Skips running dependent tasks first (Default: `false`) |
| `--files` | string | Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas or spaces |
| `--base` | string | Base of the current branch (usually main). |
| `--batch` | boolean | Run task(s) in batches for executors which support batches. (Default: `false`) |
| `--configuration` | string | This is the configuration to use when performing tasks on projects. |
| `--exclude` | string | Exclude certain projects from being processed. |
| `--excludeTaskDependencies` | boolean | Skips running dependent tasks first. (Default: `false`) |
| `--files` | string | Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas or spaces. |
| `--graph` | string | Show the task graph of the command. Pass a file path to save the graph data instead of viewing it in the browser. Pass "stdout" to print the results to the terminal. |
| `--head` | string | Latest commit of the current branch (usually HEAD) |
| `--help` | boolean | Show help |
| `--nxBail` | boolean | Stop command execution after the first failed task (Default: `false`) |
| `--nxIgnoreCycles` | boolean | Ignore cycles in the task graph (Default: `false`) |
| `--head` | string | Latest commit of the current branch (usually HEAD). |
| `--help` | boolean | Show help. |
| `--nxBail` | boolean | Stop command execution after the first failed task. (Default: `false`) |
| `--nxIgnoreCycles` | boolean | Ignore cycles in the task graph. (Default: `false`) |
| `--output-style` | `dynamic`, `static`, `stream`, `stream-without-prefixes` | Defines how Nx emits outputs tasks logs. **dynamic**: use dynamic output life cycle, previous content is overwritten or modified as new outputs are added, display minimal logs by default, always show errors. This output format is recommended on your local development environments. **static**: uses static output life cycle, no previous content is rewritten or modified as new outputs are added. This output format is recommened for CI environments. **stream**: nx by default logs output to an internal output stream, enable this option to stream logs to stdout / stderr. **stream-without-prefixes**: nx prefixes the project name the target is running on, use this option remove the project name prefix from output. |
| `--parallel` | string | Max number of parallel processes [default is 3] |
| `--runner` | string | This is the name of the tasks runner configured in nx.json |
| `--skipNxCache` | boolean | Rerun the tasks even when the results are available in the cache (Default: `false`) |
| `--targets` | string | Tasks to run for affected projects |
| `--uncommitted` | boolean | Uncommitted changes |
| `--untracked` | boolean | Untracked changes |
| `--verbose` | boolean | Prints additional information about the commands (e.g., stack traces) |
| `--version` | boolean | Show version number |
| `--parallel` | string | Max number of parallel processes [default is 3]. |
| `--runner` | string | This is the name of the tasks runner configured in nx.json. |
| `--skipNxCache` | boolean | Rerun the tasks even when the results are available in the cache. (Default: `false`) |
| `--targets` | string | Tasks to run for affected projects. |
| `--uncommitted` | boolean | Uncommitted changes. |
| `--untracked` | boolean | Untracked changes. |
| `--verbose` | boolean | Prints additional information about the commands (e.g., stack traces). |
| `--version` | boolean | Show version number. |
16 changes: 8 additions & 8 deletions docs/generated/cli/connect.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
title: 'connect - CLI command'
description: 'Connect workspace to Nx Cloud'
description: 'Connect workspace to Nx Cloud.'
---

# connect

Connect workspace to Nx Cloud
Connect workspace to Nx Cloud.

## Usage

Expand All @@ -17,9 +17,9 @@ Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`

## Options

| Option | Type | Description |
| ----------------- | ------- | ---------------------------------------------------------------------------------------- |
| `--generateToken` | boolean | Explicitly asks for a token to be created, do not override existing tokens from Nx Cloud |
| `--help` | boolean | Show help |
| `--verbose` | boolean | Prints additional information about the commands (e.g., stack traces) |
| `--version` | boolean | Show version number |
| Option | Type | Description |
| ----------------- | ------- | ----------------------------------------------------------------------------------------- |
| `--generateToken` | boolean | Explicitly asks for a token to be created, do not override existing tokens from Nx Cloud. |
| `--help` | boolean | Show help. |
| `--verbose` | boolean | Prints additional information about the commands (e.g., stack traces). |
| `--version` | boolean | Show version number. |
Loading