Skip to content

Commit

Permalink
Add Sass related content to the document
Browse files Browse the repository at this point in the history
  • Loading branch information
gucong3000 committed Jan 22, 2018
1 parent 38a90a1 commit faa2ef5
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -19,7 +19,7 @@ A mighty, modern CSS linter and fixer that helps you avoid errors and enforce co
- **Automatically fixes some stylistic violations:** Save time by having stylelint fix your code with this *experimental* feature.
- **Shareable configs:** If you don't want to craft your own config, you can extend a shareable config. Or you can craft your own config and share with your team and/or the community.
- **Works with embedded styles:** Within `<style>` tags (used by Vue and Web Components) and Markdown code fences.
- **Parses *CSS-like* syntaxes:** The linter is powered by [PostCSS](https://github.com/postcss/postcss), so it can be configured and extended to understand any syntax that PostCSS can parse, including SCSS, [SugarSS](https://github.com/postcss/sugarss), and Less.
- **Parses *CSS-like* syntaxes:** The linter is powered by [PostCSS](https://github.com/postcss/postcss), so it can be configured and extended to understand any syntax that PostCSS can parse, including SASS, SCSS, [SugarSS](https://github.com/postcss/sugarss), and Less.
- **Options validator:** So that you can be confident that your config is valid.
- **Well tested:** Over ten thousand tests cover the internals and rules.
- **Growing community**: Used by [Facebook](https://code.facebook.com/posts/879890885467584/improving-css-quality-at-facebook-and-beyond/), [GitHub](https://github.com/primer/stylelint-config-primer), [Wikimedia](https://github.com/wikimedia/stylelint-config-wikimedia), [GSA](https://github.com/18F/stylelint-rules/), and [WordPress](https://github.com/ntwb/stylelint-config-wordpress/) among others.
Expand Down
4 changes: 2 additions & 2 deletions docs/user-guide/cli.md
Expand Up @@ -68,9 +68,9 @@ Linting all the `.css` files in the `foo` directory, using the `syntax` option:
stylelint "foo/**/*.css" --syntax scss
```

In addition to `--syntax scss`, stylelint supports `--syntax less` and `--syntax sugarss` by default. If you're using one of the default syntaxes, you may not need to provide a `--syntax` option as non-standard syntaxes can be automatically inferred from the following:
In addition to `--syntax scss`, stylelint supports `--syntax sass`, `--syntax less`, and `--syntax sugarss` by default. If you're using one of the default syntaxes, you may not need to provide a `--syntax` option as non-standard syntaxes can be automatically inferred from the following:

- The following file extensions: `.less`, `.scss`, and `.sss`.
- The following file extensions: `.sass`, `.scss`, `.less`, and `.sss`.
- The following values for the `lang` or `type` attribute on `<style>` tags (e.g. `lang="scss"`, `type="text/scss"`): `scss`, `less` and `sugarss`.
- The following Markdown code fencing markers (e.g. ```` ```scss ````): `scss`, `less` and `sugarss`.

Expand Down
1 change: 1 addition & 0 deletions docs/user-guide/css-processors.md
Expand Up @@ -13,6 +13,7 @@ You can run the linter before or after your css processors. Depending on which p

By default, the linter can *parse* any the following non-standard syntaxes by using special PostCSS parsers:

- SASS (using [`postcss-sass`](https://github.com/AleshaOleg/postcss-sass))
- SCSS (using [`postcss-scss`](https://github.com/postcss/postcss-scss))
- Less (using [`postcss-less`](https://github.com/shellscape/postcss-less))
- SugarSS (using [`sugarss`](https://github.com/postcss/sugarss))
Expand Down
2 changes: 1 addition & 1 deletion docs/user-guide/faq.md
Expand Up @@ -45,7 +45,7 @@ The stylelint community also maintains a [handful of plugins](complementary-tool

## How do I lint SCSS, Less, or other non-standard syntax?

stylelint can *parse* any the following non-standard syntaxes by default: SCSS, Less and SugarSS. Non-standard syntaxes can automatically be inferred from the following file extensions `.scss`, `.less`, and `.sss`; or else you can specify the syntax yourself.
stylelint can *parse* any the following non-standard syntaxes by default: SASS, SCSS, Less and SugarSS. Non-standard syntaxes can automatically be inferred from the following file extensions `.sass`, `.scss`, `.less`, and `.sss`; or else you can specify the syntax yourself.

Additionally, stylelint can accept any [PostCSS-compatible syntax](https://github.com/postcss/postcss#syntaxes) when using the CLI or Node API. Note, however, that stylelint can provide no guarantee that core rules will work with syntaxes other than the defaults listed above.

Expand Down
6 changes: 3 additions & 3 deletions docs/user-guide/node-api.md
Expand Up @@ -109,7 +109,7 @@ Use this report to clean up your codebase, keeping only the stylelint-disable co

### `maxWarnings`

Sets a limit to the number of warnings accepted. Will add a `maxWarningsExceeded` property to the returned data if the number of found warnings exceeds the given limit.
Sets a limit to the number of warnings accepted. Will add a `maxWarningsExceeded` property to the returned data if the number of found warnings exceeds the given limit.
The value is an Object (e.g. `{ maxWarnings: 0, foundWarnings: 12 }`).

*The recommended way to use this option is through the CLI.* It will exit with code 2 when `maxWarnings` is exceeded.
Expand All @@ -120,11 +120,11 @@ A path to a file containing patterns describing files to ignore. The path can be

### `syntax`

Options: `"scss"|"less"|"sugarss"`
Options: `"sass"|"scss"|"less"|"sugarss"`

Specify a non-standard syntax that should be used to parse source stylesheets.

If you do not specify a syntax, non-standard syntaxes will be automatically inferred by the file extensions `.scss`, `.less`, and `.sss`.
If you do not specify a syntax, non-standard syntaxes will be automatically inferred by the file extensions `.sass`, `.scss`, `.less`, and `.sss`.

See the [`customSyntax`](#customsyntax) option below if you would like to use stylelint with a custom syntax.

Expand Down

0 comments on commit faa2ef5

Please sign in to comment.