Vben
2021-03-27 b25ceb4201bce806dc129f24c2d98fd2ff0392d1
提交 | 用户 | age
2f6253 1 module.exports = {
2   root: true,
3   plugins: ['stylelint-order'],
4   extends: ['stylelint-config-standard', 'stylelint-config-prettier'],
5   rules: {
6     'selector-pseudo-class-no-unknown': [
7       true,
8       {
9         ignorePseudoClasses: ['global'],
10       },
11     ],
12     'at-rule-no-unknown': [
13       true,
14       {
15         ignoreAtRules: ['function', 'if', 'each', 'include', 'mixin'],
16       },
17     ],
18     'no-empty-source': null,
d5d4c4 19     'named-grid-areas-no-invalid': null,
2f6253 20     'unicode-bom': 'never',
21     'no-descending-specificity': null,
22     'font-family-no-missing-generic-family-keyword': null,
23     'declaration-colon-space-after': 'always-single-line',
24     'declaration-colon-space-before': 'never',
25     'declaration-block-trailing-semicolon': 'always',
26     'rule-empty-line-before': [
27       'always',
28       {
29         ignore: ['after-comment', 'first-nested'],
30       },
31     ],
8a9ca4 32     'unit-no-unknown': [true, { ignoreUnits: ['rpx'] }],
e09068 33     'order/order': [
V 34       [
35         'dollar-variables',
36         'custom-properties',
37         'at-rules',
38         'declarations',
39         {
40           type: 'at-rule',
41           name: 'supports',
42         },
43         {
44           type: 'at-rule',
45           name: 'media',
46         },
47         'rules',
48       ],
49       { severity: 'warning' },
50     ],
07c18d 51     // Specify the alphabetical order of the attributes in the declaration block
2f6253 52     'order/properties-order': [
53       'position',
54       'top',
55       'right',
56       'bottom',
57       'left',
58       'z-index',
59       'display',
60       'float',
61       'width',
62       'height',
63       'max-width',
64       'max-height',
65       'min-width',
66       'min-height',
67       'padding',
68       'padding-top',
69       'padding-right',
70       'padding-bottom',
71       'padding-left',
72       'margin',
73       'margin-top',
74       'margin-right',
75       'margin-bottom',
76       'margin-left',
77       'margin-collapse',
78       'margin-top-collapse',
79       'margin-right-collapse',
80       'margin-bottom-collapse',
81       'margin-left-collapse',
82       'overflow',
83       'overflow-x',
84       'overflow-y',
85       'clip',
86       'clear',
87       'font',
88       'font-family',
89       'font-size',
90       'font-smoothing',
91       'osx-font-smoothing',
92       'font-style',
93       'font-weight',
94       'hyphens',
95       'src',
96       'line-height',
97       'letter-spacing',
98       'word-spacing',
99       'color',
100       'text-align',
101       'text-decoration',
102       'text-indent',
103       'text-overflow',
104       'text-rendering',
105       'text-size-adjust',
106       'text-shadow',
107       'text-transform',
108       'word-break',
109       'word-wrap',
110       'white-space',
111       'vertical-align',
112       'list-style',
113       'list-style-type',
114       'list-style-position',
115       'list-style-image',
116       'pointer-events',
117       'cursor',
118       'background',
119       'background-attachment',
120       'background-color',
121       'background-image',
122       'background-position',
123       'background-repeat',
124       'background-size',
125       'border',
126       'border-collapse',
127       'border-top',
128       'border-right',
129       'border-bottom',
130       'border-left',
131       'border-color',
132       'border-image',
133       'border-top-color',
134       'border-right-color',
135       'border-bottom-color',
136       'border-left-color',
137       'border-spacing',
138       'border-style',
139       'border-top-style',
140       'border-right-style',
141       'border-bottom-style',
142       'border-left-style',
143       'border-width',
144       'border-top-width',
145       'border-right-width',
146       'border-bottom-width',
147       'border-left-width',
148       'border-radius',
149       'border-top-right-radius',
150       'border-bottom-right-radius',
151       'border-bottom-left-radius',
152       'border-top-left-radius',
153       'border-radius-topright',
154       'border-radius-bottomright',
155       'border-radius-bottomleft',
156       'border-radius-topleft',
157       'content',
158       'quotes',
159       'outline',
160       'outline-offset',
161       'opacity',
162       'filter',
163       'visibility',
164       'size',
165       'zoom',
166       'transform',
167       'box-align',
168       'box-flex',
169       'box-orient',
170       'box-pack',
171       'box-shadow',
172       'box-sizing',
173       'table-layout',
174       'animation',
175       'animation-delay',
176       'animation-duration',
177       'animation-iteration-count',
178       'animation-name',
179       'animation-play-state',
180       'animation-timing-function',
181       'animation-fill-mode',
182       'transition',
183       'transition-delay',
184       'transition-duration',
185       'transition-property',
186       'transition-timing-function',
187       'background-clip',
188       'backface-visibility',
189       'resize',
190       'appearance',
191       'user-select',
192       'interpolation-mode',
193       'direction',
194       'marks',
195       'page',
196       'set-link-source',
197       'unicode-bidi',
198       'speak',
199     ],
200   },
8a9ca4 201   ignoreFiles: ['**/*.js', '**/*.jsx', '**/*.tsx', '**/*.ts'],
2f6253 202 };