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