-
Notifications
You must be signed in to change notification settings - Fork 0
/
stylelint.config.cjs
59 lines (59 loc) · 1.6 KB
/
stylelint.config.cjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
module.exports = {
root: true,
plugins: ['stylelint-scss', 'stylelint-order'],
extends: [
'stylelint-config-standard',
'stylelint-config-recess-order',
'stylelint-config-recommended-scss',
'stylelint-config-recommended-vue',
],
rules: {
'function-no-unknown': null, // 禁止未知函数:无
'selector-class-pattern': null, // class命名标准:无
'value-keyword-case': ['lower', { ignoreFunctions: ['v-bind'] }], // 大小写限制
'at-rule-no-unknown': [
true,
{
// @函数
ignoreAtRules: [
'tailwind',
'apply',
'variants',
'responsive',
'screen',
'function',
'if',
'each',
'include',
'mixin',
],
},
],
'font-family-no-missing-generic-family-keyword': null, // 允许在字体系列名称列表中缺少通用字体族
'rule-empty-line-before': [
'always',
{ ignore: ['after-comment', 'first-nested'] },
], // 要求或禁止在 at 规则之前使用空行
},
ignoreFiles: ['**/*.js', '**/*.jsx', '**/*.tsx', '**/*.ts'],
overrides: [
{
files: ['**/*.(less|css|vue|html)'],
customSyntax: 'postcss-scss',
rules: {
'selector-pseudo-class-no-unknown': [
true,
{ ignorePseudoClasses: ['deep', 'global'] },
],
'selector-pseudo-element-no-unknown': [
true,
{ ignorePseudoElements: ['v-deep', 'v-global', 'v-slotted'] },
],
},
},
{
files: ['**/*.(html|vue)'],
customSyntax: 'postcss-html',
},
],
};