Use Stylelint as a gatekeeper #508

This commit is contained in:
Aleks Hudochenkov 2016-02-06 00:18:41 +03:00 committed by Jonathan Neal
parent b2f28355d8
commit 21e0c54ec0
3 changed files with 43 additions and 1 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
node_modules
npm-debug.log

34
.stylelintrc Normal file
View File

@ -0,0 +1,34 @@
{
"rules": {
"block-closing-brace-newline-after": "always",
"block-closing-brace-newline-before": "always",
"block-no-empty": true,
"block-opening-brace-newline-after": "always",
"block-opening-brace-space-before": "always",
"color-hex-case": "lower",
"color-hex-length": "short",
"color-no-invalid-hex": true,
"comment-empty-line-before": "always",
"comment-whitespace-inside": "always",
"declaration-block-no-single-line": true,
"declaration-block-semicolon-newline-after": "always",
"declaration-block-semicolon-space-before": "never",
"declaration-colon-space-after": "always",
"declaration-colon-space-before": "never",
"indentation": 2,
"max-empty-lines": 1,
"max-line-length": 80,
"no-eol-whitespace": true,
"no-missing-eof-newline": true,
"number-leading-zero": "always",
"number-no-trailing-zeros": true,
"rule-trailing-semicolon": "always",
"selector-combinator-space-after": "always",
"selector-combinator-space-before": "always",
"selector-list-comma-newline-after": "always",
"selector-list-comma-space-before": "never",
"string-quotes": "double",
"value-list-comma-space-after": "always",
"value-list-comma-space-before": "never"
}
}

View File

@ -14,5 +14,11 @@
}, },
"main": "normalize.css", "main": "normalize.css",
"author": "Nicolas Gallagher", "author": "Nicolas Gallagher",
"license": "MIT" "license": "MIT",
"devDependencies": {
"stylelint": "^4.2.0"
},
"scripts": {
"test": "stylelint normalize.css"
}
} }