This repository has been archived by the owner on Sep 20, 2019. It is now read-only.
forked from hashgraph/MyHbarWallet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
stylelint.config.js
123 lines (108 loc) · 4.3 KB
/
stylelint.config.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
120
121
122
123
/* eslint-env node */
/* eslint-disable @typescript-eslint/no-var-requires */
const path = require("path");
module.exports = {
extends: ["stylelint-config-standard", "stylelint-a11y/recommended"],
plugins: [
"stylelint-csstree-validator",
"stylelint-a11y",
"stylelint-declaration-block-no-ignored-properties",
"stylelint-no-indistinguishable-colors",
"stylelint-no-unsupported-browser-features",
"stylelint-order",
"stylelint-prettier",
"stylelint-use-logical",
"stylelint-value-no-unknown-custom-properties",
"stylelint-declaration-strict-value"
],
rules: {
indentation: [4],
// https://stylelint.io/user-guide/rules/selector-class-pattern
"selector-class-pattern": [
"^([a-z][a-z0-9]*)(-[a-z0-9]+)*$",
{
resolveNestedSelectors: true
}
],
// Autoprefixer does this for us
// https://stylelint.io/user-guide/rules/selector-no-vendor-prefix
"selector-no-vendor-prefix": true,
// https://stylelint.io/user-guide/rules/font-weight-notation
"font-weight-notation": "numeric",
// https://github.com/stylelint/stylelint/blob/2b73704b65f0bd69a2c2bada4e53b20d534547d1/lib/rules/selector-max-specificity
// Limit the specificity of selectors (and prevents IDs).
"selector-max-specificity": [
"0,4,2",
{ severity: "warning", ignoreSelectors: ["/#app/"] }
],
// https://github.com/prettier/stylelint-prettier
"prettier/prettier": true,
// https://github.com/csstree/stylelint-validator/
// Validate compiled CSS against W3C standards (incl. common browser extensions)
"csstree/validator": true,
// https://github.com/kristerkari/stylelint-declaration-block-no-ignored-properties
"plugin/declaration-block-no-ignored-properties": true,
// Disallows colors that are suspiciously close to being identical
// https://github.com/ierhyna/stylelint-no-indistinguishable-colors
"plugin/stylelint-no-indistinguishable-colors": [
true,
{
ignore: ["#ffffff"],
allowEquivalentNotation: true
}
],
// https://github.com/csstools/stylelint-use-logical
"csstools/use-logical": true,
// https://github.com/csstools/stylelint-value-no-unknown-custom-properties
"csstools/value-no-unknown-custom-properties": [
true,
{
importFrom: [path.join(__dirname, "src/main.css")]
}
],
// https://github.com/ismay/stylelint-no-unsupported-browser-features
"plugin/no-unsupported-browser-features": [
true,
{
ignore: [
// [...] not supporting the avoid-column, column, and avoid (in the column
// context) values for the properties break-before, break-after,
// and break-inside.
"multicolumn",
// Not supported in older Edge (use chrome Edge)
"intrinsic-width",
// Not supported in older Edge
"css-resize",
// Just a decoration
"css-filters",
"css-appearance"
]
}
],
// https://github.com/hudochenkov/stylelint-order
"order/properties-alphabetical-order": true,
"order/order": [
"custom-properties",
"declarations",
"rules",
"at-rules"
],
// https://github.com/YozhikM/stylelint-a11y#rules
"a11y/content-property-no-static-value": true,
"a11y/line-height-is-vertical-rhythmed": true,
"a11y/no-obsolete-attribute": true,
"a11y/no-obsolete-element": true,
"a11y/no-text-align-justify": true,
// https://github.com/AndyOGo/stylelint-declaration-strict-value
"scale-unlimited/declaration-strict-value": [
["/color/"],
{
ignoreKeywords: {
"/color/": ["inherit", "transparent"]
},
severity: "warning",
disableFix: true
}
]
}
};