forked from cfpb/consumerfinance.gov
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.stylelintrc.cjs
64 lines (64 loc) · 2.34 KB
/
.stylelintrc.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
/* 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.
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'],
plugins: ['stylelint-less'],
ignoreFiles: ['packages/**/node_modules/**/*.less'],
customSyntax: 'postcss-less',
rules: {
'at-rule-no-unknown': [true, { ignoreAtRules: 'plugin' }],
'color-function-notation': ['legacy'],
'declaration-block-no-redundant-longhand-properties': null,
'declaration-empty-line-before': null,
'declaration-property-value-no-unknown': null,
'function-no-unknown': [true, { ignoreFunctions: ['unit'] }],
'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': null,
'less/color-no-invalid-hex': null,
'less/no-duplicate-variables': null,
},
};