Skip to content

Commit

Permalink
fix: stylelint config, close vbenjs#1658
Browse files Browse the repository at this point in the history
  • Loading branch information
anncwb committed Mar 18, 2022
1 parent 136cbb1 commit 5db1250
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 28 deletions.
5 changes: 3 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"**/yarn.lock": true
},
"stylelint.enable": true,
"stylelint.packageManager": "yarn",
"stylelint.validate": ["css", "less", "postcss", "scss", "vue", "sass"],
"path-intellisense.mappings": {
"/@/": "${workspaceRoot}/src"
},
Expand Down Expand Up @@ -88,7 +88,8 @@
},
"[vue]": {
"editor.codeActionsOnSave": {
"source.fixAll.eslint": false
"source.fixAll.eslint": true,
"source.fixAll.stylelint": true
}
},
"i18n-ally.localesPaths": ["src/locales/lang"],
Expand Down
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,11 @@
"rollup": "^2.70.1",
"rollup-plugin-visualizer": "^5.6.0",
"stylelint": "^14.6.0",
"stylelint-config-html": "^1.0.0",
"stylelint-config-prettier": "^9.0.3",
"stylelint-config-recommended": "^7.0.0",
"stylelint-config-recommended-vue": "^1.3.0",
"stylelint-config-standard": "^25.0.0",
"stylelint-order": "^5.0.0",
"stylelint-processor-html": "^1.0.0",
"ts-node": "^10.7.0",
"typescript": "^4.6.2",
"vite": "^2.9.0-beta.3",
Expand Down
11 changes: 0 additions & 11 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions src/components/SimpleMenu/src/components/menu.less
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
bottom: 0;
display: block;
width: 2px;
background-color: @primary-color;
content: '';
background-color: @primary-color;
}
}

Expand Down Expand Up @@ -45,8 +45,8 @@
position: absolute;
top: 50%;
right: 18px;
transform: translateY(-50%) rotate(-90deg);
transition: transform @transition-time @ease-in-out;
transform: translateY(-50%) rotate(-90deg);
}
}

Expand Down Expand Up @@ -128,12 +128,12 @@
position: relative;
z-index: 1;
display: flex;
align-items: center;
font-size: @font-size-base;
color: inherit;
list-style: none;
cursor: pointer;
outline: none;
align-items: center;

&:hover,
&:active {
Expand Down Expand Up @@ -178,8 +178,8 @@
&-vertical &-submenu-collapse {
.@{submenu-popup-prefix-cls} {
display: flex;
justify-content: center;
align-items: center;
justify-content: center;
}
.@{menu-prefix-cls}-submenu-collapsed-show-tit {
flex-direction: column;
Expand Down Expand Up @@ -244,8 +244,8 @@
left: 0;
width: 3px;
height: 100%;
background-color: @primary-color;
content: '';
background-color: @primary-color;
}
}
}
Expand Down Expand Up @@ -276,8 +276,8 @@
left: 0;
width: 3px;
height: 100%;
background-color: @primary-color;
content: '';
background-color: @primary-color;
}

.@{menu-prefix-cls}-submenu-collapse {
Expand Down
16 changes: 9 additions & 7 deletions stylelint.config.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
module.exports = {
root: true,
plugins: ['stylelint-order'],
processors: ['stylelint-processor-html'],
extends: [
'stylelint-config-standard',
'stylelint-config-prettier',
'stylelint-config-recommended-vue/less',
],
extends: ['stylelint-config-standard', 'stylelint-config-prettier'],

rules: {
'function-no-unknown': null,
'selector-class-pattern': null,
'selector-pseudo-class-no-unknown': [
true,
Expand Down Expand Up @@ -40,6 +36,7 @@ module.exports = {
},
],
'no-empty-source': null,
'string-quotes': null,
'named-grid-areas-no-invalid': null,
'unicode-bom': 'never',
'no-descending-specificity': null,
Expand Down Expand Up @@ -77,7 +74,7 @@ module.exports = {
overrides: [
{
files: ['*.vue', '**/*.vue', '*.html', '**/*.html'],
extends: ['stylelint-config-recommended', 'stylelint-config-html'],
extends: ['stylelint-config-recommended'],
rules: {
'keyframes-name-pattern': null,
'selector-pseudo-class-no-unknown': [
Expand All @@ -94,5 +91,10 @@ module.exports = {
],
},
},
{
files: ['*.less', '**/*.less'],
customSyntax: 'postcss-less',
extends: ['stylelint-config-standard', 'stylelint-config-recommended-vue'],
},
],
};

0 comments on commit 5db1250

Please sign in to comment.