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 autofixing caveats explanation #2667

Merged
merged 2 commits into from
Jun 26, 2017
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
4 changes: 4 additions & 0 deletions docs/user-guide/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ Linting all `.css` files in the `foo` directory. And fixing source files if viol
stylelint "foo/*.css" --fix
```

**Note:** It's an _experimental_ feature. It currently does not respect special comments for disabling stylelint within sources (e. g. `/* stylelint-disable /*`). Autofixing will be applied regardless of these comments.

If you're using both these special comments and autofixing, please run stylelint twice as a temporary solution. On the first run, some violations could be missed, or some violations might be reported incorrectly.

## Syntax errors

The CLI informs you about syntax errors in your CSS.
Expand Down
3 changes: 1 addition & 2 deletions docs/user-guide/node-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,7 @@ Note, however, that stylelint can provide no guarantee that core rules will work

### `fix`

If `true`, stylelint will fix as many errors as possible. The fixes are made to the actual source files. All unfixed errors will be reported.

If `true`, stylelint will fix as many errors as possible. The fixes are made to the actual source files. All unfixed errors will be reported. See [Autofixing errors](cli.md#autofixing-errors) docs.

## The returned promise

Expand Down