From 21e0c54ec01538e2e95f4974cc6638f315820f5a Mon Sep 17 00:00:00 2001 From: Aleks Hudochenkov Date: Sat, 6 Feb 2016 00:18:41 +0300 Subject: [PATCH] Use Stylelint as a gatekeeper #508 --- .gitignore | 2 ++ .stylelintrc | 34 ++++++++++++++++++++++++++++++++++ package.json | 8 +++++++- 3 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 .gitignore create mode 100644 .stylelintrc diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..93f1361 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +node_modules +npm-debug.log diff --git a/.stylelintrc b/.stylelintrc new file mode 100644 index 0000000..64dead8 --- /dev/null +++ b/.stylelintrc @@ -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" + } +} diff --git a/package.json b/package.json index b6c26d2..de73392 100644 --- a/package.json +++ b/package.json @@ -14,5 +14,11 @@ }, "main": "normalize.css", "author": "Nicolas Gallagher", - "license": "MIT" + "license": "MIT", + "devDependencies": { + "stylelint": "^4.2.0" + }, + "scripts": { + "test": "stylelint normalize.css" + } }