1
1
mirror of https://github.com/primer/css.git synced 2024-12-23 22:24:11 +03:00
The CSS design system that powers GitHub
Go to file
2017-08-14 13:47:36 -07:00
tests We don't need to test against primer-utilities 2017-07-12 09:18:29 -07:00
.eslintrc.json Adding eslint to lint js files 2016-07-05 15:39:39 -04:00
.gitignore npm-debug.log in gitignore 2016-06-14 13:32:41 -04:00
.npmignore Fixing tests and making unsupported features a warning 2016-07-14 14:22:44 -04:00
.travis.yml initial commit 2016-06-14 10:23:10 -04:00
CHANGELOG.md update changelog for 2.0.0 2017-07-14 15:46:50 -07:00
index.js browsers not picked up by plugin 2017-08-14 13:47:36 -07:00
LICENSE initial commit 2016-06-14 10:23:10 -04:00
package.json browsers not picked up by plugin 2017-08-14 13:47:36 -07:00
README.md Removing docs about the config 2017-01-01 10:42:58 -05: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