-
Notifications
You must be signed in to change notification settings - Fork 3
/
.stylelintrc.js
59 lines (59 loc) · 2.27 KB
/
.stylelintrc.js
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
module.exports = {
plugins: ['stylelint-use-logical-spec'],
extends: ['stylelint-config-cloudfour', 'stylelint-config-prettier'],
rules: {
// disable stylelint-scss rules that conflict with prettier
// these should be included in stylelint-config-prettier but were removed
// @see https://github.com/prettier/stylelint-config-prettier/pull/124
// @see https://github.com/prettier/stylelint-config-prettier/releases/tag/v9.0.2
'scss/at-else-closing-brace-newline-after': null,
'scss/at-else-closing-brace-space-after': null,
'scss/at-else-empty-line-before': null,
'scss/at-else-if-parentheses-space-before': null,
'scss/at-function-parentheses-space-before': null,
'scss/at-if-closing-brace-newline-after': null,
'scss/at-if-closing-brace-space-after': null,
'scss/at-mixin-parentheses-space-before': null,
'scss/dollar-variable-colon-newline-after': null,
'scss/dollar-variable-colon-space-after': null,
'scss/dollar-variable-colon-space-before': null,
'scss/operator-no-newline-after': null,
'scss/operator-no-newline-before': null,
'scss/operator-no-unspaced': null,
/**
* 1. separating grid-template-rows and grid-template-columns
* improves readability
* 2. removing grid-*-gap because it was forcing us to use
* grid-gap even if we were only declaring one value.
*/
'declaration-block-no-redundant-longhand-properties': [
true,
{
ignoreShorthands: [
/^grid-template/i, // 1
/^grid-.*?gap/i, // 2
],
},
],
// we want to be able to set custom props in components (#617)
'suitcss/custom-property-no-outside-root': null,
// we want to be able to compose :root for theme selectors (#1056)
'suitcss/selector-root-no-composition': null,
'liberty/use-logical-spec': [
'always',
{
// 1. Until Safari 15 adoption is higher
// 3. Removing matches for `margin` and `padding` shorthand, which
// stylelint-use-logical-spec wants to break into the longhand
// `-block` and `-inline` properties.
except: [
'clear', // 1
'float', // 1
/^border-.+-radius$/i, // 1
/^margin$/i, // 2
/^padding$/i, // 2
],
},
],
},
};