-
Notifications
You must be signed in to change notification settings - Fork 68
/
Copy pathstylelint.config.js
71 lines (71 loc) · 1.67 KB
/
stylelint.config.js
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
60
61
62
63
64
65
66
67
68
69
70
71
export default {
extends: ['stylelint-config-standard', 'stylelint-config-standard-vue', 'stylelint-config-recess-order'],
plugins: ['stylelint-order'],
overrides: [
{
files: ['**/*.(scss|css|vue|html)'],
customSyntax: 'postcss-scss',
},
{
files: ['**/*.(html|vue)'],
customSyntax: 'postcss-html',
},
],
ignoreFiles: [
'**/*.js',
'**/*.jsx',
'**/*.tsx',
'**/*.ts',
'**/*.json',
'**/*.md',
'**/*.yaml',
'dist/*',
'uni_modules/*',
],
rules: {
// 禁止空代码
'no-empty-source': null,
// 禁止在覆盖高特异性选择器之后出现低特异性选择器
'no-descending-specificity': null,
// 不允许未知单位
'unit-no-unknown': [true, { ignoreUnits: ['rpx'] }],
// 禁止空注释
'comment-no-empty': true,
// @import 规则必须始终使用字符串表示法。
'import-notation': 'string',
// 未知的 @ 规则
'at-rule-no-unknown': [
true,
{
ignoreAtRules: [
'plugin',
'apply',
'screen',
'function',
'if',
'each',
'include',
'mixin',
'extend',
'content',
'use',
],
},
],
'selector-pseudo-element-no-unknown': [
true,
{
ignorePseudoElements: ['v-deep'],
},
],
'selector-pseudo-class-no-unknown': [
true,
{
ignorePseudoClasses: ['deep'],
},
],
'selector-type-no-unknown': [true, { ignoreTypes: ['page', 'radio', 'checkbox', 'scroll-view'] }],
'at-rule-no-deprecated': null,
'declaration-property-value-no-unknown': null,
},
};