stylelint-config-ccb 1.8.2 → 1.8.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/index.js +117 -141
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
An opinionated stylelint-config which uses both stylelint-config-standard and prettier. In addition to many more stricter rules to reduce potential issues as much as possible.
|
package/index.js
CHANGED
|
@@ -9,12 +9,39 @@ module.exports = {
|
|
|
9
9
|
'stylelint-prettier'
|
|
10
10
|
],
|
|
11
11
|
rules: {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
'
|
|
12
|
+
/* stylelint-config-standard overwrites */
|
|
13
|
+
'alpha-value-notation': 'number',
|
|
14
|
+
'color-hex-length': 'long',
|
|
15
|
+
'declaration-block-no-redundant-longhand-properties': null,
|
|
16
|
+
'function-url-quotes': [
|
|
17
|
+
'always',
|
|
18
|
+
{
|
|
19
|
+
except: [
|
|
20
|
+
'empty'
|
|
21
|
+
]
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
'value-keyword-case': [
|
|
25
|
+
'lower',
|
|
26
|
+
{
|
|
27
|
+
ignoreProperties: ['unicode-range'],
|
|
28
|
+
camelCaseSvgKeywords: true
|
|
29
|
+
}
|
|
30
|
+
],
|
|
31
|
+
'number-max-precision': 5,
|
|
32
|
+
/* todo update these based on 'selector-id-pattern': [
|
|
33
|
+
'^([a-z][a-z0-9]*)(-[a-z0-9]+)*$',
|
|
34
|
+
{
|
|
35
|
+
message: 'Expected id selector to be kebab-case'
|
|
36
|
+
}
|
|
37
|
+
], */
|
|
38
|
+
'custom-media-pattern': '[a-z-]{4,40}',
|
|
39
|
+
'custom-property-pattern': '[a-z-]{4,40}',
|
|
40
|
+
'keyframes-name-pattern': '[a-z-]{4,40}',
|
|
41
|
+
'selector-class-pattern': '[a-z-_]{3,40}',
|
|
42
|
+
'selector-id-pattern': '[a-z-_]{2,40}',
|
|
17
43
|
|
|
44
|
+
/* stylelint-config-ccb */
|
|
18
45
|
'declaration-property-max-values': {
|
|
19
46
|
'border-width': 2,
|
|
20
47
|
border: 3,
|
|
@@ -32,7 +59,6 @@ module.exports = {
|
|
|
32
59
|
'font-face': ['font-display', 'font-family', 'font-style', 'src']
|
|
33
60
|
},
|
|
34
61
|
'color-no-hex': true,
|
|
35
|
-
'color-hex-length': 'long',
|
|
36
62
|
'comment-word-disallowed-list': [
|
|
37
63
|
'todo',
|
|
38
64
|
|
|
@@ -51,7 +77,6 @@ module.exports = {
|
|
|
51
77
|
'whitehat', 'white-hat', 'whitelist', 'white-list', 'whitelisted',
|
|
52
78
|
'white-listed', 'whitelisting', 'white-listing', 'ymmv'
|
|
53
79
|
],
|
|
54
|
-
'declaration-block-no-redundant-longhand-properties': null,
|
|
55
80
|
'declaration-property-unit-allowed-list': {
|
|
56
81
|
'font-size': ['rem', 'em'],
|
|
57
82
|
'transition-delay': ['ms'],
|
|
@@ -82,17 +107,77 @@ module.exports = {
|
|
|
82
107
|
},
|
|
83
108
|
'function-url-scheme-allowed-list': ['data', 'https'],
|
|
84
109
|
'function-disallowed-list': ['gray', 'color-mod', 'color', 'rgba', 'hsla'],
|
|
85
|
-
'keyframes-name-pattern': '[a-z-]{4,40}',
|
|
86
|
-
'custom-media-pattern': '[a-z-]{4,40}',
|
|
87
|
-
'custom-property-pattern': '[a-z-]{4,40}',
|
|
88
|
-
'selector-class-pattern': '[a-z-_]{3,40}',
|
|
89
|
-
'selector-id-pattern': '[a-z-_]{2,40}',
|
|
90
110
|
'declaration-no-important': true,
|
|
91
|
-
'number-max-precision': 5,
|
|
92
111
|
'property-disallowed-list': [
|
|
93
|
-
|
|
94
|
-
'
|
|
95
|
-
'
|
|
112
|
+
/* deprecated webkit properties */
|
|
113
|
+
'-webkit-alt*',
|
|
114
|
+
'-webkit-background-composite',
|
|
115
|
+
'-webkit-border-fit',
|
|
116
|
+
'-webkit-color-correction',
|
|
117
|
+
'-webkit-flow-from',
|
|
118
|
+
'-webkit-flow-into',
|
|
119
|
+
'-webkit-grid-columns',
|
|
120
|
+
'-webkit-grid-rows',
|
|
121
|
+
'-webkit-hyphenate-charset',
|
|
122
|
+
'-webkit-image-set',
|
|
123
|
+
'-webkit-mask-attachment',
|
|
124
|
+
'-webkit-match-nearest-mail-blockquote-color',
|
|
125
|
+
'-webkit-margin-collapse',
|
|
126
|
+
'-webkit-margin-after-collapse',
|
|
127
|
+
'-webkit-margin-before-collapse',
|
|
128
|
+
'-webkit-margin-bottom-collapse',
|
|
129
|
+
'-webkit-margin-top-collapse',
|
|
130
|
+
'-webkit-overflow-scrolling',
|
|
131
|
+
'-webkit-region-break-after',
|
|
132
|
+
'-webkit-region-break-before',
|
|
133
|
+
'-webkit-region-break-inside',
|
|
134
|
+
'-webkit-region-fragment',
|
|
135
|
+
'-webkit-shape-inside',
|
|
136
|
+
'-webkit-touch-callout',
|
|
137
|
+
'background-origin-x',
|
|
138
|
+
'background-origin-y',
|
|
139
|
+
|
|
140
|
+
/* webkit prefixes */
|
|
141
|
+
'-webkit-appearance',
|
|
142
|
+
'-webkit-mask',
|
|
143
|
+
'-webkit-mask-image',
|
|
144
|
+
'-webkit-mask-size',
|
|
145
|
+
'-webkit-mask-repeat-x',
|
|
146
|
+
'-webkit-mask-repeat-y',
|
|
147
|
+
'-webkit-mask-origin',
|
|
148
|
+
'-webkit-backface-visibility',
|
|
149
|
+
'-webkit-text-combine-upright',
|
|
150
|
+
'-webkit-print-color-adjust',
|
|
151
|
+
|
|
152
|
+
/* legacy */
|
|
153
|
+
'text-decoration-skip',
|
|
154
|
+
|
|
155
|
+
'-moz-outline-radius',
|
|
156
|
+
'-moz-outline-radius-bottomleft',
|
|
157
|
+
'-moz-outline-radius-bottomright',
|
|
158
|
+
'-moz-outline-radius-topleft',
|
|
159
|
+
'-moz-outline-radius-topright',
|
|
160
|
+
|
|
161
|
+
'-webkit-font-smoothing',
|
|
162
|
+
'-moz-osx-font-smoothing',
|
|
163
|
+
'font-smoothing',
|
|
164
|
+
'osx-font-smoothing',
|
|
165
|
+
|
|
166
|
+
'box-orient',
|
|
167
|
+
|
|
168
|
+
'zoom',
|
|
169
|
+
|
|
170
|
+
'word-break',
|
|
171
|
+
'page-break-inside',
|
|
172
|
+
'clip',
|
|
173
|
+
|
|
174
|
+
/* compatibility */
|
|
175
|
+
'-webkit-text-stroke', // use -webkit-text-stroke-width or -webkit-text-stroke-color
|
|
176
|
+
|
|
177
|
+
/* opinionated */
|
|
178
|
+
'float',
|
|
179
|
+
|
|
180
|
+
'font-smooth'
|
|
96
181
|
],
|
|
97
182
|
'time-min-milliseconds': 75,
|
|
98
183
|
'selector-no-qualifying-type': true,
|
|
@@ -109,14 +194,6 @@ module.exports = {
|
|
|
109
194
|
's'
|
|
110
195
|
],
|
|
111
196
|
|
|
112
|
-
'declaration-block-no-shorthand-property-overrides': true,
|
|
113
|
-
'no-irregular-whitespace': true,
|
|
114
|
-
'no-invalid-position-at-import-rule': true,
|
|
115
|
-
'named-grid-areas-no-invalid': true,
|
|
116
|
-
'declaration-block-no-duplicate-custom-properties': true,
|
|
117
|
-
'color-function-notation': 'modern',
|
|
118
|
-
'alpha-value-notation': 'number',
|
|
119
|
-
'hue-degree-notation': 'number',
|
|
120
197
|
'font-weight-notation': [
|
|
121
198
|
'numeric',
|
|
122
199
|
{
|
|
@@ -126,52 +203,13 @@ module.exports = {
|
|
|
126
203
|
}
|
|
127
204
|
],
|
|
128
205
|
'function-url-no-scheme-relative': true,
|
|
129
|
-
'function-url-quotes': [
|
|
130
|
-
'always',
|
|
131
|
-
{
|
|
132
|
-
except: [
|
|
133
|
-
'empty'
|
|
134
|
-
]
|
|
135
|
-
}
|
|
136
|
-
],
|
|
137
|
-
'selector-type-no-unknown': [
|
|
138
|
-
true,
|
|
139
|
-
{
|
|
140
|
-
ignore: ['custom-elements']
|
|
141
|
-
}
|
|
142
|
-
],
|
|
143
206
|
'max-nesting-depth': 2,
|
|
144
207
|
'color-named': 'never',
|
|
145
|
-
'value-keyword-case': [
|
|
146
|
-
'lower',
|
|
147
|
-
{
|
|
148
|
-
ignoreProperties: 'unicode-range',
|
|
149
|
-
camelCaseSvgKeywords: true
|
|
150
|
-
}
|
|
151
|
-
],
|
|
152
|
-
'unit-no-unknown': [
|
|
153
|
-
true,
|
|
154
|
-
{
|
|
155
|
-
ignoreUnits: [
|
|
156
|
-
'x'
|
|
157
|
-
]
|
|
158
|
-
}
|
|
159
|
-
],
|
|
160
|
-
'shorthand-property-no-redundant-values': true,
|
|
161
208
|
'no-unknown-animations': true,
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
'property-no-vendor-prefix': true,
|
|
165
|
-
'selector-no-vendor-prefix': true,
|
|
166
|
-
'value-no-vendor-prefix': true,
|
|
167
|
-
'font-family-name-quotes': 'always-where-recommended',
|
|
168
|
-
|
|
169
|
-
/* enforced by prettier
|
|
209
|
+
|
|
210
|
+
/* prettier-overlap */
|
|
170
211
|
linebreaks: 'unix',
|
|
171
|
-
'no-empty-first-line': true,
|
|
172
212
|
'unicode-bom': 'never',
|
|
173
|
-
'selector-attribute-quotes': 'always',
|
|
174
|
-
'string-quotes': 'double',
|
|
175
213
|
'at-rule-semicolon-space-before': 'never',
|
|
176
214
|
'block-opening-brace-newline-before': 'never-single-line',
|
|
177
215
|
'declaration-block-semicolon-newline-before': 'never-multi-line',
|
|
@@ -180,93 +218,31 @@ module.exports = {
|
|
|
180
218
|
'selector-list-comma-newline-before': 'never-multi-line',
|
|
181
219
|
'selector-list-comma-space-after': 'always-single-line',
|
|
182
220
|
'value-list-comma-newline-before': 'never-multi-line',
|
|
183
|
-
*/
|
|
184
221
|
|
|
185
|
-
/*
|
|
186
|
-
indentation: null,
|
|
187
|
-
linebreaks: null,
|
|
188
|
-
|
|
189
|
-
'at-rule-empty-line-before': null,
|
|
190
|
-
'at-rule-name-case': null,
|
|
191
|
-
'at-rule-name-newline-after': null,
|
|
192
|
-
'at-rule-name-space-after': null,
|
|
193
|
-
'at-rule-semicolon-newline-after': null,
|
|
194
|
-
'at-rule-semicolon-space-before': null,
|
|
195
|
-
'block-closing-brace-empty-line-before': null,
|
|
196
|
-
'block-closing-brace-newline-after': null,
|
|
197
|
-
'block-closing-brace-newline-before': null,
|
|
198
|
-
'block-closing-brace-space-after': null,
|
|
199
|
-
'block-closing-brace-space-before': null,
|
|
200
|
-
'block-opening-brace-newline-after': null,
|
|
201
|
-
'block-opening-brace-newline-before': null,
|
|
202
|
-
'block-opening-brace-space-after': null,
|
|
222
|
+
/* prettier-conflicts, prefer stylelint-config-standard
|
|
203
223
|
'block-opening-brace-space-before': null,
|
|
204
|
-
'color-hex-case': null,
|
|
205
|
-
'declaration-bang-space-after': null,
|
|
206
|
-
'declaration-bang-space-before': null,
|
|
207
|
-
'declaration-block-semicolon-newline-after': null,
|
|
208
|
-
'declaration-block-semicolon-newline-before': null,
|
|
209
|
-
'declaration-block-semicolon-space-after': null,
|
|
210
|
-
'declaration-block-semicolon-space-before': null,
|
|
211
|
-
'declaration-block-trailing-semicolon': null,
|
|
212
224
|
'declaration-colon-newline-after': null,
|
|
213
|
-
'declaration-colon-space-after': null,
|
|
214
|
-
'declaration-colon-space-before': null,
|
|
215
|
-
'function-comma-newline-after': null,
|
|
216
|
-
'function-comma-newline-before': null,
|
|
217
|
-
'function-comma-space-after': null,
|
|
218
|
-
'function-comma-space-before': null,
|
|
219
|
-
'function-max-empty-lines': null,
|
|
220
|
-
'function-parentheses-newline-inside': null,
|
|
221
|
-
'function-parentheses-space-inside': null,
|
|
222
|
-
'max-empty-lines': null,
|
|
223
|
-
'max-line-length': null,
|
|
224
|
-
'media-feature-colon-space-after': null,
|
|
225
|
-
'media-feature-colon-space-before': null,
|
|
226
|
-
'media-feature-name-case': null,
|
|
227
|
-
'media-feature-parentheses-space-inside': null,
|
|
228
|
-
'media-query-list-comma-newline-after': null,
|
|
229
|
-
'media-query-list-comma-newline-before': null,
|
|
230
|
-
'media-query-list-comma-space-after': null,
|
|
231
|
-
'media-query-list-comma-space-before': null,
|
|
232
|
-
'no-empty-first-line': null,
|
|
233
|
-
'no-eol-whitespace': null,
|
|
234
|
-
'no-extra-semicolons': null,
|
|
235
|
-
'no-missing-end-of-source-newline': null,
|
|
236
|
-
'number-leading-zero': null,
|
|
237
|
-
'number-no-trailing-zeros': null,
|
|
238
|
-
'property-case': null,
|
|
239
|
-
'selector-attribute-brackets-space-inside': null,
|
|
240
|
-
'selector-attribute-operator-space-after': null,
|
|
241
|
-
'selector-attribute-operator-space-before': null,
|
|
242
|
-
'selector-attribute-quotes': null,
|
|
243
|
-
'selector-combinator-space-after': null,
|
|
244
|
-
'selector-combinator-space-before': null,
|
|
245
|
-
'selector-descendant-combinator-no-non-space': null,
|
|
246
|
-
'selector-list-comma-newline-after': null,
|
|
247
|
-
'selector-list-comma-newline-before': null,
|
|
248
|
-
'selector-list-comma-space-after': null,
|
|
249
|
-
'selector-list-comma-space-before': null,
|
|
250
|
-
'selector-max-empty-lines': null,
|
|
251
|
-
'selector-pseudo-class-case': null,
|
|
252
|
-
'selector-pseudo-class-parentheses-space-inside': null,
|
|
253
|
-
'selector-pseudo-element-case': null,
|
|
254
|
-
'string-quotes': null,
|
|
255
|
-
'unicode-bom': null,
|
|
256
|
-
'unit-case': null,
|
|
257
225
|
'value-list-comma-newline-after': null,
|
|
258
|
-
'
|
|
259
|
-
'
|
|
260
|
-
|
|
261
|
-
|
|
226
|
+
'selector-descendant-combinator-no-non-space': null,
|
|
227
|
+
'selector-combinator-space-before': null
|
|
228
|
+
*/
|
|
229
|
+
|
|
230
|
+
/* prettier-conflicts, prefer prettier */
|
|
231
|
+
'max-line-length': 80,
|
|
262
232
|
|
|
263
233
|
'prettier/prettier': [
|
|
264
234
|
true,
|
|
265
235
|
{
|
|
266
|
-
|
|
236
|
+
quoteProps: 'preserve'
|
|
267
237
|
}
|
|
268
238
|
],
|
|
269
239
|
|
|
240
|
+
'color-format/format': {
|
|
241
|
+
format: 'rgb'
|
|
242
|
+
},
|
|
243
|
+
|
|
244
|
+
'plugin/stylelint-selector-no-empty': true,
|
|
245
|
+
|
|
270
246
|
'order/order': [
|
|
271
247
|
[
|
|
272
248
|
'dollar-variables',
|