-
Notifications
You must be signed in to change notification settings - Fork 0
/
.stylelintrc.js
119 lines (116 loc) · 3.97 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
const recessConfig = require('stylelint-config-recess-order');
const bemPattern = "^_?[a-z0-9]+(-[a-z0-9]+)*(__[a-z0-9]+(-[a-z0-9]+)*)?(--[a-z0-9]+(-[a-z0-9]+)*)?$";
const recessConfigWithEmptyLine = recessConfig.rules['order/properties-order'].map((group) => {
return {
...group,
emptyLineBefore: 'always',
noEmptyLineBetween: true,
}
});
module.exports = {
overrides: [
{
files: ["**/*.scss"],
customSyntax: "postcss-scss"
}
],
extends: [
"stylelint-config-sass-guidelines",
"stylelint-config-recess-order"
],
ignoreFiles: "node_modules/**/*",
rules: {
'order/properties-order': recessConfigWithEmptyLine,
'scss/at-function-pattern': "^_?[a-z]+([a-z0-9-]+[a-z0-9]+)?$",
'scss/at-mixin-pattern': bemPattern,
'scss/dollar-variable-pattern': bemPattern,
"at-rule-empty-line-before": [
"always", {
"except": [
"blockless-after-same-name-blockless",
"first-nested"
],
"ignore": [
"after-comment"
],
"ignoreAtRules": [
"else",
"forward",
"use"
]
}
],
"order/properties-alphabetical-order": null,
"selector-pseudo-element-case": "lower",
"color-hex-case": "lower",
"color-hex-length": "long",
"at-rule-name-space-after": "always",
"at-rule-no-vendor-prefix": true,
"at-rule-semicolon-space-before": "never",
"block-closing-brace-empty-line-before": null,
"block-closing-brace-newline-after": null,
"block-opening-brace-space-before": "always",
"block-opening-brace-space-after": "never-single-line",
"block-no-empty": null,
"color-named": "never",
"declaration-colon-space-before": "never",
"declaration-colon-space-after": "always",
"selector-combinator-space-after": "always",
"declaration-block-semicolon-newline-after": "always-multi-line",
"declaration-block-semicolon-newline-before": "never-multi-line",
"declaration-block-semicolon-space-after": "always-single-line",
"declaration-empty-line-before": null,
"declaration-no-important": true,
"font-family-name-quotes": "always-where-recommended",
"function-parentheses-space-inside": "never-single-line",
"function-url-no-scheme-relative": true,
"function-url-quotes": "always",
"length-zero-no-unit": true,
"max-empty-lines": 2,
"max-line-length": null,
"max-nesting-depth": 3,
"media-feature-name-no-vendor-prefix": true,
"media-feature-parentheses-space-inside": "never",
"media-feature-range-operator-space-after": "always",
"media-feature-range-operator-space-before": "never",
"no-descending-specificity": null,
"no-duplicate-selectors": true,
"number-leading-zero": "always",
"property-no-vendor-prefix": true,
"selector-attribute-quotes": "always",
"selector-class-pattern": [
"^_?[a-z0-9]+(-[a-z0-9]+)*(__[a-z0-9]+(-[a-z0-9]+)*)?(--[a-z0-9]+(-[a-z0-9]+)*)?$",
{
"message": "Class names should match the BEM naming convention"
}
],
"selector-list-comma-newline-after": "always",
"selector-list-comma-newline-before": "never-multi-line",
"selector-list-comma-space-after": "always-single-line",
"selector-list-comma-space-before": "never-single-line",
"declaration-colon-newline-after": null,
"selector-max-attribute": 2,
"selector-max-class": 4,
"selector-max-combinators": 4,
"selector-max-compound-selectors": 4,
"selector-max-empty-lines": 1,
"selector-max-id": 0,
"selector-max-specificity": null,
"selector-max-universal": 2,
"selector-no-qualifying-type": [
true,
{
"ignore": [
"attribute"
]
}
],
"selector-no-vendor-prefix": true,
"string-quotes": "single",
"value-keyword-case": "lower",
"value-list-comma-newline-after": "never-multi-line",
"value-list-comma-newline-before": "never-multi-line",
"value-list-comma-space-after": "always",
"value-no-vendor-prefix": true
}
};