This repository has been archived by the owner on Dec 18, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 229
/
stylelintrc.js
52 lines (52 loc) · 1.5 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
module.exports = {
plugins: ["stylelint-declaration-strict-value"],
extends: ["stylelint-config-standard", "stylelint-prettier/recommended"],
rules: {
"color-hex-length": null,
"declaration-empty-line-before": null,
"declaration-no-important": true,
"import-notation": null,
"max-nesting-depth": 1,
"no-empty-source": null,
"no-invalid-position-at-import-rule": null,
"property-no-unknown": [
true,
{
// Allow property used for css-fonts-4 variable fonts
ignoreProperties: ["font-named-instance"],
},
],
"scale-unlimited/declaration-strict-value": [
"/color/",
{
disableFix: true,
ignoreValues: [
"currentcolor",
"inherit",
"initial",
"transparent",
"unset",
],
},
],
"selector-class-pattern": [
// classes must be in BEM form, like this:
// my_component
// my_component--variant
// my_component__element
// my_component__element--variant
// my_component__long_element_name
// my_component__long_element_name--variant
"^[a-z]+(_[a-z]+)*(__[a-z]+(_[a-z]+)*)?(--[a-z]+(_[a-z]+)*)*$",
{
resolveNestedSelectors: true,
message:
"Classes must be in BEM form like `my_component__element--variant`",
},
],
"selector-max-compound-selectors": 2,
"selector-max-id": 0,
"selector-no-qualifying-type": true,
"shorthand-property-no-redundant-values": null,
},
};