-
Notifications
You must be signed in to change notification settings - Fork 0
/
stylelint.config.cjs
81 lines (76 loc) · 2.44 KB
/
stylelint.config.cjs
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
module.exports = {
extends: [
'stylelint-config-standard-scss',
'stylelint-config-html/vue',
'stylelint-config-prettier-scss',
],
plugins: [
'stylelint-order',
'stylelint-prettier',
'stylelint-z-index-value-constraint',
],
rules: {
// Allow prettier to format stylelint reported issues
'prettier/prettier': true,
/**
* SCSS specific rules
*/
// Disabling the rule because we prefer having parenthesis
'scss/at-rule-conditional-no-parentheses': null,
// Disabling the rule because we cannot configure the rule
// to match prettier
'scss/operator-no-newline-after': null,
'scss/at-import-partial-extension': 'never',
'scss/at-rule-no-unknown': true,
'scss/no-global-function-names': true,
'scss/selector-no-redundant-nesting-selector': true,
'scss/dollar-variable-empty-line-before': 'never',
/**
* Plugin rules
*/
'order/properties-alphabetical-order': true,
'plugin/z-index-value-constraint': {
min: 0,
max: 10,
},
/**
* Other rules
*/
// We disable this rule, because we disallow ids
// through the selector-max-specificity rule
'selector-id-pattern': null,
// More info about the BEM convention pattern:
// https://gist.github.com/Potherca/f2a65491e63338659c3a0d2b07eee382
// The pattern is modified to satisfy the rule. According to 'selector-class-pattern'
// we shouldn't include '.' in the pattern, as it is already implemented by the library
'selector-class-pattern': [
'^[a-z]([a-z0-9-]+)?(__([a-z0-9]+-?)+)?(--([a-z0-9]+-?)+){0,2}$',
{
resolveNestedSelectors: true,
},
],
'alpha-value-notation': 'number',
'at-rule-no-vendor-prefix': true,
'color-function-notation': 'legacy',
'declaration-block-no-duplicate-properties': true,
'declaration-no-important': true,
'font-family-name-quotes': 'always-unless-keyword',
'font-weight-notation': 'numeric',
'media-feature-name-no-vendor-prefix': true,
'no-unknown-animations': true,
'selector-max-type': 0,
'selector-pseudo-element-colon-notation': 'single',
'max-nesting-depth': [
2,
{
ignore: ['blockless-at-rules'],
},
],
'number-max-precision': 2,
'property-no-vendor-prefix': true,
'selector-max-specificity': '0,2,0',
'selector-no-vendor-prefix': true,
'value-no-vendor-prefix': true,
'value-keyword-case': 'lower',
},
}