@move-elevator/stylelint-config-scss
v2.0.0
Published
Configuration for Stylelint using SCSS (Sass).
Readme
@move-elevator/stylelint-config-scss
A shareable Stylelint configuration for SCSS (Sass) projects.
Installation
npm i -D @move-elevator/stylelint-config-scssPeer Dependencies
This package requires the following peer dependencies:
npm i -D postcss-scss stylelint stylelint-order stylelint-scss @stylistic/stylelint-pluginUsage
Create a stylelint config file like .stylelintrc.json in your project root and extend this configuration:
{
"extends": "@move-elevator/stylelint-config-scss/.stylelintrc.json"
}What's Included
This configuration uses postcss-scss as the custom syntax and includes the following plugins:
- @stylistic/stylelint-plugin - Stylistic rules for formatting
- stylelint-order - Property ordering rules
- stylelint-scss - SCSS-specific linting rules
Key Rules
| Rule | Setting |
|-------------------------|---------------------------|
| Block opening brace | Space before |
| Color hex case | Lowercase |
| Color hex length | Long format (#ffffff) |
| Leading zero | Required (0.5 not .5) |
| Max nesting depth | 4 levels |
| Named colors | Not allowed |
| Properties order | Alphabetical |
| Pseudo-element notation | Double colon (::before) |
| Selector class pattern | BEM or kebab-case |
| String quotes | Double quotes |
| Trailing semicolon | Required |
