forked from lengyibai/wzry
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.stylelintrc.cjs
156 lines (156 loc) · 4.05 KB
/
.stylelintrc.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
module.exports = {
extends: [
"stylelint-config-standard",
"stylelint-config-recommended-less",
"stylelint-config-standard-vue",
],
plugins: ["stylelint-order"],
overrides: [
{
files: ["**/*.(less|css|vue|html)"],
customSyntax: "postcss-less",
},
{
files: ["**/*.(html|vue)"],
customSyntax: "postcss-html",
},
],
rules: {
"media-feature-range-notation": null, //禁用将媒体查询max-width转换为width<=的形式
"no-extra-semicolons": null, //检测代码中多余的分号
"media-query-no-invalid": null, //允许无效的媒体查询
"no-eol-whitespace": null, //允许行尾空白
"selector-class-pattern": null, //必须中划线命名
"property-no-vendor-prefix": null, // 禁止使用浏览器前缀
"custom-property-empty-line-before": null, //禁止内联css变量
"no-descending-specificity": null, //禁止在具有较高优先级的选择器后出现被其覆盖的较低优先级的选择器
"font-family-no-missing-generic-family-keyword": null, //字体名称问题
"declaration-block-no-redundant-longhand-properties": null, //使用合并一些属性
//选择器伪元素未知时进行检查
"selector-pseudo-element-no-unknown": [
true,
{
/** 忽略的伪元素列表中添加了 "v-deep" */
ignorePseudoElements: ["v-deep"],
},
],
/** 选择器伪类未知时进行检查 */
"selector-pseudo-class-no-unknown": [
true,
{
/** 忽略的伪类列表中添加了 "deep" */
ignorePseudoClasses: ["deep"],
},
],
/** 指定样式的排序 */
"order/properties-order": [
/* 表示定位/布局的属性 */
"position",
"top",
"left",
"right",
"bottom",
"z-index",
"display",
"justify-content",
"align-items",
"flex",
"flex-flow",
"flex-basis",
"flex-direction",
"flex-grow",
"flex-shrink",
"flex-wrap",
"visibility",
"overflow",
"overflow-x",
"overflow-y",
/* 表示盒子模型的属性 */
"width",
"min-width",
"max-width",
"height",
"min-height",
"max-height",
"margin",
"margin-top",
"margin-left",
"margin-right",
"margin-bottom",
"padding",
"padding-top",
"padding-left",
"padding-right",
"padding-bottom",
"border",
"border-style",
"border-width",
"border-color",
"border-top-style",
"border-top-width",
"border-top-color",
"border-left-style",
"border-left-width",
"border-left-color",
"border-right-style",
"border-right-width",
"border-right-color",
"border-bottom-style",
"border-bottom-width",
"border-bottom-color",
"border-radius",
"box-shadow",
"outline",
"resize",
/* 字体相关的属性 */
"color",
"font-size",
"font-family",
"font-weight",
"text-align",
"text-justify",
"text-indent",
"text-overflow",
"text-decoration",
"text-shadow",
"line-height",
"list-style",
"white-space",
"white-space",
"word-spacing",
"word-wrap",
"word-break",
/* 背景 */
"background",
"background-color",
"background-image",
"background-attachment",
"background-position",
"background-position-x",
"background-position-y",
"background-clip",
"background-origin",
"background-size",
"background-repeat",
/* CSS3 */
"transition",
"transition-delay",
"transition-timing-function",
"transition-duration",
"transition-property",
"transform",
"transform-origin",
"animation",
"animation-name",
"animation-duration",
"animation-play-state",
"animation-timing-function",
"animation-delay",
"animation-iteration-count",
"animation-direction",
"opacity",
"filter",
"pointer-events",
],
},
};