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

Add missing flags for the astro check command #8237

Merged
merged 5 commits into from
May 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
24 changes: 24 additions & 0 deletions src/content/docs/en/reference/cli-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,30 @@ Use these flags to customize the behavior of the command.

The command will watch for any changes in your project, and will report any errors.

#### `--root <path-to-dir>`

Specifies a different root directory to check. Uses the current working directory by default.

#### `--tsconfig <path-to-file>`

Specifies a `tsconfig.json` or `jsconfig.json` file to use manually. If not provided, Astro will attempt to find a config, or infer the project's config automatically.

#### `--minimumFailingSeverity <error|warning|hint>`

Specifies the minimum severity needed to exit with an error code. Defaults to `error`.

For example, running `astro check --minimumFailingSeverity warning` will cause the command to exit with an error if any warnings are detected.

#### `--minimumSeverity <error|warning|hint>`

Specifies the minimum severity to output. Defaults to `hint`.

For example, running `astro check --minimumSeverity warning` will show errors and warning, but not hints.

#### `--preserveWatchOutput`

Specifies not to clear the ouput between checks when in watch mode.

<ReadMore>Read more about [type checking in Astro](/en/guides/typescript/#type-checking).</ReadMore>

## `astro sync`
Expand Down