hunshcn
2022-11-10 384f9294433afb1b28de8944e4fdd36f7782bbf2
提交 | 用户 | age
2f6253 1 module.exports = {
2   root: true,
3   plugins: ['stylelint-order'],
5db125 4   extends: ['stylelint-config-standard', 'stylelint-config-prettier'],
1dca63 5   customSyntax: 'postcss-html',
2f6253 6   rules: {
10b593 7     'function-no-unknown': null,
acea18 8     'selector-class-pattern': null,
2f6253 9     'selector-pseudo-class-no-unknown': [
10       true,
11       {
12         ignorePseudoClasses: ['global'],
13       },
14     ],
4f0c6f 15     'selector-pseudo-element-no-unknown': [
V 16       true,
17       {
18         ignorePseudoElements: ['v-deep'],
19       },
20     ],
2f6253 21     'at-rule-no-unknown': [
22       true,
23       {
893f3c 24         ignoreAtRules: [
V 25           'tailwind',
26           'apply',
27           'variants',
28           'responsive',
29           'screen',
30           'function',
31           'if',
32           'each',
33           'include',
34           'mixin',
35         ],
2f6253 36       },
37     ],
38     'no-empty-source': null,
5db125 39     'string-quotes': null,
d5d4c4 40     'named-grid-areas-no-invalid': null,
2f6253 41     'unicode-bom': 'never',
42     'no-descending-specificity': null,
43     'font-family-no-missing-generic-family-keyword': null,
44     'declaration-colon-space-after': 'always-single-line',
45     'declaration-colon-space-before': 'never',
00fca0 46     // 'declaration-block-trailing-semicolon': 'always',
2f6253 47     'rule-empty-line-before': [
48       'always',
49       {
50         ignore: ['after-comment', 'first-nested'],
51       },
52     ],
8a9ca4 53     'unit-no-unknown': [true, { ignoreUnits: ['rpx'] }],
e09068 54     'order/order': [
V 55       [
56         'dollar-variables',
57         'custom-properties',
58         'at-rules',
59         'declarations',
60         {
61           type: 'at-rule',
62           name: 'supports',
63         },
64         {
65           type: 'at-rule',
66           name: 'media',
67         },
68         'rules',
69       ],
70       { severity: 'warning' },
71     ],
2f6253 72   },
8a9ca4 73   ignoreFiles: ['**/*.js', '**/*.jsx', '**/*.tsx', '**/*.ts'],
0f4429 74   overrides: [
V 75     {
c2b207 76       files: ['*.vue', '**/*.vue', '*.html', '**/*.html'],
5db125 77       extends: ['stylelint-config-recommended'],
0f4429 78       rules: {
c2b207 79         'keyframes-name-pattern': null,
0f4429 80         'selector-pseudo-class-no-unknown': [
V 81           true,
82           {
83             ignorePseudoClasses: ['deep', 'global'],
84           },
85         ],
86         'selector-pseudo-element-no-unknown': [
87           true,
88           {
89             ignorePseudoElements: ['v-deep', 'v-global', 'v-slotted'],
90           },
91         ],
92       },
93     },
5db125 94     {
V 95       files: ['*.less', '**/*.less'],
96       customSyntax: 'postcss-less',
97       extends: ['stylelint-config-standard', 'stylelint-config-recommended-vue'],
98     },
0f4429 99   ],
2f6253 100 };