stylelint-config-sass-guidelines

    9.0.1 • Public • Published

    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:

    Translations

    Installation

    $ npm i -D stylelint 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, to change the indentation to tabs and turn off the number-leading-zero rule:

    {
      "extends": "stylelint-config-sass-guidelines",
      "rules": {
        "indentation": "tab",
        "number-leading-zero": null
      }
    }

    Lint Rule Comparison

    Lint Report Comparison

    Documentation

    Configured lints

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

    At-rule

    Block

    Color

    Declaration

    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

    Number

    Property

    Rule

    • rule-nested-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.
    • rule-non-nested-empty-line-before: There must always be an empty line before multi-line rules. Ignore: Rules that come after a comment.

    SCSS

    Selector

    String

    • string-quotes: Strings must always be wrapped with single quotes.

    Stylelint Disable Comment

    Value

    Changelog

    Contributors

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

    License

    Install

    npm i stylelint-config-sass-guidelines

    DownloadsWeekly Downloads

    242,031

    Version

    9.0.1

    License

    MIT

    Unpacked Size

    27.9 kB

    Total Files

    5

    Last publish

    Collaborators

    • bjankord