Template
1
0
mirror of https://github.com/un-pany/v3-admin-vite.git synced 2025-04-22 20:09:19 +08:00
v3-admin-vite/eslint.config.js

43 lines
1.1 KiB
JavaScript
Raw Normal View History

2024-11-18 19:40:44 +08:00
import antfu from "@antfu/eslint-config"
2024-11-18 14:25:35 +08:00
2024-11-18 19:40:44 +08:00
// 更多自定义配置可查阅仓库https://github.com/antfu/eslint-config
export default antfu(
{
// 使用外部格式化程序格式化 css、html、markdown 等文件
formatters: true,
// 启用样式规则
stylistic: {
// 缩进级别
indent: 2,
// 引号风格 'single' | 'double'
quotes: "double",
// 是否启用分号
semi: false
},
// 忽略文件
ignores: []
},
{
// 对所有文件都生效的规则
rules: {
// vue
"vue/block-order": ["error", { order: ["script", "template", "style"] }],
2024-11-19 13:46:35 +08:00
"vue/attributes-order": "off",
2024-11-18 19:40:44 +08:00
// ts
"ts/no-use-before-define": "off",
// node
"node/prefer-global/process": "off",
// style
"style/comma-dangle": ["error", "never"],
2024-11-19 10:42:02 +08:00
"style/brace-style": ["error", "1tbs"],
2024-11-18 19:40:44 +08:00
// regexp
"regexp/no-unused-capturing-group": "off",
// other
"no-console": "off",
"no-debugger": "off",
"symbol-description": "off",
"antfu/if-newline": "off"
}
}
)