Say Media's stylelint config
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
CHANGELOG.md
README.md
index.js
package.json

README.md

stylelint-config-saymedia

A sharable stylelint config object that enforces Say Media's CSS Standards

Installation

Install stylelint and stylelint-config-saymedia:

npm install stylelint saymedia/stylelint-config-saymedia --save-dev

Usage

If you've installed stylelint-config-saymedia locally within your project, just set your stylelint config to:

{
  "extends": "stylelint-config-saymedia"
}

Extending the config

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

For example, to change the at-rule-no-unknown rule to use its ignoreAtRules option, change the indentation to tabs, turn off the number-leading-zero rule,and add the unit-whitelist rule:

{
  "extends": "stylelint-config-saymedia",
  "rules": {
    "at-rule-no-unknown": [ true, {
      "ignoreAtRules": [
        "extends",
        "ignores"
      ]
    }],
    "indentation": "tab",
    "number-leading-zero": null,
    "unit-whitelist": ["em", "rem", "s"]
  }
}

Documentation

Extends

Plugins

Configured Lints

This is a list of the lints turned on in this configuration (beyond the ones that come from stylelint-config-recommended), and what they do.

At-rule

Block

Color

Custom Property

Declaration

Font Family

Function

General / Sheet

  • indentation: Use 4 spaces for indentation
  • max-line-length: Limit line lengths to 100 characters (excluding comments)
  • no-descending-specificity: Disallow selectors of lower specificity from coming after overriding selectors of higher specificity. disabled temporarily, due to false positives, pending #2489

Media Feature

Property

Rule

Selector

String

Time

Value

SCSS

@else, @if
@function
@mixin
$variable
%placeholder
// comment
Other

Changelog

License