mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-11-09 13:53:38 +08:00
perf: 更新stylelint以及相关配置至最新,强化样式校验
This commit is contained in:
@@ -1,20 +1,40 @@
|
||||
module.exports = {
|
||||
root: true,
|
||||
plugins: ["stylelint-order"],
|
||||
customSyntax: "postcss-html",
|
||||
extends: ["stylelint-config-standard", "stylelint-config-prettier"],
|
||||
extends: [
|
||||
"stylelint-config-standard",
|
||||
"stylelint-config-html/vue",
|
||||
"stylelint-config-recess-order"
|
||||
],
|
||||
plugins: ["stylelint-order", "stylelint-prettier", "stylelint-scss"],
|
||||
overrides: [
|
||||
{
|
||||
files: ["**/*.(css|html|vue)"],
|
||||
customSyntax: "postcss-html"
|
||||
},
|
||||
{
|
||||
files: ["*.scss", "**/*.scss"],
|
||||
customSyntax: "postcss-scss",
|
||||
extends: [
|
||||
"stylelint-config-standard-scss",
|
||||
"stylelint-config-recommended-vue/scss"
|
||||
]
|
||||
}
|
||||
],
|
||||
rules: {
|
||||
"selector-class-pattern": null,
|
||||
"keyframes-name-pattern": null,
|
||||
"no-descending-specificity": null,
|
||||
"scss/dollar-variable-pattern": null,
|
||||
"selector-pseudo-class-no-unknown": [
|
||||
true,
|
||||
{
|
||||
ignorePseudoClasses: ["global"]
|
||||
ignorePseudoClasses: ["deep", "global"]
|
||||
}
|
||||
],
|
||||
"selector-pseudo-element-no-unknown": [
|
||||
true,
|
||||
{
|
||||
ignorePseudoElements: ["v-deep"]
|
||||
ignorePseudoElements: ["v-deep", "v-global", "v-slotted"]
|
||||
}
|
||||
],
|
||||
"at-rule-no-unknown": [
|
||||
@@ -30,17 +50,11 @@ module.exports = {
|
||||
"if",
|
||||
"each",
|
||||
"include",
|
||||
"mixin"
|
||||
"mixin",
|
||||
"use"
|
||||
]
|
||||
}
|
||||
],
|
||||
"no-empty-source": null,
|
||||
"named-grid-areas-no-invalid": null,
|
||||
"unicode-bom": "never",
|
||||
"no-descending-specificity": null,
|
||||
"font-family-no-missing-generic-family-keyword": null,
|
||||
"declaration-colon-space-after": "always-single-line",
|
||||
"declaration-colon-space-before": "never",
|
||||
"rule-empty-line-before": [
|
||||
"always",
|
||||
{
|
||||
@@ -67,26 +81,5 @@ module.exports = {
|
||||
{ severity: "warning" }
|
||||
]
|
||||
},
|
||||
ignoreFiles: ["**/*.js", "**/*.jsx", "**/*.tsx", "**/*.ts", "**/*.json"],
|
||||
overrides: [
|
||||
{
|
||||
files: ["*.vue", "**/*.vue", "*.html", "**/*.html"],
|
||||
extends: ["stylelint-config-recommended", "stylelint-config-html"],
|
||||
rules: {
|
||||
"keyframes-name-pattern": null,
|
||||
"selector-pseudo-class-no-unknown": [
|
||||
true,
|
||||
{
|
||||
ignorePseudoClasses: ["deep", "global"]
|
||||
}
|
||||
],
|
||||
"selector-pseudo-element-no-unknown": [
|
||||
true,
|
||||
{
|
||||
ignorePseudoElements: ["v-deep", "v-global", "v-slotted"]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
ignoreFiles: ["**/*.js", "**/*.ts", "**/*.jsx", "**/*.tsx"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user