|
1 | 1 | 'use strict';
|
2 | 2 |
|
3 | 3 | // See https://stylelint.io/user-guide/rules/.
|
| 4 | +/** @type {import('stylelint').Config} */ |
4 | 5 | module.exports = {
|
5 | 6 | extends: ['stylelint-config-standard-scss', 'stylelint-config-prettier-scss'],
|
6 | 7 | plugins: ['stylelint-order', 'stylelint-declaration-strict-value'],
|
7 | 8 | rules: {
|
| 9 | + 'property-no-vendor-prefix': true, |
| 10 | + 'value-no-vendor-prefix': true, |
| 11 | + 'selector-no-vendor-prefix': true, |
| 12 | + 'media-feature-name-no-vendor-prefix': true, |
| 13 | + 'at-rule-no-vendor-prefix': true, |
8 | 14 | 'no-descending-specificity': null,
|
9 | 15 | 'order/properties-alphabetical-order': true,
|
10 | 16 | 'scale-unlimited/declaration-strict-value': [
|
11 |
| - ['color', 'background-color', 'font-weight', 'font-size', '/margin/', '/padding/'], |
| 17 | + [ |
| 18 | + 'color', |
| 19 | + 'background-color', |
| 20 | + 'font-weight', |
| 21 | + 'font-size', |
| 22 | + '/margin/', |
| 23 | + '/padding/', |
| 24 | + 'top', |
| 25 | + 'bottom', |
| 26 | + 'left', |
| 27 | + 'right', |
| 28 | + ], |
12 | 29 | {
|
13 | 30 | ignoreValues: {
|
14 |
| - 'color': ['transparent', 'unset', 'inherit'], |
15 |
| - 'background-color': ['transparent', 'unset', 'inherit'], |
16 |
| - '/margin/': ['unset', 0, 'inherit', 'auto'], |
17 |
| - '/padding/': ['unset', 0, 'inherit'], |
| 31 | + 'color': ['transparent', 'unset', 'inherit', 'initial'], |
| 32 | + 'background-color': ['transparent', 'unset', 'inherit', 'initial'], |
| 33 | + '/margin/': ['unset', 0, 'inherit', 'auto', 'initial'], |
| 34 | + '/padding/': ['unset', 0, 'inherit', 'initial', '/[0-9]+%/'], |
| 35 | + 'top': ['unset', 0, 'inherit', 'auto', 'initial', '/[0-9]+%/'], |
| 36 | + 'bottom': ['unset', 0, 'inherit', 'auto', 'initial', '/[0-9]+%/'], |
| 37 | + 'left': ['unset', 0, 'inherit', 'auto', 'initial', '/[0-9]+%/'], |
| 38 | + 'right': ['unset', 0, 'inherit', 'auto', 'initial', '/[0-9]+%/'], |
18 | 39 | },
|
| 40 | + disableFix: true, |
19 | 41 | },
|
20 | 42 | ],
|
21 | 43 | 'declaration-no-important': true,
|
22 | 44 | 'unit-allowed-list': [
|
23 |
| - ['rem', 's', 'ms'], |
| 45 | + ['rem', 's', 'ms', '%'], |
24 | 46 | {
|
25 | 47 | ignoreFunctions: ['/.*/'],
|
26 | 48 | severity: 'warning',
|
27 | 49 | ignoreProperties: {
|
28 |
| - '%': ['min-width', 'max-width', 'width', 'min-height', 'max-height', 'height', 'flex-basis', 'flex'], |
29 |
| - 'vw': ['min-width', 'max-width', 'width', 'min-height', 'max-height', 'height', 'flex-basis', 'flex'], |
30 |
| - 'vh': ['min-width', 'max-width', 'width', 'min-height', 'max-height', 'height', 'flex-basis', 'flex'], |
| 50 | + vw: ['/width/', '/height/', '/flex/'], |
| 51 | + vh: ['/width/', '/height/', '/flex/'], |
| 52 | + fr: ['/grid/'], |
| 53 | + deg: ['rotate'], |
31 | 54 | },
|
32 | 55 | },
|
33 | 56 | ],
|
|
0 commit comments