Skip to content

Commit

Permalink
Make role of syntaxes clearer
Browse files Browse the repository at this point in the history
  • Loading branch information
jeddy3 committed Oct 18, 2021
1 parent 6678fa9 commit 5384f54
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions docs/migration-guide/to-14.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ There are five changes that may affect you:

### `syntax` option and automatic inferral of syntax

Stylelint no longer includes syntaxes that:
Stylelint no longer includes the syntaxes that:

- parse CSS-like syntaxes like SCSS, Sass, Less and SugarSS
- parse CSS-like languages like SCSS, Sass, Less and SugarSS
- extract styles from HTML, Markdown and CSS-in-JS object & template literals

If you use Stylelint to lint anything other than CSS files, you will need to install and configure these syntaxes. We recommend [extending](../user-guide/configure.md#extends) a shared config that includes the appropriate [PostCSS syntax](https://github.com/postcss/postcss#syntaxes) for you. For example, if you use Stylelint to lint SCSS, you can extend the [stylelint-config-standard-scss shared config](https://www.npmjs.com/package/stylelint-config-standard-scss).
Expand Down
8 changes: 4 additions & 4 deletions docs/user-guide/get-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

Stylelint is designed for CSS.

However, it can be extended to:
However, it can used with [PostCSS syntaxes](https://github.com/postcss/postcss#syntaxes) that:

- parse CSS-like syntaxes like SCSS, Less and SugarSS
- parse CSS-like languages like SCSS, Less and SugarSS
- extract styles from HTML, JavaScript and Markdown

## Linting CSS
Expand All @@ -31,7 +31,7 @@ npx stylelint "**/*.css"

## Linting everything else

We recommend using a shared config [that extends](../user-guide/configure.md#extends) Stylelint to make it compatible with the language or library. For example, you can extend the [stylelint-config-standard-scss shared config](https://www.npmjs.com/package/stylelint-config-standard-scss) to lint SCSS.
You'll need to use a [PostCSS syntax](https://github.com/postcss/postcss#syntaxes). We recommend [extending](../user-guide/configure.md#extends) a shared config that includes the appropriate syntax for your preferred language or library. For example, you can extend the [stylelint-config-standard-scss shared config](https://www.npmjs.com/package/stylelint-config-standard-scss) to lint SCSS.

1\. Use [npm](https://docs.npmjs.com/about-npm/) to install Stylelint and the shared config:

Expand All @@ -53,7 +53,7 @@ npm install --save-dev stylelint stylelint-config-standard-scss
npx stylelint "**/*.scss"
```

This config configures the [built-in rules](../user-guide/rules/list.md) for SCSS, and includes the [postcss-scss syntax](https://github.com/postcss/postcss-scss) and [stylelint-scss plugin](https://www.npmjs.com/package/stylelint-scss) (a collection of rules specific to SCSS).
This config includes the [postcss-scss syntax](https://github.com/postcss/postcss-scss), configures the [built-in rules](../user-guide/rules/list.md) for SCSS, and includes the [stylelint-scss plugin](https://www.npmjs.com/package/stylelint-scss) (a collection of rules specific to SCSS).

If a shared config isn't available for your preferred language or library, then you can install the appropriate [PostCSS syntax](https://github.com/postcss/postcss#syntaxes) yourself and use the [`customSyntax` option](../user-guide/usage/options.md#customSyntax) to configure it.

Expand Down

0 comments on commit 5384f54

Please sign in to comment.