stylelint-scss
's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.Name | Version | Size | License | Type | Vulnerabilities |
---|---|---|---|---|---|
known-css-properties | 0.28.0 | 7.09 kB | MIT | prod | |
postcss-media-query-parser | 0.2.3 | 7.08 kB | MIT | prod | |
postcss-resolve-nested-selector | 0.1.1 | 1.88 kB | MIT | prod | 1 |
postcss-selector-parser | 6.0.15 | 41.74 kB | MIT | prod peer | |
postcss-value-parser | 4.2.0 | 7.81 kB | MIT | prod | |
stylelint | 15.11.0 | 176.68 kB | MIT | prod peer | 1 1 3 |
Stylelint-scss is a collection of SCSS-specific linting rules for Stylelint, in the form of a plugin. With a focus on standard CSS, Stylelint offers support for the SCSS syntax and introduces some specific rules for SCSS linting. However, Stylelint-scss takes it a step further by introducing even more rules that are specifically tailored to the SCSS syntax. This provides a more comprehensive linting solution for developers who are working extensively with SCSS.
Using Stylelint-scss is straightforward. It's recommended to use it in conjuction with the stylelint-config-standard-scss shared config. However, if you're creating a config from scratch, here's how you can do it:
First, install stylelint-scss and Stylelint (if you haven't done it already) via npm:
npm install stylelint stylelint-scss
Then, create or open the .stylelintrc.json
config file, include stylelint-scss
in the plugins array and add the rules you need in the rules list. Note that all rules from stylelint-scss need to be namespaced with scss
:
{
"plugins": ["stylelint-scss"],
"rules": {
"at-rule-no-unknown": null,
"scss/at-rule-no-unknown": true,
"scss/dollar-variable-pattern": "^foo",
"scss/selector-no-redundant-nesting-selector": true
}
}
You can find the Stylelint-scss docs in the GitHub repository at https://github.com/stylelint-scss/stylelint-scss
. This documentation gives a detailed overview of the purpose of the Stylelint-scss plugin, installation and use instructions, and the plugin’s rule list. The rules are grouped by the thing they apply to, aligning with the grouping in Stylelint's user guide. Detailed information about creating, enhancing, debugging rules, and even improving the documentation or contributing to Stylelint can also be found here.