forked from wet-boew/wet-boew
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstylelint.config.js
More file actions
132 lines (124 loc) · 4.08 KB
/
stylelint.config.js
File metadata and controls
132 lines (124 loc) · 4.08 KB
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
124
125
126
127
128
129
130
131
132
/** @type {import('stylelint').Config} */
module.exports = {
plugins: [ "@double-great/stylelint-a11y" ],
rules: {
"alpha-value-notation": "number",
"color-function-notation": "legacy",
// Suppress stylelint-config-recommended errors
"declaration-property-value-keyword-no-deprecated": [
true,
{
ignoreKeywords: [
"break-word" // word-break: break-word; is depreciated but used
]
}
],
"font-family-no-duplicate-names": [
true,
{
ignoreFontFamilyNames: [
"monospace" // Issue from Bootstrap-sass/normalize.scss
]
}
],
"font-family-no-missing-generic-family-keyword": [
true,
{
ignoreFontFamilies: [
"Glyphicons Halflings", // Icons don't need fallbacks
"/a/" // Weird buggy thing from text-hide mixin from Bootstrap 3
]
}
],
"media-feature-range-notation": "prefix", // Uses legacy syntax
// Partially-enable stylelint-a11y rules
"a11y/content-property-no-static-value": null,
"a11y/font-size-is-readable": null,
"a11y/line-height-is-vertical-rhythmed": null,
"a11y/media-prefers-reduced-motion": null,
"a11y/media-prefers-color-scheme": null,
"a11y/no-display-none": null,
"a11y/no-obsolete-attribute": true,
"a11y/no-obsolete-element": null, // Treats menu and hgroup as false positives
"a11y/no-spread-text": true,
"a11y/no-outline-none": null,
"a11y/no-text-align-justify": null, // Bootstrap 3.4.x comes with a .text-justify class
"a11y/selector-pseudo-class-focus": null
},
overrides: [
{
files: [
"**/*.css"
],
extends: [
"stylelint-config-standard"
],
rules: {
"function-no-unknown": null,
"media-feature-name-no-unknown": null,
"no-descending-specificity": null, // Extremely slow
"no-duplicate-selectors": null,
"no-irregular-whitespace": null,
// Suppress stylelint-config-standard errors
"at-rule-empty-line-before": null,
"at-rule-no-vendor-prefix": null,
"color-hex-length": null,
"color-function-alias-notation": null,
"comment-empty-line-before": null,
"comment-whitespace-inside": null,
"declaration-block-no-redundant-longhand-properties": null,
"declaration-block-no-duplicate-properties": null, // Needed to fix build because of bootstrap-sass/assets/stylesheets/bootstrap/normalize line 113
"declaration-property-value-no-unknown": null, // Uses legacy syntax
"declaration-property-value-keyword-no-deprecated": null, // Fix use of break-word
"function-name-case": null,
"function-url-quotes": null,
"hue-degree-notation": null, // Sass doesn't pad this out from 0 to 0deg
"length-zero-no-unit": null,
"media-feature-name-no-vendor-prefix": null,
"number-max-precision": null,
"property-no-deprecated": null, // Too noisy with Bootstrap 3
"property-no-vendor-prefix": null,
"rule-empty-line-before": null,
"selector-attribute-quotes": null,
"selector-class-pattern": null,
"selector-id-pattern": null,
"selector-not-notation": null,
"selector-no-vendor-prefix": null,
"selector-pseudo-element-colon-notation": null,
"shorthand-property-no-redundant-values": null,
"value-no-vendor-prefix": null
}
},
{
files: [
"**/*.scss"
],
extends: [
"stylelint-config-standard-scss"
],
plugins: [
"stylelint-order"
],
rules: {
// Additional rules for replacing sass-lint
"order/properties-alphabetical-order": true,
// Suppress stylelint-config-standard errors
"declaration-block-no-redundant-longhand-properties": null,
"no-descending-specificity": null, // Extremely slow
"no-invalid-position-at-import-rule": null, // Fixable, need to run sass migrator
"scss/comment-no-empty": null,
"scss/dollar-variable-pattern": null, // Fixable
"scss/no-global-function-names": null, // Fixable, need to run sass migrator
"selector-class-pattern": null,
"selector-id-pattern": null,
"selector-not-notation": null,
"selector-pseudo-element-colon-notation": null
}
}
],
ignoreFiles: [
"**/*.min.css",
"src/plugins/share/sprites/_sprites_share.scss", // Ignore generated file
"lib/**"
]
};