This repository has been archived by the owner on Nov 30, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.stylelintrc.js
66 lines (66 loc) · 1.95 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
module.exports = {
plugins: ["stylelint-declaration-use-variable"],
extends: ["stylelint-config-standard", "stylelint-config-recommended-scss"],
rules: {
"declaration-empty-line-before": null,
"declaration-colon-newline-after": null,
"declaration-no-important": true,
"max-nesting-depth": 1,
"scss/at-function-pattern": [
"^[a-z0-9]+(-[a-z0-9]+)*$",
{
message: "SCSS functions should be lower-case with hyphens",
},
],
"scss/at-mixin-pattern": [
"^[a-z0-9]+(-[a-z0-9]+)*$",
{
message: "SCSS mixins should be lower-case with hyphens",
},
],
"scss/dollar-variable-pattern": [
"^[a-z0-9]+(-[a-z0-9]+)*$",
{
message: "SCSS $ variables should be lower-case with hyphens",
},
],
"scss/no-duplicate-dollar-variables": true,
"scss/selector-no-redundant-nesting-selector": true,
"selector-class-pattern": [
// Classes must be in BEM form, like this:
// MyComponent
// MyComponent--variant
// MyComponent__element
// MyComponent__element--variant
// MyComponent__longElementName
// MyComponent__longElementName--longVariant
// For an introduction, see: https://css-tricks.com/bem-101/
"^[A-Z][a-zA-Z0-9]+(__[a-z][a-zA-Z0-9]+)?(--[a-z][a-zA-Z0-9]+)*$",
{
resolveNestedSelectors: true,
message:
"CSS classes should use BEM format like MyComponent__element--variant",
},
],
"selector-max-compound-selectors": 1,
"selector-max-id": 0,
"selector-no-qualifying-type": true,
"sh-waqar/declaration-use-variable": [
[
"/color/",
{
ignoreValues: [
"/\\w+\\.\\$.+/",
"currentcolor",
"inherit",
"initial",
"transparent",
"unset",
],
},
],
],
"string-quotes": "double",
"value-list-comma-newline-after": null,
},
};