Skip to content

bjankord/stylelint-config-sass-guidelines

Folders and files

NameName
Last commit message
Last commit date

Latest commit

f04c797 · Jan 16, 2025
May 25, 2024
Jan 16, 2025
Jun 28, 2016
May 25, 2024
Sep 14, 2024
Jul 13, 2016
Sep 1, 2020
Feb 24, 2018
Jul 11, 2024
Oct 30, 2021
May 25, 2024
Jan 16, 2025
Sep 14, 2024

Repository files navigation

stylelint-config-sass-guidelines

NPM version Build Status Known Vulnerabilities contributions welcome Downloads per month

A stylelint config inspired by sass-guidelin.es.

This linter has been designed / tested with SCSS syntax based on the SCSS guidelines documented in https://sass-guidelin.es/. It is intended for use with SCSS syntax, not Sass (tab style) syntax.

This config:

Installation

Using NPM

$ npm i -D stylelint postcss stylelint-config-sass-guidelines

Using Yarn

$ yarn add -D stylelint postcss stylelint-config-sass-guidelines

Using PNPM

$ pnpm add -D stylelint postcss stylelint-config-sass-guidelines

Usage

Set your stylelint config to:

{
  "extends": "stylelint-config-sass-guidelines"
}

Extending the config

Simply add a "rules" key to your config and add your overrides there.

For example:

{
  "extends": "stylelint-config-sass-guidelines",
  "rules": {
    "selector-max-compound-selectors": 4,
    "value-no-vendor-prefix": false
  }
}

Documentation

Configured lints

This is a list of the lints turned on in this configuration, and what they do.

At-Rule

Block

Color

Declaration Block

Declaration Property

  • declaration-property-value-disallowed-list: Specify a list of disallowed property and value pairs within declarations.
    • ^border: Disallow the use of the word none for borders, use 0 instead. The intent of this rule is to enforce consistency, rather than define which is "better."

Function

General

Media Feature

Property

Rule

  • rule-empty-line-before: There must always be an empty line before multi-line rules. Except: Nested rules that are the first of their parent rule. Ignore: Rules that come after a comment.

SCSS

Selector

Stylistic

Value

Contributors

stylelint-config-sass-guidelines is maintained by Brett Jankord and contributions from the community. Without the code contributions from all these fantastic people, stylelint-config-sass-guidelines would not exist.