提交 5db1250a 编写于 作者: V vben

fix: stylelint config, close #1658

上级 136cbb1e
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
"**/yarn.lock": true "**/yarn.lock": true
}, },
"stylelint.enable": true, "stylelint.enable": true,
"stylelint.packageManager": "yarn", "stylelint.validate": ["css", "less", "postcss", "scss", "vue", "sass"],
"path-intellisense.mappings": { "path-intellisense.mappings": {
"/@/": "${workspaceRoot}/src" "/@/": "${workspaceRoot}/src"
}, },
...@@ -88,7 +88,8 @@ ...@@ -88,7 +88,8 @@
}, },
"[vue]": { "[vue]": {
"editor.codeActionsOnSave": { "editor.codeActionsOnSave": {
"source.fixAll.eslint": false "source.fixAll.eslint": true,
"source.fixAll.stylelint": true
} }
}, },
"i18n-ally.localesPaths": ["src/locales/lang"], "i18n-ally.localesPaths": ["src/locales/lang"],
......
...@@ -84,13 +84,11 @@ specifiers: ...@@ -84,13 +84,11 @@ specifiers:
showdown: ^2.0.3 showdown: ^2.0.3
sortablejs: ^1.14.0 sortablejs: ^1.14.0
stylelint: ^14.6.0 stylelint: ^14.6.0
stylelint-config-html: ^1.0.0
stylelint-config-prettier: ^9.0.3 stylelint-config-prettier: ^9.0.3
stylelint-config-recommended: ^7.0.0 stylelint-config-recommended: ^7.0.0
stylelint-config-recommended-vue: ^1.3.0 stylelint-config-recommended-vue: ^1.3.0
stylelint-config-standard: ^25.0.0 stylelint-config-standard: ^25.0.0
stylelint-order: ^5.0.0 stylelint-order: ^5.0.0
stylelint-processor-html: ^1.0.0
tinymce: ^5.10.3 tinymce: ^5.10.3
ts-node: ^10.7.0 ts-node: ^10.7.0
typescript: ^4.6.2 typescript: ^4.6.2
...@@ -206,13 +204,11 @@ devDependencies: ...@@ -206,13 +204,11 @@ devDependencies:
rollup: 2.70.1 rollup: 2.70.1
rollup-plugin-visualizer: 5.6.0_rollup@2.70.1 rollup-plugin-visualizer: 5.6.0_rollup@2.70.1
stylelint: 14.6.0 stylelint: 14.6.0
stylelint-config-html: 1.0.0_f552817e5b8b1b7dca381d844218922e
stylelint-config-prettier: 9.0.3_stylelint@14.6.0 stylelint-config-prettier: 9.0.3_stylelint@14.6.0
stylelint-config-recommended: 7.0.0_stylelint@14.6.0 stylelint-config-recommended: 7.0.0_stylelint@14.6.0
stylelint-config-recommended-vue: 1.3.0_f552817e5b8b1b7dca381d844218922e stylelint-config-recommended-vue: 1.3.0_f552817e5b8b1b7dca381d844218922e
stylelint-config-standard: 25.0.0_stylelint@14.6.0 stylelint-config-standard: 25.0.0_stylelint@14.6.0
stylelint-order: 5.0.0_stylelint@14.6.0 stylelint-order: 5.0.0_stylelint@14.6.0
stylelint-processor-html: 1.0.0
ts-node: 10.7.0_e79e62fe450383fd2d418267dc75e645 ts-node: 10.7.0_e79e62fe450383fd2d418267dc75e645
typescript: 4.6.2 typescript: 4.6.2
vite: 2.9.0-beta.3_less@4.1.2 vite: 2.9.0-beta.3_less@4.1.2
...@@ -9133,13 +9129,6 @@ packages: ...@@ -9133,13 +9129,6 @@ packages:
stylelint: 14.6.0 stylelint: 14.6.0
dev: true dev: true
/stylelint-processor-html/1.0.0:
resolution: {integrity: sha1-aJK2soVaRfApHNhFGR1pCBMKKRg=}
deprecated: 'Please use stylelint-processor-arbitrary-tags https://github.com/mapbox/stylelint-processor-arbitrary-tags '
dependencies:
htmlparser2: 3.10.1
dev: true
/stylelint/14.6.0: /stylelint/14.6.0:
resolution: {integrity: sha512-Xk2sqXYPi9nXgq70nBiZkbQm/QOOKd83NBTaBE1fXEWAEeRlgHnKC/E7kJFlT6K0SaNDOK5yIvR7GFPGsNLuOg==} resolution: {integrity: sha512-Xk2sqXYPi9nXgq70nBiZkbQm/QOOKd83NBTaBE1fXEWAEeRlgHnKC/E7kJFlT6K0SaNDOK5yIvR7GFPGsNLuOg==}
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
......
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
bottom: 0; bottom: 0;
display: block; display: block;
width: 2px; width: 2px;
background-color: @primary-color;
content: ''; content: '';
background-color: @primary-color;
} }
} }
...@@ -45,8 +45,8 @@ ...@@ -45,8 +45,8 @@
position: absolute; position: absolute;
top: 50%; top: 50%;
right: 18px; right: 18px;
transform: translateY(-50%) rotate(-90deg);
transition: transform @transition-time @ease-in-out; transition: transform @transition-time @ease-in-out;
transform: translateY(-50%) rotate(-90deg);
} }
} }
...@@ -128,12 +128,12 @@ ...@@ -128,12 +128,12 @@
position: relative; position: relative;
z-index: 1; z-index: 1;
display: flex; display: flex;
align-items: center;
font-size: @font-size-base; font-size: @font-size-base;
color: inherit; color: inherit;
list-style: none; list-style: none;
cursor: pointer; cursor: pointer;
outline: none; outline: none;
align-items: center;
&:hover, &:hover,
&:active { &:active {
...@@ -178,8 +178,8 @@ ...@@ -178,8 +178,8 @@
&-vertical &-submenu-collapse { &-vertical &-submenu-collapse {
.@{submenu-popup-prefix-cls} { .@{submenu-popup-prefix-cls} {
display: flex; display: flex;
justify-content: center;
align-items: center; align-items: center;
justify-content: center;
} }
.@{menu-prefix-cls}-submenu-collapsed-show-tit { .@{menu-prefix-cls}-submenu-collapsed-show-tit {
flex-direction: column; flex-direction: column;
...@@ -244,8 +244,8 @@ ...@@ -244,8 +244,8 @@
left: 0; left: 0;
width: 3px; width: 3px;
height: 100%; height: 100%;
background-color: @primary-color;
content: ''; content: '';
background-color: @primary-color;
} }
} }
} }
...@@ -276,8 +276,8 @@ ...@@ -276,8 +276,8 @@
left: 0; left: 0;
width: 3px; width: 3px;
height: 100%; height: 100%;
background-color: @primary-color;
content: ''; content: '';
background-color: @primary-color;
} }
.@{menu-prefix-cls}-submenu-collapse { .@{menu-prefix-cls}-submenu-collapse {
......
module.exports = { module.exports = {
root: true, root: true,
plugins: ['stylelint-order'], plugins: ['stylelint-order'],
processors: ['stylelint-processor-html'], extends: ['stylelint-config-standard', 'stylelint-config-prettier'],
extends: [
'stylelint-config-standard',
'stylelint-config-prettier',
'stylelint-config-recommended-vue/less',
],
rules: { rules: {
'function-no-unknown': null,
'selector-class-pattern': null, 'selector-class-pattern': null,
'selector-pseudo-class-no-unknown': [ 'selector-pseudo-class-no-unknown': [
true, true,
...@@ -40,6 +36,7 @@ module.exports = { ...@@ -40,6 +36,7 @@ module.exports = {
}, },
], ],
'no-empty-source': null, 'no-empty-source': null,
'string-quotes': null,
'named-grid-areas-no-invalid': null, 'named-grid-areas-no-invalid': null,
'unicode-bom': 'never', 'unicode-bom': 'never',
'no-descending-specificity': null, 'no-descending-specificity': null,
...@@ -77,7 +74,7 @@ module.exports = { ...@@ -77,7 +74,7 @@ module.exports = {
overrides: [ overrides: [
{ {
files: ['*.vue', '**/*.vue', '*.html', '**/*.html'], files: ['*.vue', '**/*.vue', '*.html', '**/*.html'],
extends: ['stylelint-config-recommended', 'stylelint-config-html'], extends: ['stylelint-config-recommended'],
rules: { rules: {
'keyframes-name-pattern': null, 'keyframes-name-pattern': null,
'selector-pseudo-class-no-unknown': [ 'selector-pseudo-class-no-unknown': [
...@@ -94,5 +91,10 @@ module.exports = { ...@@ -94,5 +91,10 @@ module.exports = {
], ],
}, },
}, },
{
files: ['*.less', '**/*.less'],
customSyntax: 'postcss-less',
extends: ['stylelint-config-standard', 'stylelint-config-recommended-vue'],
},
], ],
}; };
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册