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

Document fix and output behaviour for Node.js API usage #5971

Merged
merged 9 commits into from
Mar 17, 2022
6 changes: 6 additions & 0 deletions docs/user-guide/usage/node-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ Stylelint does not bother looking for a `.stylelintrc` file if you use this opti

A string to lint.

### `fix`

Boolean. If `true`, the autofixed code is available as the value of the output property in the returned object.

jlarmstrongiv marked this conversation as resolved.
Show resolved Hide resolved
### `cwd`

The directory from which Stylelint will look for files. Defaults to the current working directory returned by `process.cwd()`.
Expand Down Expand Up @@ -58,6 +62,8 @@ Boolean. If `true`, at least one rule with an "error"-level severity registered

A string displaying the formatted problems (using the default formatter or whichever you passed).

If the `fix` option is set to `true`, a string displaying the autofixed code.

jlarmstrongiv marked this conversation as resolved.
Show resolved Hide resolved
### `postcssResults`

An array containing all the accumulated [PostCSS LazyResults](https://api.postcss.org/LazyResult.html).
Expand Down