Skip to content

saymedia/stylelint-config-saymedia

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

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

About

Say Media's stylelint config

Resources

Stars

Watchers

Forks

Packages

No packages published