JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q52543F
  • License MIT

A sensible Scss config for Stylelint

Package Exports

  • stylelint-config-sensible-scss

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (stylelint-config-sensible-scss) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

stylelint-config-sensible-scss

The sharable Scss config for Stylelint with sensible defaults

Installation

$ npm install --save-dev stylelint-config-sensible-scss

Usage

Set your Stylelint config to:

{
    "extends": "stylelint-config-sensible-scss"
}

Extending the config

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

To change color-hex-length to "long", turn off the block-no-empty rule and add the unit-whitelist rule:

{
    "extends": "stylelint-config-sensible-scss",
    "rules": {
        "block-no-empty": null,
        "color-hex-length": "long",
        "unit-whitelist": ["em", "rem"]
    }
}

Documentation

Plugins

  • stylelint-order: A plugin pack of order related linting rules for stylelint.
  • stylelint-scss: A collection of SCSS specific linting rules for stylelint

Configured lints

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

At-rule

  • at-rule-blacklist: Specify a blacklist of disallowed at-rules.
    • "debug" Disallow the use of @debug.
  • at-rule-no-vendor-prefix: Disallow vendor prefixes for at-rules, prefer to use Autoprefixer for adding relevent prefixes.

Block

Color

Comments

  • comment-empty-line-before : There must always be an empty line before comments. Except: first-nested. Ignore: stylelint-commands.

Declaration

Declaration block

Declaration Property

  • declaration-property-value-blacklist: Specify a blacklist of disallowed property and value pairs within declarations.
    • ^border: Disallow the use of the word none for borders, use 0 instead.

Function

General

Media Feature

Number

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. Except: Rules that come after a comment and first nested rules.

Selector

String

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

Value

SCSS

Order

  • order/order: Order of content within declaration blocks. custom-properties (--property: 10px;), then dollar-variables ($variable), then declarations
  • order/properties-order: Order of properties within declaration blocks.

Changelog

License