-
Notifications
You must be signed in to change notification settings - Fork 1
/
.stylelintrc.yml
412 lines (324 loc) · 14.9 KB
/
.stylelintrc.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
# Custom configuration for Stylelint.
#
# Preset all items to warning to prevent breaking themes.
# Delete line to activate linter build-breaking errors.
defaultSeverity: warning
# Plugins integrated.
plugins:
- stylelint-scss
# Rules are grouped in 3 categories and then by the context they apply to.
# - Possible errors
# - Limit language features
# - Stylistic issues
rules:
### Possible errors
## Color.
# Disallow invalid hex colors.
# https://stylelint.io/user-guide/rules/color-no-invalid-hex/
color-no-invalid-hex: true
## Font family.
# Disallow duplicate font family names.
# https://stylelint.io/user-guide/rules/font-family-no-duplicate-names/
font-family-no-duplicate-names: true
# Disallow duplicate font family names.
# https://stylelint.io/user-guide/rules/font-family-no-duplicate-names/
font-family-no-missing-generic-family-keyword: true
## Function.
# Disallow an invalid expression within calc functions.
# https://stylelint.io/user-guide/rules/function-calc-no-invalid/
function-calc-no-invalid: true
# Include spaces around operators.
# https://stylelint.io/user-guide/rules/function-calc-no-unspaced-operator/
function-calc-no-unspaced-operator: true
# Prevent invalid linear-gradient syntax.
# https://stylelint.io/user-guide/rules/function-linear-gradient-no-nonstandard-direction/
function-linear-gradient-no-nonstandard-direction: true
## String.
# Require escaped new lines in strings.
# https://stylelint.io/user-guide/rules/string-no-newline/
string-no-newline: true
## Unit.
# Disallow unknown units.
# https://stylelint.io/user-guide/rules/unit-no-unknown/
unit-no-unknown: true
## Property.
# Disallow unknown properties.
# https://stylelint.io/user-guide/rules/property-no-unknown/
property-no-unknown: true
## Keyframe declaration.
# Disallow `!important` within keyframe declarations.
# https://stylelint.io/user-guide/rules/keyframe-declaration-no-important/
keyframe-declaration-no-important: true
## Declaration block.
# Disallow duplicate properties within declaration blocks.
# https://stylelint.io/user-guide/rules/declaration-block-no-duplicate-properties/
declaration-block-no-duplicate-properties:
- true
- ignore:
- consecutive-duplicates-with-different-values
# Disallow shorthand properties that override related longhand properties.
# https://stylelint.io/user-guide/rules/declaration-block-no-shorthand-property-overrides/
declaration-block-no-shorthand-property-overrides: true
## Block.
# Disallow empty blocks.
# https://stylelint.io/user-guide/rules/block-no-empty/
block-no-empty: true
## Selector.
# Disallow unknown pseudo-class selectors.
# https://stylelint.io/user-guide/rules/selector-pseudo-class-no-unknown/
selector-pseudo-class-no-unknown: true
# Disallow unknown pseudo-element selectors.
# https://stylelint.io/user-guide/rules/selector-pseudo-element-no-unknown/
selector-pseudo-element-no-unknown: true
# Disallow unknown type selectors.
# https://stylelint.io/user-guide/rules/selector-type-no-unknown/
selector-type-no-unknown: true
## Media feature
# Disallow unknown media feature names.
# https://stylelint.io/user-guide/rules/media-feature-name-no-unknown/
media-feature-name-no-unknown: true
## At-rule
# Disallow unknown at-rules.
# https://stylelint.io/user-guide/rules/at-rule-no-unknown/
#at-rule-no-unknown:
# - true
# - ignoreAtRules:
# - 'include'
## Comment
# Disallow empty comments.
# https://stylelint.io/user-guide/rules/comment-no-empty/
comment-no-empty: true
## General / Sheet
# Disallow duplicate @import rules within a stylesheet.
# https://stylelint.io/user-guide/rules/no-duplicate-at-import-rules/
no-duplicate-at-import-rules: true
# Disallow duplicate selectors.
# https://stylelint.io/user-guide/rules/no-duplicate-selectors/
no-duplicate-selectors: true
# Disallow empty sources.
# https://stylelint.io/user-guide/rules/no-empty-source/
# Rule canceled out due to lack of understanding.
no-empty-source: null
# Disallow extra semicolons.
# https://stylelint.io/user-guide/rules/no-extra-semicolons/
no-extra-semicolons: true
# Disallow double-slash comments in css (not scss)
# This issue only affects *.css files.
# https://stylelint.io/user-guide/rules/no-invalid-double-slash-comments/
no-invalid-double-slash-comments: true
# -----------------------
### Limit language features
## Color
# Disallow named colors.
# https://stylelint.io/user-guide/rules/color-named/
color-named:
- never
- ignore:
- inside-function
## Shorthand property
# Disallow redundant values in shorthand properties.
# https://github.com/stylelint/stylelint/blob/master/lib/rules/shorthand-property-no-redundant-values/README.md
shorthand-property-no-redundant-values: true
## Value
# Disallow vendor prefixes for values.
# https://stylelint.io/user-guide/rules/value-no-vendor-prefix/
value-no-vendor-prefix: true
## Property
# Disallow vendor prefixes for properties.
# https://stylelint.io/user-guide/rules/property-no-vendor-prefix/
property-no-vendor-prefix: true
## Declaration
# Disallow !important within declarations.
# https://stylelint.io/user-guide/rules/declaration-no-important/
declaration-no-important: true
# Specify a blacklist of disallowed property and value pairs within declarations.
# https://stylelint.io/user-guide/rules/declaration-property-value-blacklist/
declaration-property-value-blacklist:
# Prefer the terser border: 0 over border: none.
//bborder\b/:
- none
## Selector
# Limit the number of adjacent empty lines within selectors.
# https://stylelint.io/user-guide/rules/selector-max-empty-lines/
selector-max-empty-lines: 0
# Disallow qualifying a selector by type.
# https://stylelint.io/user-guide/rules/selector-no-qualifying-type/
selector-no-qualifying-type:
- true
- ignore:
- attribute
# -----------------------
### Stylistic issues
# Specify indentation.
# https://stylelint.io/user-guide/rules/indentation/
indentation: 2
## Color
# Specify lowercase or uppercase for hex colors.
# https://stylelint.io/user-guide/rules/color-hex-case/
color-hex-case: lower
## Function
# Require a single space after the commas of functions.
# https://stylelint.io/user-guide/rules/function-comma-space-after/
function-comma-space-after: always
# Disallow whitespace before the commas of functions.
# https://stylelint.io/user-guide/rules/function-comma-space-before/
function-comma-space-before: never
# Specify lowercase for function names.
# https://stylelint.io/user-guide/rules/function-name-case/
function-name-case: lower
# Disallow whitespace on the inside of the parentheses of functions.
# https://stylelint.io/user-guide/rules/function-parentheses-space-inside/
function-parentheses-space-inside: never
# Require quotes for urls.
# https://stylelint.io/user-guide/rules/function-url-quotes/
function-url-quotes: always
# Require whitespace after functions.
# https://stylelint.io/user-guide/rules/function-whitespace-after/
function-whitespace-after: always
## Number
# Require a leading zero for fractional numbers less than 1.
# https://stylelint.io/user-guide/rules/number-leading-zero/
number-leading-zero: always
# Disallow trailing zeros in numbers
# https://stylelint.io/user-guide/rules/number-no-trailing-zeros/
number-no-trailing-zeros: true
## String
# Prefer single quotes.
# https://stylelint.io/user-guide/rules/string-quotes/
string-quotes: single
## Length
# Disallow units for zero lengths.
# https://stylelint.io/user-guide/rules/length-zero-no-unit/
length-zero-no-unit: true
## Unit
# Specify lowercase or uppercase for units.
# https://stylelint.io/user-guide/rules/unit-case/
unit-case: lower
## Value
# Specify lowercase for keywords values.
# https://stylelint.io/user-guide/rules/value-keyword-case/
value-keyword-case: lower
## Value list
# Require a newline after the commas of value lists.
# https://stylelint.io/user-guide/rules/value-list-comma-newline-after/
value-list-comma-newline-after: always-multi-line
# Disallow whitespace before the commas in multi-line value lists.
# https://stylelint.io/user-guide/rules/value-list-comma-newline-before/
value-list-comma-newline-before: never-multi-line
# Require a single space after the commas of value lists.
# https://stylelint.io/user-guide/rules/value-list-comma-space-after/
value-list-comma-space-after: always-single-line
# Disallow whitespace before the commas of value lists.
# https://stylelint.io/user-guide/rules/value-list-comma-space-before/
value-list-comma-space-before: never
# Limit the number of adjacent empty lines within value lists.
# https://stylelint.io/user-guide/rules/value-list-max-empty-lines/
value-list-max-empty-lines: 0
## Property
# Specify lowercase for properties.
# https://stylelint.io/user-guide/rules/property-case/
property-case: lower
## Declaration
# Never allow whitespace after the bang of declarations.
# https://stylelint.io/user-guide/rules/declaration-bang-space-after/
declaration-bang-space-after: never
# Require a single spacebefore the bang of declarations.
# https://stylelint.io/user-guide/rules/declaration-bang-space-before/
declaration-bang-space-before: always
# Require a newline after the colon, when the values are multi-line, of declarations.
# https://stylelint.io/user-guide/rules/declaration-colon-newline-after/
declaration-colon-newline-after: always-multi-line
# Require a single space after the colon of declarations.
# https://stylelint.io/user-guide/rules/declaration-colon-space-after/
declaration-colon-space-after: always-single-line
# Never allow whitespace before the colon of declarations.
# https://stylelint.io/user-guide/rules/declaration-colon-space-before/
declaration-colon-space-before: never
# Never have empty lines before declarations in a block.
# https://stylelint.io/user-guide/rules/declaration-empty-line-before/
declaration-empty-line-before: never
## Declaration Block
# Always have a new line after a ;.
# https://stylelint.io/user-guide/rules/declaration-block-semicolon-newline-after/
declaration-block-semicolon-newline-after: always
# Never include a new line before a ;.
# https://stylelint.io/user-guide/rules/declaration-block-semicolon-newline-before/
declaration-block-semicolon-newline-before: never-multi-line
# Never allow a space after the ; when on a single line.
# https://stylelint.io/user-guide/rules/declaration-block-semicolon-space-after/
declaration-block-semicolon-space-after: never-single-line
# Never allow a space before the ;.
# https://stylelint.io/user-guide/rules/declaration-block-semicolon-space-before/
declaration-block-semicolon-space-before: never
# Always include a trailing ; in a declaration block.
# https://stylelint.io/user-guide/rules/declaration-block-trailing-semicolon/
declaration-block-trailing-semicolon: always
## Block.
### These are typically managed by Prettier.
# Do not include an empty line before the closing brace of a block.
# https://stylelint.io/user-guide/rules/block-closing-brace-empty-line-before/
block-closing-brace-empty-line-before: never
# Always incluse a new line after a block's closing brace.
# https://stylelint.io/user-guide/rules/block-closing-brace-newline-after/
block-closing-brace-newline-after: always
# Require a new line before the closing brace of a block.
# https://stylelint.io/user-guide/rules/block-closing-brace-newline-before/
block-closing-brace-newline-before: always
# To ensure consistency with single/multi line blocks, enforce a new line after the opening brace of a block.
# https://stylelint.io/user-guide/rules/block-opening-brace-newline-after/
block-opening-brace-newline-after: always
## Selector
# Disallow whitespace on the inside of the brackets within attribute selectors.
# https://stylelint.io/user-guide/rules/selector-attribute-brackets-space-inside/
selector-attribute-brackets-space-inside: never
# Disallow whitespace after operators within attribute selectors.
# https://stylelint.io/user-guide/rules/selector-attribute-operator-space-after/
selector-attribute-operator-space-after: never
# Disallow whitespace before operators within attribute selectors.
# https://stylelint.io/user-guide/rules/selector-attribute-operator-space-before/
selector-attribute-operator-space-before: never
# Require quotes for attribute values.
# https://stylelint.io/user-guide/rules/selector-attribute-quotes/
selector-attribute-quotes: always
# Require a single space or disallow whitespace after the combinators of selectors.
# https://stylelint.io/user-guide/rules/selector-combinator-space-after/
selector-combinator-space-after: always
# Require a single space before the combinators of selectors.
# https://stylelint.io/user-guide/rules/selector-combinator-space-before/
selector-combinator-space-before: always
# Disallow non-space characters for descendant combinators of selectors.
# https://stylelint.io/user-guide/rules/selector-descendant-combinator-no-non-space/
selector-descendant-combinator-no-non-space: true
# Specify lowercase for pseudo-class selectors.
# https://stylelint.io/user-guide/rules/selector-pseudo-class-case/
selector-pseudo-class-case: lower
# Disallow whitespace on the inside of the parentheses within pseudo-class selectors.
# https://stylelint.io/user-guide/rules/selector-pseudo-class-parentheses-space-inside/
selector-pseudo-class-parentheses-space-inside: never
# Specify lowercase for pseudo-element selectors.
# https://stylelint.io/user-guide/rules/selector-pseudo-element-case/
selector-pseudo-element-case: lower
# Specify double colon notation for applicable pseudo-elements.
# https://stylelint.io/user-guide/rules/selector-pseudo-element-colon-notation/
selector-pseudo-element-colon-notation: double
# Specify lowercase for type selectors.
# https://stylelint.io/user-guide/rules/selector-type-case/
selector-type-case: lower
## Selector List
# Require a newline after the commas of selector lists.
# https://stylelint.io/user-guide/rules/selector-list-comma-newline-after/
selector-list-comma-newline-after: always
# Disallow whitespace before the commas of selector lists.
# https://stylelint.io/user-guide/rules/selector-list-comma-space-before/
selector-list-comma-space-before: never
## Rule
# Require empty lines before rules.
# https://stylelint.io/user-guide/rules/rule-empty-line-before/
# Note that `rule-non-nested-empty-line-before` is Deprecated per https://github.com/18F/stylelint-rules/issues/26
rule-empty-line-before:
- always
- ignore:
- after-comment
# Prefer newline at the end of a file.
# https://stylelint.io/user-guide/rules/no-missing-end-of-source-newline/
no-missing-end-of-source-newline: true