perf: 性能优化与代码质量改进
- 添加4个数据库索引提升查询性能 - 启用ESLint并配置React支持 - 修复ESLint错误(未使用的导入和状态) - 简化Toast组件UI样式 - 移除重复文件(server.js.backup) - 清理.gitignore中的.next目录 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
1e478c2eaa
commit
3975bbed73
+24
-1
@@ -4,16 +4,39 @@ module.exports = {
|
||||
node: true,
|
||||
es2021: true,
|
||||
jest: true,
|
||||
browser: true,
|
||||
},
|
||||
extends: ['eslint:recommended'],
|
||||
extends: [
|
||||
'eslint:recommended',
|
||||
'plugin:react/recommended',
|
||||
'plugin:react-hooks/recommended',
|
||||
],
|
||||
parserOptions: {
|
||||
ecmaVersion: 'latest',
|
||||
sourceType: 'module',
|
||||
ecmaFeatures: {
|
||||
jsx: true,
|
||||
},
|
||||
},
|
||||
settings: {
|
||||
react: {
|
||||
version: 'detect',
|
||||
},
|
||||
},
|
||||
rules: {
|
||||
'no-console': 'off',
|
||||
'no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
|
||||
'prefer-const': 'error',
|
||||
'no-var': 'error',
|
||||
'react/react-in-jsx-scope': 'off',
|
||||
'react/prop-types': 'off',
|
||||
},
|
||||
overrides: [
|
||||
{
|
||||
files: ['**/*.js'],
|
||||
rules: {
|
||||
'react/no-unknown-property': ['error', { ignore: ['class'] }],
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user