nx/docs/generated/cli/format-check.md

33 lines
2.4 KiB
Markdown

---
title: 'format:check - CLI command'
description: 'Check for un-formatted files.'
---
# format:check
Check for un-formatted files.
## Usage
```shell
nx format:check
```
Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`.
## Options
| Option | Type | Description |
| ----------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| `--all` | boolean | Format all projects. |
| `--base` | string | Base of the current branch (usually main). |
| `--exclude` | string | Exclude certain projects from being processed. |
| `--files` | string | Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas or spaces. |
| `--head` | string | Latest commit of the current branch (usually HEAD). |
| `--help` | boolean | Show help. |
| `--libs-and-apps` | boolean | Format only libraries and applications files. |
| `--projects` | string | Projects to format (comma/space delimited). |
| `--uncommitted` | boolean | Uncommitted changes. |
| `--untracked` | boolean | Untracked changes. |
| `--version` | boolean | Show version number. |