1
1
mirror of https://github.com/primer/css.git synced 2024-12-29 17:12:27 +03:00
css/tools/stylelint-config-primer
Jon Rohan b6c9841301 Publish
- primer-base@1.7.0
 - primer-core@6.8.0
 - primer-tooltips@1.5.3
 - primer-utilities@4.9.0
 - primer@10.4.0
 - stylelint-config-primer@2.2.5
 - stylelint-selector-no-utility@1.8.5
2018-03-20 10:22:20 -07:00
..
tests move everything to tools/stylelint-config-primer 2017-10-09 11:45:50 -07:00
.eslintrc.json bring back .eslintrc.json 2017-10-09 12:05:46 -07:00
index.js move everything to tools/stylelint-config-primer 2017-10-09 11:45:50 -07:00
LICENSE Happy new year 2018-01-03 15:05:16 -08:00
package.json Publish 2018-03-20 10:22:20 -07:00
README.md Updates to stylelint package links/docs for new structure 2017-12-08 15:04:27 -08:00

Primer Stylelint Config

NPM version Build Status

A sharable stylelint config object that enforces GitHub's css rules

Install

$ npm install --save stylelint-config-primer

Usage

Within your stylelint config object You can extend this configuration. This will serve as a base for your config, then you can make overrides in your own config object.

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

Documentation

Plugins

Configured lints

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

At-rule

Block

Color

Comment

  • comment-empty-line-before: There must always be an empty line before comments. Except: Comments that are nested and the first child of their parent node. Ignore: stylelint commands
  • comment-whitespace-inside: There must always be whitespace inside the markers.

Declaration

Declaration block

Declaration Property

  • declaration-property-value-blacklist: Specify a blacklist of disallowed property and value pairs within declarations.
    • ^transition: Disallow the use of all within transitions.
    • ^background: Disallow the use of http: protocols within background image urls.
    • ^border: Disallow the use of the word none for borders, use 0 instead.
    • .+: For everything ban the use of the word initial.

Font Family

Function

General

Media Feature

Media Query

Media Query List

Number

Length

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.

Selector

Selector List

String

Unit

Value

Value list

License

MIT © GitHub