Files
claude-relay-service/web/admin-spa/.eslintrc.cjs
Wangnov 22e27738aa feat: 更新 ESLint 和 Vite 配置以优化开发体验
- 在 .eslintrc.cjs 中允许在所有环境中使用 console 语句,避免构建警告
- 在 vite.config.js 中提升 chunk 大小限制以消除 UI 库的警告,并明确本地组件的导入设置
2025-09-12 00:04:11 +08:00

46 lines
1013 B
JavaScript

module.exports = {
root: true,
env: {
node: true,
browser: true,
es2021: true
},
extends: [
'plugin:vue/vue3-strongly-recommended',
'eslint:recommended',
'plugin:prettier/recommended'
],
parserOptions: {
sourceType: 'module',
ecmaVersion: 'latest'
},
plugins: ['prettier'],
rules: {
'vue/multi-word-component-names': 'off',
'vue/no-v-html': 'off',
// 允许在所有环境中使用 console 语句以避免构建警告
'no-console': 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'prettier/prettier': 'error',
'vue/attributes-order': [
'error',
{
order: [
'DEFINITION',
'LIST_RENDERING',
'CONDITIONALS',
'RENDER_MODIFIERS',
'GLOBAL',
'UNIQUE',
'TWO_WAY_BINDING',
'OTHER_DIRECTIVES',
'OTHER_ATTR',
'EVENTS',
'CONTENT'
],
alphabetical: true
}
]
}
}