Commit f92adfae by Jaxon

feat: 更新 ESLint 和 Stylelint 配置,除vue文件<template> 中使用空格以外,其他使用 tab 缩进

1 parent e3c9c2d3
...@@ -80,6 +80,9 @@ ...@@ -80,6 +80,9 @@
"[json]": { "[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode" "editor.defaultFormatter": "esbenp.prettier-vscode"
}, },
"[yaml]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
// extensions // extensions
"extensions.ignoreRecommendations": true, "extensions.ignoreRecommendations": true,
...@@ -252,8 +255,4 @@ ...@@ -252,8 +255,4 @@
"typescript.tsdk": "node_modules/typescript/lib", "typescript.tsdk": "node_modules/typescript/lib",
"oxc.enable": false, "oxc.enable": false,
"cSpell.words": ["archiver", "axios", "dotenv", "isequal", "jspm", "napi", "nolebase", "rollup", "vitest"], "cSpell.words": ["archiver", "axios", "dotenv", "isequal", "jspm", "napi", "nolebase", "rollup", "vitest"],
"[yaml]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
} }
...@@ -159,9 +159,9 @@ export async function vue(): Promise<Linter.Config[]> { ...@@ -159,9 +159,9 @@ export async function vue(): Promise<Linter.Config[]> {
// 控制 Vue 模板中 HTML 标签的缩进 // 控制 Vue 模板中 HTML 标签的缩进
"vue/html-indent": [ "vue/html-indent": [
"error", "error",
4, // 缩进空格数 4, // 使用 tab 缩进
{ {
attribute: 1, // 属性换行后缩进 1 级(与标签名对齐) attribute: 1,
baseIndent: 1, // 标签基础缩进 baseIndent: 1, // 标签基础缩进
closeBracket: 0, // 闭合标签与开始标签对齐 closeBracket: 0, // 闭合标签与开始标签对齐
alignAttributesVertically: true, // 多属性时垂直对齐 alignAttributesVertically: true, // 多属性时垂直对齐
......
...@@ -64,6 +64,9 @@ export default { ...@@ -64,6 +64,9 @@ export default {
// 规则配置 // 规则配置
rules: { rules: {
// 缩进规则(使用 tab 缩进,宽度为 1)
"@stylistic/indentation": [ "tab", { baseIndentLevel: 0 } ],
// 禁用已弃用的 @-rules 警告 // 禁用已弃用的 @-rules 警告
"at-rule-no-deprecated": null, "at-rule-no-deprecated": null,
// 允许未知的 @-rules(SCSS 和 Tailwind 专用规则) // 允许未知的 @-rules(SCSS 和 Tailwind 专用规则)
......
...@@ -13,6 +13,10 @@ ...@@ -13,6 +13,10 @@
"path": "apps/web/venus-micro-app", "path": "apps/web/venus-micro-app",
}, },
{ {
"name": "dj-car-life-system",
"path": "apps/web/vue2/dj-car-life-system",
},
{
"name": "@venus/docs", "name": "@venus/docs",
"path": "docs", "path": "docs",
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!