linter-bundle 4.0.3 → 5.0.0

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.
Files changed (39) hide show
  1. package/.linter-bundle.js +8 -8
  2. package/CHANGELOG.md +15 -1
  3. package/README.md +1 -1
  4. package/eslint/{index.js → index.cjs} +7 -7
  5. package/eslint/{overrides-javascript-lazy.js → overrides-javascript-lazy.cjs} +1 -1
  6. package/eslint/{overrides-javascript.js → overrides-javascript.cjs} +1 -0
  7. package/eslint/{overrides-react.js → overrides-react.cjs} +4 -4
  8. package/eslint/rules/no-unnecessary-typeof.js +12 -1
  9. package/eslint/rules/package.json +8 -0
  10. package/eslint/rules/restricted-filenames.js +4 -4
  11. package/eslint/rules/restricted-filenames.md +1 -1
  12. package/files/index.js +54 -24
  13. package/helper/{ensure-type.js → ensure-type.cjs} +2 -0
  14. package/helper/get-git-files.js +3 -7
  15. package/helper/get-outdated-dependencies.js +48 -0
  16. package/helper/{validate-package-overrides.js → get-outdated-overrides.js} +9 -10
  17. package/helper/get-stylelint-path.js +15 -12
  18. package/helper/is-npm-or-yarn.js +12 -12
  19. package/helper/linter-bundle-config.cjs +70 -0
  20. package/helper/linter-bundle-config.d.ts +46 -0
  21. package/helper/linter-bundle-config.js +36 -0
  22. package/helper/run-process.js +14 -10
  23. package/lint.js +32 -26
  24. package/package.json +8 -7
  25. package/stylelint/index.cjs +1007 -0
  26. package/stylelint/plugins/stylelint-high-performance-animation.js +4 -5
  27. package/stylelint/plugins/stylelint-selector-no-empty.js +2 -2
  28. package/stylelint/plugins/stylelint-selector-tag-no-without-class.js +6 -7
  29. package/stylelint/plugins/stylelint-stylistic.js +7 -6
  30. package/helper/config.js +0 -48
  31. package/helper/find-missing-overrides.js +0 -49
  32. package/stylelint/index.js +0 -1007
  33. package/types.d.ts +0 -43
  34. /package/eslint/{overrides-gatsby.js → overrides-gatsby.cjs} +0 -0
  35. /package/eslint/{overrides-jest.js → overrides-jest.cjs} +0 -0
  36. /package/eslint/{overrides-jsdoc.js → overrides-jsdoc.cjs} +0 -0
  37. /package/eslint/{overrides-storybook.js → overrides-storybook.cjs} +0 -0
  38. /package/eslint/{overrides-type-declarations.js → overrides-type-declarations.cjs} +0 -0
  39. /package/eslint/{overrides-worker.js → overrides-worker.cjs} +0 -0
@@ -0,0 +1,1007 @@
1
+ /**
2
+ * @file Global Stylelint settings
3
+ */
4
+
5
+ /* eslint-disable max-lines -- The rules can be easier managed if they are all in one file */
6
+
7
+ module.exports = (async () => {
8
+ const { linterBundleConfig } = await import('../helper/linter-bundle-config.js');
9
+
10
+ return {
11
+ reportNeedlessDisables: true,
12
+ reportInvalidScopeDisables: true,
13
+ reportDescriptionlessDisables: true,
14
+ customSyntax: 'postcss-scss',
15
+ plugins: [
16
+ 'stylelint-declaration-block-no-ignored-properties',
17
+ 'stylelint-order',
18
+ 'stylelint-scss',
19
+ 'stylelint-use-logical-spec',
20
+ await import('./plugins/stylelint-high-performance-animation.js'),
21
+ await import('./plugins/stylelint-selector-no-empty.js'),
22
+ await import('./plugins/stylelint-selector-tag-no-without-class.js'),
23
+ await import('./plugins/stylelint-stylistic.js')
24
+ ],
25
+ overrides: [
26
+ {
27
+ files: ['**/*.module.*'],
28
+ rules: {
29
+ /**
30
+ * stylelint
31
+ *
32
+ * @see https://github.com/stylelint/stylelint/tree/master/lib/rules
33
+ */
34
+ 'selector-class-pattern': `^(?!(${[
35
+ // Disallowed reserved JavaScript keywords
36
+ 'abstract',
37
+ 'arguments', 'await',
38
+ 'boolean', 'break', 'byte',
39
+ 'case', 'catch', 'char', 'class', 'const', 'continue',
40
+ 'debugger', 'default', 'delete', 'do', 'double',
41
+ 'else', 'enum', 'eval', 'export', 'extends',
42
+ 'false', 'final', 'finally', 'float', 'for', 'function',
43
+ 'goto',
44
+ 'if', 'implements', 'import', 'in', 'Infinity', 'instanceof', 'int', 'interface',
45
+ 'let', 'long',
46
+ 'NaN', 'native', 'new', 'null',
47
+ 'package', 'private', 'protected', 'public',
48
+ 'return',
49
+ 'short', 'static', 'super', 'switch', 'synchronized',
50
+ 'this', 'throw', 'throws', 'transient', 'true', 'try', 'typeof',
51
+ 'undefined',
52
+ 'var', 'void', 'volatile',
53
+ 'while', 'with',
54
+ 'yield'
55
+ ].join('|')})$).+`,
56
+
57
+ /**
58
+ * stylelint-selector-tag-no-without-class
59
+ *
60
+ * @see https://github.com/Moxio/stylelint-selector-tag-no-without-class
61
+ */
62
+ 'plugin/selector-tag-no-without-class': ['/./']
63
+ }
64
+ }
65
+ ],
66
+ rules: {
67
+ /**
68
+ * stylelint
69
+ *
70
+ * @see https://github.com/stylelint/stylelint/tree/master/lib/rules
71
+ */
72
+ 'alpha-value-notation': 'number', // @todo change that to 'percentage'?
73
+ 'annotation-no-unknown': [true, { ignoreAnnotations: 'default' }],
74
+ 'at-rule-allowed-list': null,
75
+ 'at-rule-disallowed-list': null,
76
+ 'at-rule-empty-line-before': [
77
+ 'always',
78
+ {
79
+ except: [
80
+ 'first-nested'
81
+ ],
82
+ ignore: [
83
+ 'after-comment',
84
+ 'blockless-after-same-name-blockless'
85
+ ]
86
+ }
87
+ ],
88
+ 'at-rule-no-unknown': null, // scss/at-rule-no-unknown
89
+ 'at-rule-no-vendor-prefix': true,
90
+ 'at-rule-property-required-list': [{
91
+ 'font-face': ['font-family', 'font-style', 'font-weight', 'src']
92
+ }],
93
+ 'block-no-empty': true,
94
+ 'color-function-notation': [
95
+ 'modern', {
96
+ ignore: ['with-var-inside']
97
+ }
98
+ ],
99
+ 'color-hex-alpha': null, // @todo Not widely supported yet. Activate in 2024.
100
+ 'color-hex-length': 'short',
101
+ 'color-named': 'never',
102
+ 'color-no-hex': true,
103
+ 'color-no-invalid-hex': true,
104
+ 'comment-empty-line-before': [
105
+ 'always',
106
+ {
107
+ except: ['first-nested'],
108
+ ignore: ['stylelint-commands']
109
+ }
110
+ ],
111
+ 'comment-no-empty': true,
112
+ 'comment-pattern': /^[^\s].+[^\s]$/u,
113
+ 'comment-whitespace-inside': 'always',
114
+ 'comment-word-disallowed-list': null,
115
+ 'custom-media-pattern': (linterBundleConfig.sass?.patternPrefix ? `${linterBundleConfig.sass.patternPrefix}-[a-z][a-zA-Z]+(-[a-z][a-zA-Z]+\\d*)+` : null),
116
+ 'custom-property-empty-line-before': null, // Empty lines between custom properties are optional
117
+ 'custom-property-no-missing-var-function': true,
118
+ 'custom-property-pattern': (linterBundleConfig.sass?.patternPrefix ? `${linterBundleConfig.sass.patternPrefix}-[a-z][a-zA-Z]+(-[a-z][a-zA-Z]+\\d*)*` : null),
119
+ 'declaration-block-no-duplicate-custom-properties': true,
120
+ 'declaration-block-no-duplicate-properties': [
121
+ true,
122
+ {
123
+ ignore: ['consecutive-duplicates-with-different-values']
124
+ }
125
+ ],
126
+ 'declaration-block-no-redundant-longhand-properties': [true, { ignoreShorthands: [/^grid-template/u] }],
127
+ 'declaration-block-no-shorthand-property-overrides': true,
128
+ 'declaration-block-single-line-max-declarations': 1,
129
+ 'declaration-empty-line-before': [
130
+ 'always',
131
+ {
132
+ except: [
133
+ 'first-nested'
134
+ ],
135
+ ignore: [
136
+ 'after-comment',
137
+ 'after-declaration',
138
+ 'inside-single-line-block'
139
+ ]
140
+ }
141
+ ],
142
+ 'declaration-property-max-values': null, // { '/.*/': 4 }, @todo disabled because of false-positive with `padding-inline-start: #{24px + $i * 16px};` and `transition: transform, background-color, color, border-color, box-shadow;`
143
+ 'declaration-no-important': [true, {
144
+ severity: 'warning'
145
+ }],
146
+ 'declaration-property-unit-allowed-list': [{
147
+ 'font-size': ['px', 'em'],
148
+ 'line-height': ['px', 'em'],
149
+ 'transition': ['ms'],
150
+ '/^animation/': ['ms']
151
+ }],
152
+ 'declaration-property-unit-disallowed-list': null,
153
+ 'declaration-property-value-allowed-list': null,
154
+ 'declaration-property-value-disallowed-list': null,
155
+ 'declaration-property-value-no-unknown': [
156
+ true,
157
+ {
158
+ ignoreProperties: {
159
+ 'initial-value': /.+/u,
160
+ 'grid-template-areas': /^\([^\u0000]+\)$/u, // Whole block wrapped in parentheses.
161
+ '/.+/': /((^|\s)\$[a-z])|/ui // SCSS variables
162
+ }
163
+ }
164
+ ],
165
+ 'font-family-name-quotes': 'always-where-recommended',
166
+ 'font-family-no-duplicate-names': true,
167
+ 'font-family-no-missing-generic-family-keyword': true,
168
+ 'font-weight-notation': 'numeric',
169
+ 'function-allowed-list': null,
170
+ 'function-calc-no-unspaced-operator': true,
171
+ 'function-disallowed-list': null,
172
+ 'function-linear-gradient-no-nonstandard-direction': true,
173
+ 'function-name-case': 'lower',
174
+ 'function-no-unknown': null, // Implemented by scss/function-no-unknown
175
+ 'function-url-no-scheme-relative': true,
176
+ 'function-url-quotes': 'always',
177
+ 'function-url-scheme-disallowed-list': null,
178
+ 'function-url-scheme-allowed-list': null,
179
+ 'hue-degree-notation': 'number', // @todo change that to 'angle'?
180
+ 'import-notation': null, // This rule, does not make sense. `node_modules` dependencies need to use `url("css_bundle")`, while project files are using only a string.
181
+ 'keyframe-block-no-duplicate-selectors': true,
182
+ 'keyframe-declaration-no-important': true,
183
+ 'keyframe-selector-notation': 'percentage',
184
+ 'keyframes-name-pattern': '^[a-z]+(-[a-z]+)*\\d*$',
185
+ 'length-zero-no-unit': true,
186
+ 'max-nesting-depth': 6,
187
+ 'media-feature-name-allowed-list': null,
188
+ 'media-feature-name-disallowed-list': null,
189
+ 'media-feature-name-no-unknown': true,
190
+ 'media-feature-name-no-vendor-prefix': null, // For Safari, we still need "-webkit-min-device-pixel-ratio": https://caniuse.com/css-media-resolution
191
+ 'media-feature-name-unit-allowed-list': null,
192
+ 'media-feature-name-value-allowed-list': null,
193
+ 'media-feature-name-value-no-unknown': true,
194
+ 'media-feature-range-notation': 'prefix',
195
+ 'media-query-no-invalid': true,
196
+ 'named-grid-areas-no-invalid': true,
197
+ 'no-descending-specificity': null, // doesn't work in many cases (e.g. while using the SCSS :global()-pseudo-class)
198
+ 'no-duplicate-at-import-rules': true,
199
+ 'no-duplicate-selectors': true,
200
+ 'no-empty-source': true,
201
+ 'no-invalid-double-slash-comments': true,
202
+ 'no-invalid-position-at-import-rule': true,
203
+ 'no-irregular-whitespace': true,
204
+ 'no-unknown-animations': true,
205
+ 'no-unknown-custom-properties': null, // @todo Activate in 2025 as Firefox currently does not support "@property" and there is no way to specify which custom properties are available
206
+ 'number-max-precision': 5,
207
+ 'property-allowed-list': null,
208
+ 'property-disallowed-list': [
209
+ 'font', // Shorthand property is to complex
210
+ 'grid-gap', // @deprecated Use gap.
211
+ 'padding-inline', // That's not widely supported and there is no fallback. @see https://caniuse.com/mdn-css_properties_padding-inline
212
+ 'margin-inline', // That's not widely supported and there is no fallback. @see https://caniuse.com/mdn-css_properties_margin-inline
213
+ 'inset-inline', // That's not widely supported and there is no fallback. @see https://caniuse.com/mdn-css_properties_inset-inline
214
+ 'inset-inline-start', // That's not widely supported and there is no fallback. @see https://caniuse.com/mdn-css_properties_inset-inline-start
215
+ 'inset-inline-end' // That's not widely supported and there is no fallback. @see https://caniuse.com/mdn-css_properties_inset-inline-end
216
+ ],
217
+ 'property-no-unknown': true,
218
+ 'property-no-vendor-prefix': true,
219
+ 'rule-selector-property-disallowed-list': null,
220
+ 'rule-empty-line-before': [
221
+ 'always-multi-line',
222
+ {
223
+ except: ['first-nested'],
224
+ ignore: ['after-comment']
225
+ }
226
+ ],
227
+ 'selector-anb-no-unmatchable': true,
228
+ 'selector-attribute-name-disallowed-list': null,
229
+ 'selector-attribute-operator-allowed-list': null,
230
+ 'selector-attribute-operator-disallowed-list': null,
231
+ 'selector-attribute-quotes': 'always',
232
+ 'selector-class-pattern': null,
233
+ 'selector-combinator-allowed-list': null,
234
+ 'selector-combinator-disallowed-list': null,
235
+ 'selector-disallowed-list': null,
236
+ 'selector-id-pattern': '^[a-z]+(-[a-z]+)*$',
237
+ 'selector-max-attribute': 1,
238
+ 'selector-max-class': 5,
239
+ 'selector-max-combinators': 5,
240
+ 'selector-max-compound-selectors': 5,
241
+ 'selector-max-id': 1,
242
+ 'selector-max-pseudo-class': 3,
243
+ 'selector-max-specificity': [
244
+ '1,4,2',
245
+ {
246
+ ignoreSelectors: [':global', '#root', '[dir="rtl"]', '[dir="ltr"]']
247
+ }
248
+ ],
249
+ 'selector-max-type': 6,
250
+ 'selector-max-universal': [1, { ignoreAfterCombinators: ['>', '+'] }],
251
+ 'selector-nested-pattern': null,
252
+ 'selector-no-qualifying-type': [true, { ignore: ['attribute', 'class'] }],
253
+ 'selector-no-vendor-prefix': true,
254
+ 'selector-not-notation': null, // 'complex', @todo Reactivate in 2024. Disabled for now, because it depends on the project if modern Selectors Level 4 CSS can be used.
255
+ 'selector-pseudo-class-allowed-list': null,
256
+ 'selector-pseudo-class-disallowed-list': null,
257
+ 'selector-pseudo-class-no-unknown': [true, { ignorePseudoClasses: ['global'] }],
258
+ 'selector-pseudo-element-allowed-list': null,
259
+ 'selector-pseudo-element-disallowed-list': null,
260
+ 'selector-pseudo-element-colon-notation': 'double',
261
+ 'selector-pseudo-element-no-unknown': true,
262
+ 'selector-type-case': 'lower',
263
+ 'selector-type-no-unknown': true,
264
+ 'shorthand-property-no-redundant-values': true,
265
+ 'string-no-newline': true,
266
+ 'time-min-milliseconds': 40, // @todo For the delay of transitions 40ms should be the minimum, for the duration 150ms should be the minimum (change it, as soon as https://github.com/stylelint/stylelint/issues/4552 got implemented)
267
+ 'unit-allowed-list': null,
268
+ 'unit-disallowed-list': null,
269
+ 'unit-no-unknown': true,
270
+ 'value-keyword-case': [
271
+ 'lower',
272
+ {
273
+ camelCaseSvgKeywords: true
274
+ }
275
+ ],
276
+ 'value-no-vendor-prefix': true,
277
+
278
+ /**
279
+ * stylelint-declaration-block-no-ignored-properties
280
+ *
281
+ * @see https://www.npmjs.com/package/stylelint-declaration-block-no-ignored-properties
282
+ */
283
+ 'plugin/declaration-block-no-ignored-properties': true,
284
+
285
+ /**
286
+ * stylelint-high-performance-animation
287
+ *
288
+ * @see https://github.com/kristerkari/stylelint-high-performance-animation
289
+ */
290
+ 'plugin/no-low-performance-animation-properties': [true, {
291
+ ignore: 'paint-properties',
292
+ severity: 'warning'
293
+ }],
294
+
295
+ /**
296
+ * stylelint-stylistic rules
297
+ */
298
+ 'plugin/at-rule-name-case': 'lower',
299
+ 'plugin/at-rule-name-space-after': 'always-single-line',
300
+ 'plugin/at-rule-semicolon-newline-after': 'always',
301
+ 'plugin/at-rule-semicolon-space-before': 'never',
302
+ 'plugin/block-closing-brace-empty-line-before': 'never',
303
+ 'plugin/block-closing-brace-newline-after': 'always',
304
+ 'plugin/block-closing-brace-newline-before': 'always-multi-line',
305
+ 'plugin/block-closing-brace-space-before': 'always-single-line',
306
+ 'plugin/block-opening-brace-newline-after': 'always-multi-line',
307
+ 'plugin/block-opening-brace-space-after': 'always-single-line',
308
+ 'plugin/block-opening-brace-space-before': 'always',
309
+ 'plugin/color-hex-case': 'lower',
310
+ 'plugin/declaration-bang-space-after': 'never',
311
+ 'plugin/declaration-bang-space-before': 'always',
312
+ 'plugin/declaration-block-semicolon-newline-after': 'always-multi-line',
313
+ 'plugin/declaration-block-semicolon-newline-before': 'never-multi-line',
314
+ 'plugin/declaration-block-semicolon-space-after': 'always-single-line',
315
+ 'plugin/declaration-block-semicolon-space-before': 'never',
316
+ 'plugin/declaration-block-trailing-semicolon': 'always',
317
+ 'plugin/declaration-colon-newline-after': 'always-multi-line',
318
+ 'plugin/declaration-colon-space-after': 'always-single-line',
319
+ 'plugin/declaration-colon-space-before': 'never',
320
+ 'plugin/function-comma-newline-after': 'always-multi-line',
321
+ 'plugin/function-comma-newline-before': 'never-multi-line',
322
+ 'plugin/function-comma-space-after': 'always-single-line',
323
+ 'plugin/function-comma-space-before': 'never',
324
+ 'plugin/function-max-empty-lines': 0,
325
+ 'plugin/function-parentheses-newline-inside': 'always-multi-line',
326
+ 'plugin/function-parentheses-space-inside': 'never-single-line',
327
+ 'plugin/function-whitespace-after': 'always',
328
+ 'plugin/indentation': 'tab',
329
+ 'plugin/linebreaks': 'unix',
330
+ 'plugin/max-empty-lines': 1,
331
+ 'plugin/max-line-length': 160,
332
+ 'plugin/media-feature-colon-space-after': 'always',
333
+ 'plugin/media-feature-colon-space-before': 'never',
334
+ 'plugin/media-feature-name-case': 'lower',
335
+ 'plugin/media-feature-parentheses-space-inside': 'never',
336
+ 'plugin/media-feature-range-operator-space-after': 'always',
337
+ 'plugin/media-feature-range-operator-space-before': 'always',
338
+ 'plugin/media-query-list-comma-newline-after': 'always-multi-line',
339
+ 'plugin/media-query-list-comma-newline-before': 'never-multi-line',
340
+ 'plugin/media-query-list-comma-space-after': 'always-single-line',
341
+ 'plugin/media-query-list-comma-space-before': 'never',
342
+ 'plugin/no-empty-first-line': true,
343
+ 'plugin/no-eol-whitespace': true,
344
+ 'plugin/no-extra-semicolons': true,
345
+ 'plugin/no-missing-end-of-source-newline': true,
346
+ 'plugin/number-leading-zero': 'always',
347
+ 'plugin/number-no-trailing-zeros': true,
348
+ 'plugin/property-case': 'lower',
349
+ 'plugin/selector-attribute-brackets-space-inside': 'never',
350
+ 'plugin/selector-attribute-operator-space-after': 'never',
351
+ 'plugin/selector-attribute-operator-space-before': 'never',
352
+ 'plugin/selector-combinator-space-after': 'always',
353
+ 'plugin/selector-combinator-space-before': 'always',
354
+ 'plugin/selector-descendant-combinator-no-non-space': true,
355
+ 'plugin/selector-list-comma-newline-after': 'always',
356
+ 'plugin/selector-list-comma-newline-before': 'never-multi-line',
357
+ 'plugin/selector-list-comma-space-after': 'always-single-line',
358
+ 'plugin/selector-list-comma-space-before': 'never',
359
+ 'plugin/selector-max-empty-lines': 0,
360
+ 'plugin/selector-pseudo-class-case': 'lower',
361
+ 'plugin/selector-pseudo-class-parentheses-space-inside': 'never',
362
+ 'plugin/selector-pseudo-element-case': 'lower',
363
+ 'plugin/string-quotes': 'double',
364
+ 'plugin/unicode-bom': 'never',
365
+ 'plugin/unit-case': 'lower',
366
+ 'plugin/value-list-comma-newline-after': 'always-multi-line',
367
+ 'plugin/value-list-comma-newline-before': 'never-multi-line',
368
+ 'plugin/value-list-comma-space-after': 'always-single-line',
369
+ 'plugin/value-list-comma-space-before': 'never',
370
+ 'plugin/value-list-max-empty-lines': 0,
371
+
372
+ /**
373
+ * stylelint-order
374
+ *
375
+ * @see https://www.npmjs.com/package/stylelint-order
376
+ */
377
+ 'order/order': [
378
+ 'dollar-variables',
379
+ 'at-variables',
380
+ {
381
+ type: 'at-rule',
382
+ name: 'extend'
383
+ },
384
+ {
385
+ type: 'at-rule',
386
+ name: 'include'
387
+ },
388
+ 'custom-properties',
389
+ 'declarations',
390
+ {
391
+ type: 'at-rule',
392
+ name: 'media'
393
+ },
394
+ 'rules',
395
+ {
396
+ type: 'at-rule',
397
+ name: 'keyframes'
398
+ }
399
+ ],
400
+ 'order/properties-alphabetical-order': null,
401
+ 'order/properties-order': [
402
+ [
403
+ {
404
+ groupName: 'Reset',
405
+ emptyLineBefore: 'always',
406
+ noEmptyLineBetween: true,
407
+ properties: [
408
+ 'all'
409
+ ]
410
+ },
411
+
412
+ {
413
+ groupName: 'Performance Optimizations',
414
+ emptyLineBefore: 'always',
415
+ noEmptyLineBetween: true,
416
+ properties: [
417
+ 'contain',
418
+ 'content-visibility',
419
+ 'contain-intrinsic-size',
420
+ 'will-change'
421
+ ]
422
+ },
423
+ {
424
+ groupName: 'Heading',
425
+ emptyLineBefore: 'always',
426
+ noEmptyLineBetween: true,
427
+ properties: [
428
+ 'content',
429
+ 'quotes'
430
+ ]
431
+ },
432
+ {
433
+ groupName: 'Box',
434
+ emptyLineBefore: 'always',
435
+ noEmptyLineBetween: true,
436
+ properties: [
437
+ 'display',
438
+ 'visibility',
439
+
440
+ 'appearance',
441
+
442
+ 'position',
443
+ 'z-index'
444
+ ]
445
+ },
446
+ {
447
+ groupName: 'Position',
448
+ emptyLineBefore: 'always',
449
+ noEmptyLineBetween: true,
450
+ properties: [
451
+ 'inset',
452
+ 'top',
453
+ 'right',
454
+ 'bottom',
455
+ 'left',
456
+
457
+ 'box-sizing'
458
+ ]
459
+ },
460
+ {
461
+ groupName: 'Grid',
462
+ emptyLineBefore: 'always',
463
+ noEmptyLineBetween: true,
464
+ properties: [
465
+ 'grid',
466
+ 'grid-after',
467
+ 'grid-area',
468
+ 'grid-auto-columns',
469
+ 'grid-auto-flow',
470
+ 'grid-auto-rows',
471
+ 'grid-before',
472
+ 'grid-column',
473
+ 'grid-column-end',
474
+ 'grid-column-gap',
475
+ 'grid-column-start',
476
+ 'grid-columns',
477
+ 'grid-end',
478
+ 'grid-row',
479
+ 'grid-row-end',
480
+ 'grid-row-gap',
481
+ 'grid-row-start',
482
+ 'grid-rows',
483
+ 'grid-start',
484
+ 'grid-template',
485
+ 'grid-template-areas',
486
+ 'grid-template-columns',
487
+ 'grid-template-rows'
488
+ ]
489
+ },
490
+ {
491
+ groupName: 'Flex',
492
+ emptyLineBefore: 'always',
493
+ noEmptyLineBetween: true,
494
+ properties: [
495
+ 'flex',
496
+ 'flex-basis',
497
+ 'flex-direction',
498
+ 'flex-flow',
499
+ 'flex-grow',
500
+ 'flex-shrink',
501
+ 'flex-wrap',
502
+ 'order'
503
+ ]
504
+ },
505
+ {
506
+ groupName: 'Gap',
507
+ emptyLineBefore: 'always',
508
+ noEmptyLineBetween: true,
509
+ properties: [
510
+ 'gap',
511
+ 'row-gap',
512
+ 'column-gap'
513
+ ]
514
+ },
515
+ {
516
+ groupName: 'Alignment',
517
+ emptyLineBefore: 'always',
518
+ noEmptyLineBetween: true,
519
+ properties: [
520
+ 'align-content',
521
+ 'align-items',
522
+ 'align-self',
523
+ 'justify-content',
524
+ 'justify-items',
525
+ 'justify-self',
526
+ 'place-content',
527
+ 'place-items',
528
+ 'place-self'
529
+ ]
530
+ },
531
+ {
532
+ groupName: 'Dimension',
533
+ emptyLineBefore: 'always',
534
+ noEmptyLineBetween: true,
535
+ properties: [
536
+ 'width',
537
+ 'min-width',
538
+ 'max-width',
539
+ 'height',
540
+ 'min-height',
541
+ 'max-height'
542
+ ]
543
+ },
544
+ {
545
+ groupName: 'Margin',
546
+ emptyLineBefore: 'always',
547
+ noEmptyLineBetween: true,
548
+ properties: [
549
+ 'margin',
550
+ 'margin-top',
551
+ 'margin-right',
552
+ 'margin-bottom',
553
+ 'margin-left',
554
+ 'margin-inline-start',
555
+ 'margin-inline-end'
556
+ ]
557
+ },
558
+ {
559
+ groupName: 'Padding',
560
+ emptyLineBefore: 'always',
561
+ noEmptyLineBetween: true,
562
+ properties: [
563
+ 'padding',
564
+ 'padding-top',
565
+ 'padding-right',
566
+ 'padding-bottom',
567
+ 'padding-left',
568
+ 'padding-inline-start',
569
+ 'padding-inline-end'
570
+ ]
571
+ },
572
+ {
573
+ groupName: 'Float',
574
+ emptyLineBefore: 'always',
575
+ noEmptyLineBetween: true,
576
+ properties: [
577
+ 'float',
578
+ 'clear'
579
+ ]
580
+ },
581
+ {
582
+ groupName: 'Overflow',
583
+ emptyLineBefore: 'always',
584
+ noEmptyLineBetween: true,
585
+ properties: [
586
+ 'overflow',
587
+ 'overflow-x',
588
+ 'overflow-y',
589
+ 'overscroll-behavior'
590
+ ]
591
+ },
592
+ {
593
+ groupName: 'Clip / Zoom',
594
+ emptyLineBefore: 'always',
595
+ noEmptyLineBetween: true,
596
+ properties: [
597
+ 'clip',
598
+ 'zoom'
599
+ ]
600
+ },
601
+ {
602
+ groupName: 'Columns',
603
+ emptyLineBefore: 'always',
604
+ noEmptyLineBetween: true,
605
+ properties: [
606
+ 'columns',
607
+ 'column-fill',
608
+ 'column-rule',
609
+ 'column-span',
610
+ 'column-count',
611
+ 'column-width',
612
+ 'widows',
613
+ 'orphans'
614
+ ]
615
+ },
616
+ {
617
+ groupName: 'Table / List',
618
+ emptyLineBefore: 'always',
619
+ noEmptyLineBetween: true,
620
+ properties: [
621
+ 'table-layout',
622
+ 'empty-cells',
623
+ 'caption-side',
624
+ 'border-spacing',
625
+ 'border-collapse',
626
+ 'list-style',
627
+ 'list-style-position',
628
+ 'list-style-type',
629
+ 'list-style-image'
630
+ ]
631
+ },
632
+ {
633
+ groupName: 'Transform',
634
+ emptyLineBefore: 'always',
635
+ noEmptyLineBetween: true,
636
+ properties: [
637
+ 'transform',
638
+ 'transform-origin',
639
+ 'transform-style',
640
+ 'backface-visibility',
641
+ 'perspective',
642
+ 'perspective-origin'
643
+ ]
644
+ },
645
+ {
646
+ groupName: 'Transition',
647
+ emptyLineBefore: 'always',
648
+ noEmptyLineBetween: true,
649
+ properties: [
650
+ 'transition',
651
+ 'transition-property',
652
+ 'transition-duration',
653
+ 'transition-timing-function',
654
+ 'transition-delay'
655
+ ]
656
+ },
657
+ {
658
+ groupName: 'Animation',
659
+ emptyLineBefore: 'always',
660
+ noEmptyLineBetween: true,
661
+ properties: [
662
+ 'animation',
663
+ 'animation-name',
664
+ 'animation-duration',
665
+ 'animation-play-state',
666
+ 'animation-timing-function',
667
+ 'animation-delay',
668
+ 'animation-iteration-count',
669
+ 'animation-direction',
670
+ 'animation-fill-mode'
671
+ ]
672
+ },
673
+ {
674
+ groupName: 'Border General',
675
+ emptyLineBefore: 'always',
676
+ noEmptyLineBetween: true,
677
+ properties: [
678
+ 'border',
679
+ 'border-top',
680
+ 'border-right',
681
+ 'border-bottom',
682
+ 'border-left',
683
+ 'border-width',
684
+ 'border-top-width',
685
+ 'border-right-width',
686
+ 'border-bottom-width',
687
+ 'border-left-width',
688
+ 'border-inline-start-width',
689
+ 'border-inline-end-width',
690
+
691
+ 'border-style',
692
+ 'border-top-style',
693
+ 'border-right-style',
694
+ 'border-bottom-style',
695
+ 'border-left-style',
696
+ 'border-inline-start-style',
697
+ 'border-inline-end-style',
698
+
699
+ 'border-radius',
700
+ 'border-top-left-radius',
701
+ 'border-top-right-radius',
702
+ 'border-bottom-left-radius',
703
+ 'border-bottom-right-radius',
704
+
705
+ 'border-color',
706
+ 'border-top-color',
707
+ 'border-right-color',
708
+ 'border-bottom-color',
709
+ 'border-left-color',
710
+ 'border-inline-start-color',
711
+ 'border-inline-end-color'
712
+ ]
713
+ },
714
+ {
715
+ groupName: 'Outline',
716
+ emptyLineBefore: 'always',
717
+ noEmptyLineBetween: true,
718
+ properties: [
719
+ 'outline',
720
+ 'outline-color',
721
+ 'outline-offset',
722
+ 'outline-style',
723
+ 'outline-width'
724
+ ]
725
+ },
726
+ {
727
+ groupName: 'Stroke',
728
+ emptyLineBefore: 'always',
729
+ noEmptyLineBetween: true,
730
+ properties: [
731
+ 'stroke-width',
732
+ 'stroke-linecap',
733
+ 'stroke-dasharray',
734
+ 'stroke-dashoffset',
735
+ 'stroke'
736
+ ]
737
+ },
738
+ {
739
+ groupName: 'Opacity',
740
+ emptyLineBefore: 'always',
741
+ noEmptyLineBetween: true,
742
+ properties: [
743
+ 'opacity'
744
+ ]
745
+ },
746
+ {
747
+ groupName: 'Background',
748
+ emptyLineBefore: 'always',
749
+ noEmptyLineBetween: true,
750
+ properties: [
751
+ 'background',
752
+ 'background-color',
753
+ 'background-image',
754
+ 'background-repeat',
755
+ 'background-position',
756
+ 'background-size',
757
+ 'box-shadow',
758
+ 'fill'
759
+ ]
760
+ },
761
+ {
762
+ groupName: 'Text Color',
763
+ emptyLineBefore: 'always',
764
+ noEmptyLineBetween: true,
765
+ properties: [
766
+ 'color',
767
+ 'caret-color'
768
+ ]
769
+ },
770
+ {
771
+ groupName: 'Font',
772
+ emptyLineBefore: 'always',
773
+ noEmptyLineBetween: true,
774
+ properties: [
775
+ 'font',
776
+ 'font-family',
777
+ 'font-size',
778
+ 'font-size-adjust',
779
+ 'font-stretch',
780
+ 'font-effect',
781
+ 'font-style',
782
+ 'font-variant',
783
+ 'font-weight',
784
+ 'font-smoothing',
785
+ 'font-display',
786
+
787
+ 'font-emphasize',
788
+ 'font-emphasize-position',
789
+ 'font-emphasize-style'
790
+ ]
791
+ },
792
+ {
793
+ groupName: 'Text',
794
+ emptyLineBefore: 'always',
795
+ noEmptyLineBetween: true,
796
+ properties: [
797
+ 'letter-spacing',
798
+ 'line-height',
799
+ 'word-spacing',
800
+
801
+ 'text-align',
802
+ 'text-align-last',
803
+ 'text-decoration',
804
+ 'text-indent',
805
+ 'text-justify',
806
+ 'text-overflow',
807
+ 'text-overflow-ellipsis',
808
+ 'text-overflow-mode',
809
+ 'text-rendering',
810
+ 'text-outline',
811
+ 'text-shadow',
812
+ 'text-transform',
813
+ 'text-wrap',
814
+ 'word-wrap',
815
+ 'overflow-wrap',
816
+ 'word-break',
817
+
818
+ 'text-emphasis',
819
+ 'text-emphasis-color',
820
+ 'text-emphasis-style',
821
+ 'text-emphasis-position',
822
+
823
+ 'vertical-align',
824
+ 'white-space',
825
+ 'word-spacing',
826
+ 'hyphens',
827
+ 'hyphenate-character',
828
+
829
+ 'src'
830
+ ]
831
+ },
832
+ {
833
+ groupName: 'Other',
834
+ emptyLineBefore: 'always',
835
+ noEmptyLineBetween: true,
836
+ properties: [
837
+ 'tab-size',
838
+ 'counter-reset',
839
+ 'counter-increment',
840
+ 'resize',
841
+ 'cursor',
842
+ 'pointer-events',
843
+ 'speak',
844
+ 'user-select',
845
+ 'touch-callout',
846
+ 'nav-index',
847
+ 'nav-up',
848
+ 'nav-right',
849
+ 'nav-down',
850
+ 'nav-left'
851
+ ]
852
+ }
853
+ ],
854
+ {
855
+ unspecified: 'bottom',
856
+ emptyLineBeforeUnspecified: 'always',
857
+ emptyLineMinimumPropertyThreshold: 0
858
+ }
859
+ ],
860
+
861
+ /**
862
+ * stylelint-scss
863
+ *
864
+ * @see https://www.npmjs.com/package/stylelint-scss
865
+ */
866
+ 'scss/at-each-key-value-single-line': true,
867
+ 'scss/at-else-closing-brace-newline-after': 'always-last-in-chain',
868
+ 'scss/at-else-closing-brace-space-after': 'never-intermediate',
869
+ 'scss/at-else-empty-line-before': 'never',
870
+ 'scss/at-else-if-parentheses-space-before': 'always',
871
+ 'scss/at-extend-no-missing-placeholder': true,
872
+ 'scss/at-function-named-arguments': ['never', { ignoreFunctions: ['scale-color', 'color.scale'] }],
873
+ 'scss/at-function-parentheses-space-before': 'always',
874
+ 'scss/at-function-pattern': '^[a-z]+(-[a-z]+)*$',
875
+ 'scss/at-if-closing-brace-newline-after': 'always-last-in-chain',
876
+ 'scss/at-if-closing-brace-space-after': 'never-intermediate',
877
+ 'scss/at-if-no-null': true,
878
+ 'scss/at-import-no-partial-leading-underscore': null,
879
+ 'scss/at-import-partial-extension-blacklist': null,
880
+ 'scss/at-import-partial-extension-whitelist': null,
881
+ 'scss/at-import-partial-extension': 'always',
882
+ 'scss/at-mixin-argumentless-call-parentheses': 'never',
883
+ 'scss/at-mixin-named-arguments': ['always', { ignore: ['single-argument'] }],
884
+ 'scss/at-mixin-parentheses-space-before': 'always',
885
+ 'scss/at-mixin-pattern': '^[a-z]+(-[a-z]+)*$',
886
+ 'scss/at-rule-conditional-no-parentheses': true,
887
+ 'scss/at-rule-no-unknown': true,
888
+ 'scss/at-use-no-unnamespaced': true,
889
+ 'scss/comment-no-empty': true,
890
+ 'scss/comment-no-loud': true,
891
+ 'scss/declaration-nested-properties-no-divided-groups': true,
892
+ 'scss/declaration-nested-properties': 'never',
893
+ 'scss/dimension-no-non-numeric-values': true,
894
+ 'scss/dollar-variable-colon-newline-after': null,
895
+ 'scss/dollar-variable-colon-space-after': 'always',
896
+ 'scss/dollar-variable-colon-space-before': 'never',
897
+ 'scss/dollar-variable-default': null,
898
+ 'scss/dollar-variable-empty-line-before': [
899
+ 'always',
900
+ {
901
+ except: ['first-nested', 'after-comment', 'after-dollar-variable']
902
+ }
903
+ ],
904
+ 'scss/dollar-variable-empty-line-after': [
905
+ 'always',
906
+ {
907
+ except: ['last-nested', 'before-dollar-variable'],
908
+ ignore: ['before-comment', 'inside-single-line-block']
909
+ }
910
+ ],
911
+ 'scss/dollar-variable-first-in-block': [true, { ignore: ['comments', 'imports'] }],
912
+ 'scss/dollar-variable-no-missing-interpolation': true,
913
+ 'scss/dollar-variable-no-namespaced-assignment': true,
914
+ 'scss/dollar-variable-pattern': '^[a-z]+(-[a-z]+)*$',
915
+ 'scss/double-slash-comment-empty-line-before': [
916
+ 'always',
917
+ {
918
+ except: ['first-nested'],
919
+ ignore: ['between-comments', 'stylelint-commands']
920
+ }
921
+ ],
922
+ 'scss/double-slash-comment-inline': null,
923
+ 'scss/double-slash-comment-whitespace-inside': 'always',
924
+ 'scss/function-color-relative': true,
925
+ 'scss/function-disallowed-list': null,
926
+ 'scss/function-no-unknown': [true, { ignoreFunctions: [/^custom-/u] }],
927
+ 'scss/function-quote-no-quoted-strings-inside': true,
928
+ 'scss/function-unquote-no-unquoted-strings-inside': true,
929
+ 'scss/map-keys-quotes': 'always',
930
+ 'scss/media-feature-value-dollar-variable': 'never',
931
+ 'scss/no-dollar-variables': null,
932
+ 'scss/no-duplicate-dollar-variables': true,
933
+ 'scss/no-duplicate-mixins': true,
934
+ 'scss/no-global-function-names': true,
935
+ 'scss/operator-no-newline-after': true,
936
+ 'scss/operator-no-newline-before': true,
937
+ 'scss/operator-no-unspaced': true,
938
+ 'scss/partial-no-import': null,
939
+ 'scss/percent-placeholder-pattern': '^[a-z]+(-[a-z]+)*$',
940
+ 'scss/selector-nest-combinators': null, // Sometimes nesting does not make sense
941
+ 'scss/selector-no-redundant-nesting-selector': true,
942
+ 'scss/selector-no-union-class-name': true,
943
+
944
+ /**
945
+ * stylelint-selector-no-empty
946
+ *
947
+ * @see https://github.com/ssivanatarajan/stylelint-selector-no-empty
948
+ */
949
+ 'plugin/stylelint-selector-no-empty': true,
950
+
951
+ /**
952
+ * stylelint-selector-tag-no-without-class
953
+ *
954
+ * @see https://github.com/Moxio/stylelint-selector-tag-no-without-class
955
+ */
956
+ 'plugin/selector-tag-no-without-class': null,
957
+
958
+ /**
959
+ * stylelint-use-logical-spec
960
+ *
961
+ * @see https://github.com/Jordan-Hall/stylelint-use-logical-spec
962
+ */
963
+ 'liberty/use-logical-spec': ['always', { except: [
964
+ 'float',
965
+
966
+ 'inset',
967
+ 'top',
968
+ 'bottom',
969
+
970
+ 'border-top', // "border-block-start" is new and should not be used before 2022. @see https://caniuse.com/mdn-css_properties_border-block-start
971
+ 'border-top-color', // "border-block-start-color" is new and should not be used before 2022. @see https://caniuse.com/mdn-css_properties_border-block-start-color
972
+ 'border-top-left-radius', // "border-start-start-radius" is new and should not be used before 2022. @see https://caniuse.com/mdn-css_properties_border-start-start-radius
973
+ 'border-top-right-radius', // "border-start-end-radius" is new and should not be used before 2022. @see https://caniuse.com/mdn-css_properties_border-start-end-radius
974
+ 'border-top-width', // "border-block-start-width" is new and should not be used before 2022. @see https://caniuse.com/mdn-css_properties_border-block-start-width
975
+ 'border-bottom', // "border-block-end" is new and should not be used before 2022. @see https://caniuse.com/mdn-css_properties_border-block-end
976
+ 'border-bottom-color', // "border-block-end-color" is new and should not be used before 2022. @see https://caniuse.com/mdn-css_properties_border-block-end-color
977
+ 'border-bottom-left-radius', // "border-end-start-radius" is new and should not be used before 2022. @see https://caniuse.com/mdn-css_properties_border-bottom-left-radius
978
+ 'border-bottom-right-radius', // "border-end-end-radius" is new and should not be used before 2022. @see https://caniuse.com/mdn-css_properties_border-end-end-radius
979
+ 'border-bottom-width', // "border-block-end-width" is new and should not be used before 2022. @see https://caniuse.com/mdn-css_properties_border-block-end-width
980
+ 'border-left', // "border-inline-start" is new and should not be used before 2022. @see https://caniuse.com/mdn-css_properties_border-inline-start
981
+ 'border-left-color', // "border-inline-start-color" is new and should not be used before 2022. @see https://caniuse.com/mdn-css_properties_border-inline-start-color
982
+ 'border-right', // "border-inline-end" is new and should not be used before 2022. @see https://caniuse.com/mdn-css_properties_border-inline-end
983
+ 'border-right-color', // "border-inline-end-color" is new and should not be used before 2022. @see https://caniuse.com/mdn-css_properties_border-inline-end-color
984
+
985
+ 'margin',
986
+ 'margin-top',
987
+ 'margin-bottom',
988
+
989
+ 'padding',
990
+ 'padding-top',
991
+ 'padding-bottom',
992
+
993
+ 'left', // "inset-inline" is not supported by any browser, expect Firefox. @see https://caniuse.com/mdn-css_properties_inset-inline
994
+ 'right', // "inset-inline-end" is not supported by any browser, expect Firefox. @see https://caniuse.com/mdn-css_properties_inset-inline
995
+
996
+ 'text-align', // @todo Should only be disabled for "right", since numbers should be always aligned right, for any direction.
997
+
998
+ 'width', // "inline-size" is very rarely needed. I'm not aware of any use-case.
999
+ 'height', // "block-size" is very rarely needed. I'm not aware of any use-case.
1000
+ 'min-width', // "min-inline-size" is very rarely needed. I'm not aware of any use-case.
1001
+ 'min-height', // "min-block-size" is very rarely needed. I'm not aware of any use-case.
1002
+ 'max-width', // "max-inline-size" is very rarely needed. I'm not aware of any use-case.
1003
+ 'max-height' // "max-block-size" is very rarely needed. I'm not aware of any use-case.
1004
+ ] }]
1005
+ }
1006
+ };
1007
+ })();