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

Fix --print-config description in CLI help #6914

Merged
merged 2 commits into from Jun 13, 2023
Merged
Show file tree
Hide file tree
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
5 changes: 5 additions & 0 deletions .changeset/sixty-masks-sip.md
@@ -0,0 +1,5 @@
---
"stylelint": patch
---

Fixed: `--print-config` description in CLI help
10 changes: 9 additions & 1 deletion docs/user-guide/cli.md
Expand Up @@ -94,7 +94,7 @@ Path of file to write a report. Stylelint outputs the report to the specified `f

### `--print-config`

Print the configuration for the given path. Stylelint outputs the configuration used for the file passed.
Print the configuration for the given input path. Globs are unsupported.

### `--quiet, -q`

Expand Down Expand Up @@ -206,6 +206,14 @@ Ensure output on successful runs:
stylelint -f verbose "foo/**/*.css"
```

### Example J - print a config

Print a configuration used for the given input file:

```shell
stylelint test.css --print-config
```

## Exit codes

The CLI can exit the process with the following exit codes:
Expand Down
4 changes: 2 additions & 2 deletions lib/__tests__/__snapshots__/cli.test.js.snap
Expand Up @@ -35,9 +35,9 @@ exports[`CLI --help 1`] = `
"plugins", and "customSyntax" are *relative to*. Only necessary if these
values are relative paths.

--print-config <path>
--print-config

Print the configuration for the given path.
Print the configuration for the given input file path. Globs are unsupported.

--ignore-path, -i <path>

Expand Down
4 changes: 2 additions & 2 deletions lib/cli.js
Expand Up @@ -126,9 +126,9 @@ const meowOptions = {
"plugins", and "customSyntax" are *relative to*. Only necessary if these
values are relative paths.

--print-config <path>
--print-config

Print the configuration for the given path.
Print the configuration for the given input file path. Globs are unsupported.

--ignore-path, -i <path>

Expand Down