Commit 5db1250a8d6b97a1683a4eea83dd982ef8f3f0f5
1 parent
136cbb1e
fix: stylelint config, close #1658
Showing
5 changed files
with
18 additions
and
28 deletions
.vscode/settings.json
... | ... | @@ -55,7 +55,7 @@ |
55 | 55 | "**/yarn.lock": true |
56 | 56 | }, |
57 | 57 | "stylelint.enable": true, |
58 | - "stylelint.packageManager": "yarn", | |
58 | + "stylelint.validate": ["css", "less", "postcss", "scss", "vue", "sass"], | |
59 | 59 | "path-intellisense.mappings": { |
60 | 60 | "/@/": "${workspaceRoot}/src" |
61 | 61 | }, |
... | ... | @@ -88,7 +88,8 @@ |
88 | 88 | }, |
89 | 89 | "[vue]": { |
90 | 90 | "editor.codeActionsOnSave": { |
91 | - "source.fixAll.eslint": false | |
91 | + "source.fixAll.eslint": true, | |
92 | + "source.fixAll.stylelint": true | |
92 | 93 | } |
93 | 94 | }, |
94 | 95 | "i18n-ally.localesPaths": ["src/locales/lang"], | ... | ... |
package.json
... | ... | @@ -120,13 +120,11 @@ |
120 | 120 | "rollup": "^2.70.1", |
121 | 121 | "rollup-plugin-visualizer": "^5.6.0", |
122 | 122 | "stylelint": "^14.6.0", |
123 | - "stylelint-config-html": "^1.0.0", | |
124 | 123 | "stylelint-config-prettier": "^9.0.3", |
125 | 124 | "stylelint-config-recommended": "^7.0.0", |
126 | 125 | "stylelint-config-recommended-vue": "^1.3.0", |
127 | 126 | "stylelint-config-standard": "^25.0.0", |
128 | 127 | "stylelint-order": "^5.0.0", |
129 | - "stylelint-processor-html": "^1.0.0", | |
130 | 128 | "ts-node": "^10.7.0", |
131 | 129 | "typescript": "^4.6.2", |
132 | 130 | "vite": "^2.9.0-beta.3", | ... | ... |
pnpm-lock.yaml
... | ... | @@ -84,13 +84,11 @@ specifiers: |
84 | 84 | showdown: ^2.0.3 |
85 | 85 | sortablejs: ^1.14.0 |
86 | 86 | stylelint: ^14.6.0 |
87 | - stylelint-config-html: ^1.0.0 | |
88 | 87 | stylelint-config-prettier: ^9.0.3 |
89 | 88 | stylelint-config-recommended: ^7.0.0 |
90 | 89 | stylelint-config-recommended-vue: ^1.3.0 |
91 | 90 | stylelint-config-standard: ^25.0.0 |
92 | 91 | stylelint-order: ^5.0.0 |
93 | - stylelint-processor-html: ^1.0.0 | |
94 | 92 | tinymce: ^5.10.3 |
95 | 93 | ts-node: ^10.7.0 |
96 | 94 | typescript: ^4.6.2 |
... | ... | @@ -206,13 +204,11 @@ devDependencies: |
206 | 204 | rollup: 2.70.1 |
207 | 205 | rollup-plugin-visualizer: 5.6.0_rollup@2.70.1 |
208 | 206 | stylelint: 14.6.0 |
209 | - stylelint-config-html: 1.0.0_f552817e5b8b1b7dca381d844218922e | |
210 | 207 | stylelint-config-prettier: 9.0.3_stylelint@14.6.0 |
211 | 208 | stylelint-config-recommended: 7.0.0_stylelint@14.6.0 |
212 | 209 | stylelint-config-recommended-vue: 1.3.0_f552817e5b8b1b7dca381d844218922e |
213 | 210 | stylelint-config-standard: 25.0.0_stylelint@14.6.0 |
214 | 211 | stylelint-order: 5.0.0_stylelint@14.6.0 |
215 | - stylelint-processor-html: 1.0.0 | |
216 | 212 | ts-node: 10.7.0_e79e62fe450383fd2d418267dc75e645 |
217 | 213 | typescript: 4.6.2 |
218 | 214 | vite: 2.9.0-beta.3_less@4.1.2 |
... | ... | @@ -9133,13 +9129,6 @@ packages: |
9133 | 9129 | stylelint: 14.6.0 |
9134 | 9130 | dev: true |
9135 | 9131 | |
9136 | - /stylelint-processor-html/1.0.0: | |
9137 | - resolution: {integrity: sha1-aJK2soVaRfApHNhFGR1pCBMKKRg=} | |
9138 | - deprecated: 'Please use stylelint-processor-arbitrary-tags https://github.com/mapbox/stylelint-processor-arbitrary-tags ' | |
9139 | - dependencies: | |
9140 | - htmlparser2: 3.10.1 | |
9141 | - dev: true | |
9142 | - | |
9143 | 9132 | /stylelint/14.6.0: |
9144 | 9133 | resolution: {integrity: sha512-Xk2sqXYPi9nXgq70nBiZkbQm/QOOKd83NBTaBE1fXEWAEeRlgHnKC/E7kJFlT6K0SaNDOK5yIvR7GFPGsNLuOg==} |
9145 | 9134 | engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} | ... | ... |
src/components/SimpleMenu/src/components/menu.less
... | ... | @@ -13,8 +13,8 @@ |
13 | 13 | bottom: 0; |
14 | 14 | display: block; |
15 | 15 | width: 2px; |
16 | - background-color: @primary-color; | |
17 | 16 | content: ''; |
17 | + background-color: @primary-color; | |
18 | 18 | } |
19 | 19 | } |
20 | 20 | |
... | ... | @@ -45,8 +45,8 @@ |
45 | 45 | position: absolute; |
46 | 46 | top: 50%; |
47 | 47 | right: 18px; |
48 | - transform: translateY(-50%) rotate(-90deg); | |
49 | 48 | transition: transform @transition-time @ease-in-out; |
49 | + transform: translateY(-50%) rotate(-90deg); | |
50 | 50 | } |
51 | 51 | } |
52 | 52 | |
... | ... | @@ -128,12 +128,12 @@ |
128 | 128 | position: relative; |
129 | 129 | z-index: 1; |
130 | 130 | display: flex; |
131 | + align-items: center; | |
131 | 132 | font-size: @font-size-base; |
132 | 133 | color: inherit; |
133 | 134 | list-style: none; |
134 | 135 | cursor: pointer; |
135 | 136 | outline: none; |
136 | - align-items: center; | |
137 | 137 | |
138 | 138 | &:hover, |
139 | 139 | &:active { |
... | ... | @@ -178,8 +178,8 @@ |
178 | 178 | &-vertical &-submenu-collapse { |
179 | 179 | .@{submenu-popup-prefix-cls} { |
180 | 180 | display: flex; |
181 | - justify-content: center; | |
182 | 181 | align-items: center; |
182 | + justify-content: center; | |
183 | 183 | } |
184 | 184 | .@{menu-prefix-cls}-submenu-collapsed-show-tit { |
185 | 185 | flex-direction: column; |
... | ... | @@ -244,8 +244,8 @@ |
244 | 244 | left: 0; |
245 | 245 | width: 3px; |
246 | 246 | height: 100%; |
247 | - background-color: @primary-color; | |
248 | 247 | content: ''; |
248 | + background-color: @primary-color; | |
249 | 249 | } |
250 | 250 | } |
251 | 251 | } |
... | ... | @@ -276,8 +276,8 @@ |
276 | 276 | left: 0; |
277 | 277 | width: 3px; |
278 | 278 | height: 100%; |
279 | - background-color: @primary-color; | |
280 | 279 | content: ''; |
280 | + background-color: @primary-color; | |
281 | 281 | } |
282 | 282 | |
283 | 283 | .@{menu-prefix-cls}-submenu-collapse { | ... | ... |
stylelint.config.js
1 | 1 | module.exports = { |
2 | 2 | root: true, |
3 | 3 | plugins: ['stylelint-order'], |
4 | - processors: ['stylelint-processor-html'], | |
5 | - extends: [ | |
6 | - 'stylelint-config-standard', | |
7 | - 'stylelint-config-prettier', | |
8 | - 'stylelint-config-recommended-vue/less', | |
9 | - ], | |
4 | + extends: ['stylelint-config-standard', 'stylelint-config-prettier'], | |
10 | 5 | |
11 | 6 | rules: { |
7 | + 'function-no-unknown': null, | |
12 | 8 | 'selector-class-pattern': null, |
13 | 9 | 'selector-pseudo-class-no-unknown': [ |
14 | 10 | true, |
... | ... | @@ -40,6 +36,7 @@ module.exports = { |
40 | 36 | }, |
41 | 37 | ], |
42 | 38 | 'no-empty-source': null, |
39 | + 'string-quotes': null, | |
43 | 40 | 'named-grid-areas-no-invalid': null, |
44 | 41 | 'unicode-bom': 'never', |
45 | 42 | 'no-descending-specificity': null, |
... | ... | @@ -77,7 +74,7 @@ module.exports = { |
77 | 74 | overrides: [ |
78 | 75 | { |
79 | 76 | files: ['*.vue', '**/*.vue', '*.html', '**/*.html'], |
80 | - extends: ['stylelint-config-recommended', 'stylelint-config-html'], | |
77 | + extends: ['stylelint-config-recommended'], | |
81 | 78 | rules: { |
82 | 79 | 'keyframes-name-pattern': null, |
83 | 80 | 'selector-pseudo-class-no-unknown': [ |
... | ... | @@ -94,5 +91,10 @@ module.exports = { |
94 | 91 | ], |
95 | 92 | }, |
96 | 93 | }, |
94 | + { | |
95 | + files: ['*.less', '**/*.less'], | |
96 | + customSyntax: 'postcss-less', | |
97 | + extends: ['stylelint-config-standard', 'stylelint-config-recommended-vue'], | |
98 | + }, | |
97 | 99 | ], |
98 | 100 | }; | ... | ... |