-
Notifications
You must be signed in to change notification settings - Fork 9
/
.stylelintrc.yml
83 lines (79 loc) · 2.58 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
plugins:
- stylelint-prettier
# Custom plugin to disallow absolute import paths
- ./build/import.stylelint.js
# Use LESS preprocessor
customSyntax: postcss-less
rules:
# Prettier integration
prettier/prettier:
- true
- severity: warning
# Disallow unknown at-rules
at-rule-no-unknown: true
# Warn about empty selectors
block-no-empty:
- true
- severity: warning
# Disallow invalid hex colors
color-hex-length: short
# Disallow invalid hex colors
color-no-invalid-hex: true
# Disallow empty comments
comment-no-empty: true
# Disallow duplicate properties within declaration blocks
declaration-block-no-duplicate-properties: true
# Disallow absolute paths for imports in bounds of library files
esl-less/import-root: never
# Disallow duplicated font family reverencing
font-family-no-duplicate-names: true
# Disallow missing font family keyword
font-family-no-missing-generic-family-keyword: true
# Disallow an unspaced operator within `calc` functions
function-calc-no-unspaced-operator: true
# Disallow direction values in `linear-gradient()` calls that are not valid according to the standard syntax
function-linear-gradient-no-nonstandard-direction: true
# Disallow !important within keyframe declarations
keyframe-declaration-no-important: true
# Disallow duplicated at-rules
no-duplicate-at-import-rules: true
# Warn if empty sources
no-empty-source:
- true
- severity: warning
# Disallow double-slash comments `(//...)` for clear CSS, as they are not supported by CSS
# and could lead to unexpected results
no-invalid-double-slash-comments: true
# Disallow unknown properties
property-no-unknown: true
# Use double colon notation for applicable pseudo-elements
selector-pseudo-element-colon-notation: double
# Disallow unknown pseudo-class selectors
selector-pseudo-class-no-unknown: true
# Disallow unknown pseudo-element selectors
selector-pseudo-element-no-unknown:
- true
- ignorePseudoElements:
- /^-webkit-/
- /^-moz-/
# Disallow unknown type selectors
selector-type-no-unknown:
- true
- ignore:
- custom-elements
# Warn about newlines (unescaped) in strings
string-no-newline:
- true
- severity: warning
# Disallow unknown units
unit-no-unknown: true
overrides:
# Demo site pages sources
- files: site/**/*.{css,less}
rules:
# Warn about duplicate properties within declaration blocks
declaration-block-no-duplicate-properties:
- true
- severity: warning
# No import restrictions
esl-less/import-root: off