- 新增统一项目列表Redis键和迁移工具 - 实现GET /api/projects端点获取项目列表 - 实现POST /api/projects/migrate端点支持数据迁移 - 更新前端ProjectSelector组件使用真实项目数据 - 扩展projectStore状态管理 - 更新相关文档和OpenSpec规范 - 添加测试用例验证新功能
48 lines
1.2 KiB
JavaScript
48 lines
1.2 KiB
JavaScript
/** @type {import('eslint').Linter.Config} */
|
|
module.exports = {
|
|
ignorePatterns: ['dist/**'],
|
|
env: {
|
|
browser: true,
|
|
es2021: true,
|
|
node: true,
|
|
},
|
|
extends: ['eslint:recommended', 'plugin:vue/vue3-recommended'],
|
|
parserOptions: {
|
|
ecmaVersion: 'latest',
|
|
sourceType: 'module',
|
|
},
|
|
plugins: ['vue'],
|
|
rules: {
|
|
'vue/multi-word-component-names': 'off',
|
|
'vue/no-unused-vars': 'warn',
|
|
'vue/no-unused-components': 'warn',
|
|
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'warn',
|
|
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'warn',
|
|
indent: ['error', 2],
|
|
quotes: ['error', 'single'],
|
|
semi: ['error', 'always'],
|
|
'no-trailing-spaces': 'error',
|
|
'comma-dangle': ['error', 'always-multiline'],
|
|
'object-curly-spacing': ['error', 'always'],
|
|
'array-bracket-spacing': ['error', 'always'],
|
|
},
|
|
overrides: [
|
|
{
|
|
files: ['*.vue'],
|
|
rules: {
|
|
indent: 'off',
|
|
},
|
|
},
|
|
{
|
|
files: [
|
|
'src/backend/**/*.test.js',
|
|
'src/backend/**/*.spec.js',
|
|
],
|
|
rules: {
|
|
// 测试文件不应被 Vue 组件规则影响
|
|
'vue/one-component-per-file': 'off',
|
|
},
|
|
},
|
|
],
|
|
};
|