-
Notifications
You must be signed in to change notification settings - Fork 19
/
stylelint.config.cjs
67 lines (67 loc) · 2.51 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
/* NOTES:
at-rule-no-unknown -
This rule enforces only @ rules that appear in the CSS spec,
however, @plugin appears in Less, so should be ignored.
color-function-notation -
Set to 'legacy' to support older browsers in our browserslist (for now).
declaration-block-no-redundant-longhand-properties -
Turned off.
TODO: Turn on this rule and work out longhand properties.
declaration-empty-line-before -
Turned off.
TODO: Turn on this rule and work out what style we want.
declaration-property-value-no-unknown -
Turned off for Less per documentation guidance.
function-no-unknown -
Ignore the 'unit' helper function that comes from Less.
media-feature-range-notation -
Prefer prefixed values, since Less doesn't support ranges.
media-query-no-invalid -
Turned off because of https://github.com/ssivanatarajan/stylelint-less/issues/6
no-descending-specificity -
Turned off, but probably shouldn't be.
TODO: Turn on this rule and see if issues can be fixed.
number-max-precision -
TODO: See if long decimal values can be shortened using the unit helper.
rule-empty-line-before -
Custom setting that differs from stylelint-config-standard.
selector-id-pattern -
Turned off.
TODO: Turn on this rule and work out regex for BEM syntax.
selector-class-pattern -
Turned off.
TODO: Turn on this rule and work out regex for BEM syntax.
less/color-no-invalid-hex
less/no-duplicate-variables
Both of the above settings are turned off till
https://github.com/ssivanatarajan/stylelint-less/issues/6 is addressed.
*/
module.exports = {
extends: ['stylelint-config-standard-scss'],
ignoreFiles: ['packages/**/node_modules/**/*.scss'],
rules: {
'at-rule-no-unknown': null,
'color-function-notation': ['modern', { ignore: ['with-var-inside'] }],
'declaration-block-no-redundant-longhand-properties': null,
'declaration-empty-line-before': null,
'declaration-property-value-no-unknown': null,
'media-feature-range-notation': ['prefix'],
'no-descending-specificity': null,
'number-max-precision': 10,
'rule-empty-line-before': [
'always-multi-line',
{
except: 'first-nested',
ignore: ['after-comment', 'inside-block'],
},
],
'selector-id-pattern': null,
'selector-class-pattern': [
'^[a-z]([a-z0-9-]+)?(__([a-z0-9]+-?)+)?(--([a-z0-9]+-?)+){0,2}$',
{ resolveNestedSelectors: true },
],
'scss/operator-no-newline-after': null,
'scss/comment-no-empty': null,
'value-keyword-case': ['lower', { camelCaseSvgKeywords: true }],
},
};