Skip to content

Commit 237c396

Browse files
committed
Add linting with stylelint
1 parent 2d42458 commit 237c396

File tree

6 files changed

+1844
-12
lines changed

6 files changed

+1844
-12
lines changed

.stylelintrc

+173
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
1+
{
2+
"plugins": [
3+
"stylelint-order"
4+
],
5+
"rules": {
6+
"at-rule-empty-line-before": ["always", {ignore: ["after-comment"], "except": ["first-nested", "blockless-after-blockless"]}],
7+
"at-rule-no-unknown": [true, {"ignoreAtRules": ["mixin", "content", "include"]}],
8+
"at-rule-no-vendor-prefix": true,
9+
"block-closing-brace-newline-after": "always",
10+
"block-closing-brace-newline-before": "always-multi-line",
11+
"block-closing-brace-space-before": "always-single-line",
12+
"block-no-empty": true,
13+
"block-opening-brace-newline-after": "always-multi-line",
14+
"block-opening-brace-space-after": "always-single-line",
15+
"block-opening-brace-space-before": "always",
16+
"color-hex-case": "lower",
17+
"color-hex-length": "short",
18+
"color-no-invalid-hex": true,
19+
"comment-empty-line-before": "always",
20+
"comment-whitespace-inside": "always",
21+
"declaration-bang-space-after": "never",
22+
"declaration-bang-space-before": "always",
23+
"declaration-block-no-shorthand-property-overrides": true,
24+
"declaration-block-semicolon-newline-after": "always-multi-line",
25+
"declaration-block-semicolon-space-after": "always-single-line",
26+
"declaration-block-semicolon-space-before": "never",
27+
"declaration-block-single-line-max-declarations": 1,
28+
"declaration-block-trailing-semicolon": "always",
29+
"declaration-colon-newline-after": "always-multi-line",
30+
"declaration-colon-space-after": "always-single-line",
31+
"declaration-colon-space-before": "never",
32+
"declaration-property-value-blacklist": {"/^border/": ["none"]},
33+
"function-calc-no-unspaced-operator": true,
34+
"function-comma-newline-after": "always-multi-line",
35+
"function-comma-space-after": "always-single-line",
36+
"function-comma-space-before": "never",
37+
"function-linear-gradient-no-nonstandard-direction": true,
38+
"function-parentheses-newline-inside": "always-multi-line",
39+
"function-parentheses-space-inside": "never-single-line",
40+
"function-url-quotes": "always",
41+
"function-whitespace-after": "always",
42+
"indentation": 2,
43+
"length-zero-no-unit": true,
44+
"max-empty-lines": 1,
45+
"max-line-length": [80, {"ignore": "non-comments"}],
46+
"media-feature-colon-space-after": "always",
47+
"media-feature-colon-space-before": "never",
48+
"media-feature-name-no-unknown": true,
49+
"media-feature-name-no-vendor-prefix": true,
50+
"media-feature-parentheses-space-inside": "never",
51+
"media-feature-range-operator-space-after": "always",
52+
"media-feature-range-operator-space-before": "always",
53+
"media-query-list-comma-newline-after": "always-multi-line",
54+
"media-query-list-comma-space-after": "always-single-line",
55+
"media-query-list-comma-space-before": "never",
56+
"no-eol-whitespace": true,
57+
"no-missing-end-of-source-newline": true,
58+
"no-unknown-animations": true,
59+
"number-leading-zero": "always",
60+
"number-no-trailing-zeros": true,
61+
"order/properties-order": [
62+
[
63+
"box-sizing",
64+
"display",
65+
"content",
66+
"position",
67+
"z-index",
68+
"top",
69+
"right",
70+
"bottom",
71+
"left",
72+
"opacity",
73+
"transform",
74+
"transform-origin",
75+
"transform-style",
76+
"flex",
77+
"order",
78+
"align-self",
79+
"flex-direction",
80+
"justify-content",
81+
"align-items",
82+
"flex-wrap",
83+
"align-content",
84+
"flex-flow",
85+
"overflow",
86+
"overflow-x",
87+
"overflow-y",
88+
"width",
89+
"min-width",
90+
"max-width",
91+
"height",
92+
"min-height",
93+
"max-height",
94+
"padding",
95+
"padding-top",
96+
"padding-right",
97+
"padding-bottom",
98+
"padding-left",
99+
"border",
100+
"border-top",
101+
"border-right",
102+
"border-bottom",
103+
"border-left",
104+
"border-color",
105+
"border-style",
106+
"border-width",
107+
"border-radius",
108+
"margin",
109+
"margin-top",
110+
"margin-right",
111+
"margin-bottom",
112+
"margin-left",
113+
"list-style",
114+
"list-style-image",
115+
"list-style-position",
116+
"list-style-type",
117+
"background",
118+
"background-clip",
119+
"background-color",
120+
"background-image",
121+
"background-origin",
122+
"background-position",
123+
"background-repeat",
124+
"background-size",
125+
"fill",
126+
"box-shadow",
127+
"outline",
128+
"text-align",
129+
"text-decoration",
130+
"text-overflow",
131+
"text-shadow",
132+
"text-transform",
133+
"white-space",
134+
"font",
135+
"font-family",
136+
"font-size",
137+
"font-style",
138+
"font-weight",
139+
"line-height",
140+
"letter-spacing",
141+
"color",
142+
"animation",
143+
"animation-delay",
144+
"animation-direction",
145+
"animation-duration",
146+
"animation-name",
147+
"transition",
148+
"transition-delay",
149+
"transition-duration",
150+
"transition-property"
151+
],
152+
{"unspecified": "bottomAlphabetical"}
153+
],
154+
"property-no-unknown": [true, {"checkPrefixed": true}],
155+
"property-no-vendor-prefix": true,
156+
"selector-combinator-space-after": "always",
157+
"selector-combinator-space-before": "always",
158+
"selector-list-comma-newline-after": "always",
159+
"selector-list-comma-space-before": "never",
160+
"selector-no-vendor-prefix": true,
161+
"selector-pseudo-class-no-unknown": true,
162+
"selector-pseudo-element-colon-notation": "double",
163+
"selector-pseudo-element-no-unknown": true,
164+
"selector-type-no-unknown": true,
165+
"shorthand-property-no-redundant-values": true,
166+
"string-quotes": "single",
167+
"unit-no-unknown": true,
168+
"value-list-comma-newline-after": "always-multi-line",
169+
"value-list-comma-space-after": "always-single-line",
170+
"value-list-comma-space-before": "never",
171+
"value-no-vendor-prefix": true
172+
}
173+
}

.travis.yml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
language: node_js
3+
node_js:
4+
- '8'
5+
6+
sudo: false
7+
8+
cache:
9+
directories:
10+
- node_modules
11+
12+
install:
13+
- npm install
14+
15+
script:
16+
- yarn run lint

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@ simple-css-reset
44
================
55

66
A simple, no-nonsense CSS reset stylesheet.
7+
8+
[![Build Status](https://travis-ci.org/mirego/simple-css-reset.svg?branch=master)](https://travis-ci.org/mirego/simple-css-reset)

0 commit comments

Comments
 (0)