Skip to content

Commit a5c7c88

Browse files
committed
chore: stylelint
1 parent c05fbd7 commit a5c7c88

File tree

2 files changed

+22
-167
lines changed

2 files changed

+22
-167
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@
107107
"rollup": "^3.25.1",
108108
"sass": "^1.63.5",
109109
"stylelint": "^15.8.0",
110-
"stylelint-config-html": "^1.1.0",
111110
"stylelint-config-recommended": "^12.0.0",
111+
"stylelint-config-recommended-vue": "^1.4.0",
112112
"stylelint-config-standard": "^33.0.0",
113113
"stylelint-order": "^6.0.3",
114114
"terser": "^5.18.1",

stylelint.config.js

Lines changed: 21 additions & 166 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,42 @@
11
module.exports = {
22
root: true,
33
plugins: ['stylelint-order'],
4-
customSyntax: 'postcss-html',
54
extends: ['stylelint-config-standard'],
5+
customSyntax: 'postcss-html',
66
rules: {
7+
'function-no-unknown': null,
8+
'selector-class-pattern': null,
79
'selector-pseudo-class-no-unknown': [
810
true,
911
{
10-
ignorePseudoClasses: ['global', 'deep']
12+
ignorePseudoClasses: ['global']
13+
}
14+
],
15+
'selector-pseudo-element-no-unknown': [
16+
true,
17+
{
18+
ignorePseudoElements: ['v-deep']
1119
}
1220
],
1321
'at-rule-no-unknown': [
1422
true,
1523
{
16-
ignoreAtRules: ['function', 'if', 'each', 'include', 'mixin']
24+
ignoreAtRules: ['tailwind', 'apply', 'variants', 'responsive', 'screen', 'function', 'if', 'each', 'include', 'mixin']
1725
}
1826
],
1927
'no-empty-source': null,
28+
'import-notation': null,
2029
'named-grid-areas-no-invalid': null,
21-
'unicode-bom': 'never',
2230
'no-descending-specificity': null,
2331
'font-family-no-missing-generic-family-keyword': null,
24-
'declaration-colon-space-after': 'always-single-line',
25-
'declaration-colon-space-before': 'never',
26-
'declaration-block-trailing-semicolon': null,
32+
// 'declaration-block-trailing-semicolon': 'always',
2733
'rule-empty-line-before': [
2834
'always',
2935
{
3036
ignore: ['after-comment', 'first-nested']
3137
}
3238
],
33-
'unit-no-unknown': [
34-
true,
35-
{
36-
ignoreUnits: ['rpx']
37-
}
38-
],
39+
'unit-no-unknown': [true, { ignoreUnits: ['rpx'] }],
3940
'order/order': [
4041
[
4142
'dollar-variables',
@@ -52,165 +53,14 @@ module.exports = {
5253
},
5354
'rules'
5455
],
55-
{
56-
severity: 'warning'
57-
}
58-
],
59-
// Specify the alphabetical order of the attributes in the declaration block
60-
'order/properties-order': [
61-
'position',
62-
'top',
63-
'right',
64-
'bottom',
65-
'left',
66-
'z-index',
67-
'display',
68-
'float',
69-
'width',
70-
'height',
71-
'max-width',
72-
'max-height',
73-
'min-width',
74-
'min-height',
75-
'padding',
76-
'padding-top',
77-
'padding-right',
78-
'padding-bottom',
79-
'padding-left',
80-
'margin',
81-
'margin-top',
82-
'margin-right',
83-
'margin-bottom',
84-
'margin-left',
85-
'margin-collapse',
86-
'margin-top-collapse',
87-
'margin-right-collapse',
88-
'margin-bottom-collapse',
89-
'margin-left-collapse',
90-
'overflow',
91-
'overflow-x',
92-
'overflow-y',
93-
'clip',
94-
'clear',
95-
'font',
96-
'font-family',
97-
'font-size',
98-
'font-smoothing',
99-
'osx-font-smoothing',
100-
'font-style',
101-
'font-weight',
102-
'hyphens',
103-
'src',
104-
'line-height',
105-
'letter-spacing',
106-
'word-spacing',
107-
'color',
108-
'text-align',
109-
'text-decoration',
110-
'text-indent',
111-
'text-overflow',
112-
'text-rendering',
113-
'text-size-adjust',
114-
'text-shadow',
115-
'text-transform',
116-
'word-break',
117-
'word-wrap',
118-
'white-space',
119-
'vertical-align',
120-
'list-style',
121-
'list-style-type',
122-
'list-style-position',
123-
'list-style-image',
124-
'pointer-events',
125-
'cursor',
126-
'background',
127-
'background-attachment',
128-
'background-color',
129-
'background-image',
130-
'background-position',
131-
'background-repeat',
132-
'background-size',
133-
'border',
134-
'border-collapse',
135-
'border-top',
136-
'border-right',
137-
'border-bottom',
138-
'border-left',
139-
'border-color',
140-
'border-image',
141-
'border-top-color',
142-
'border-right-color',
143-
'border-bottom-color',
144-
'border-left-color',
145-
'border-spacing',
146-
'border-style',
147-
'border-top-style',
148-
'border-right-style',
149-
'border-bottom-style',
150-
'border-left-style',
151-
'border-width',
152-
'border-top-width',
153-
'border-right-width',
154-
'border-bottom-width',
155-
'border-left-width',
156-
'border-radius',
157-
'border-top-right-radius',
158-
'border-bottom-right-radius',
159-
'border-bottom-left-radius',
160-
'border-top-left-radius',
161-
'border-radius-topright',
162-
'border-radius-bottomright',
163-
'border-radius-bottomleft',
164-
'border-radius-topleft',
165-
'content',
166-
'quotes',
167-
'outline',
168-
'outline-offset',
169-
'opacity',
170-
'filter',
171-
'visibility',
172-
'size',
173-
'zoom',
174-
'transform',
175-
'box-align',
176-
'box-flex',
177-
'box-orient',
178-
'box-pack',
179-
'box-shadow',
180-
'box-sizing',
181-
'table-layout',
182-
'animation',
183-
'animation-delay',
184-
'animation-duration',
185-
'animation-iteration-count',
186-
'animation-name',
187-
'animation-play-state',
188-
'animation-timing-function',
189-
'animation-fill-mode',
190-
'transition',
191-
'transition-delay',
192-
'transition-duration',
193-
'transition-property',
194-
'transition-timing-function',
195-
'background-clip',
196-
'backface-visibility',
197-
'resize',
198-
'appearance',
199-
'user-select',
200-
'interpolation-mode',
201-
'direction',
202-
'marks',
203-
'page',
204-
'set-link-source',
205-
'unicode-bidi',
206-
'speak'
56+
{ severity: 'warning' }
20757
]
20858
},
20959
ignoreFiles: ['**/*.js', '**/*.jsx', '**/*.tsx', '**/*.ts'],
21060
overrides: [
21161
{
21262
files: ['*.vue', '**/*.vue', '*.html', '**/*.html'],
213-
extends: ['stylelint-config-recommended', 'stylelint-config-html'],
63+
extends: ['stylelint-config-recommended'],
21464
rules: {
21565
'keyframes-name-pattern': null,
21666
'selector-pseudo-class-no-unknown': [
@@ -226,6 +76,11 @@ module.exports = {
22676
}
22777
]
22878
}
79+
},
80+
{
81+
files: ['*.less', '**/*.less'],
82+
customSyntax: 'postcss-less',
83+
extends: ['stylelint-config-standard', 'stylelint-config-recommended-vue']
22984
}
23085
]
23186
}

0 commit comments

Comments
 (0)