Skip to content

Commit 21e0c54

Browse files
hudochenkovJonathan Neal
authored andcommitted
Use Stylelint as a gatekeeper #508
1 parent b2f2835 commit 21e0c54

File tree

3 files changed

+43
-1
lines changed

3 files changed

+43
-1
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
npm-debug.log

.stylelintrc

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"rules": {
3+
"block-closing-brace-newline-after": "always",
4+
"block-closing-brace-newline-before": "always",
5+
"block-no-empty": true,
6+
"block-opening-brace-newline-after": "always",
7+
"block-opening-brace-space-before": "always",
8+
"color-hex-case": "lower",
9+
"color-hex-length": "short",
10+
"color-no-invalid-hex": true,
11+
"comment-empty-line-before": "always",
12+
"comment-whitespace-inside": "always",
13+
"declaration-block-no-single-line": true,
14+
"declaration-block-semicolon-newline-after": "always",
15+
"declaration-block-semicolon-space-before": "never",
16+
"declaration-colon-space-after": "always",
17+
"declaration-colon-space-before": "never",
18+
"indentation": 2,
19+
"max-empty-lines": 1,
20+
"max-line-length": 80,
21+
"no-eol-whitespace": true,
22+
"no-missing-eof-newline": true,
23+
"number-leading-zero": "always",
24+
"number-no-trailing-zeros": true,
25+
"rule-trailing-semicolon": "always",
26+
"selector-combinator-space-after": "always",
27+
"selector-combinator-space-before": "always",
28+
"selector-list-comma-newline-after": "always",
29+
"selector-list-comma-space-before": "never",
30+
"string-quotes": "double",
31+
"value-list-comma-space-after": "always",
32+
"value-list-comma-space-before": "never"
33+
}
34+
}

package.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,11 @@
1414
},
1515
"main": "normalize.css",
1616
"author": "Nicolas Gallagher",
17-
"license": "MIT"
17+
"license": "MIT",
18+
"devDependencies": {
19+
"stylelint": "^4.2.0"
20+
},
21+
"scripts": {
22+
"test": "stylelint normalize.css"
23+
}
1824
}

0 commit comments

Comments
 (0)