代码格式修改

This commit is contained in:
2025-10-18 17:13:04 +08:00
parent b9224ed8bb
commit 81017eb280
837 changed files with 102784 additions and 98409 deletions

38
.eslintrc.js Normal file
View File

@@ -0,0 +1,38 @@
module.exports = {
root: true,
env: {
browser: true,
node: true,
es6: true
},
parserOptions: {
parser: 'babel-eslint',
sourceType: 'module'
},
extends: [
'eslint:recommended',
'plugin:vue/recommended'
],
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'semi': ['error', 'never'],
'quotes': ['error', 'single'],
'indent': ['error', 2, { 'SwitchCase': 1 }],
'vue/html-indent': ['error', 2],
'vue/singleline-html-element-content-newline': 'off',
'vue/multiline-html-element-content-newline': 'off',
'vue/max-attributes-per-line': 'off',
// 将常见的未使用项降级为警告,避免阻碍格式化流程
'no-unused-vars': 'warn',
'vue/no-unused-components': 'warn'
},
overrides: [
{
files: ['*.vue'],
rules: {
'indent': 'off'
}
}
]
}