- 添加4个数据库索引提升查询性能 - 启用ESLint并配置React支持 - 修复ESLint错误(未使用的导入和状态) - 简化Toast组件UI样式 - 移除重复文件(server.js.backup) - 清理.gitignore中的.next目录 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
43 lines
797 B
JavaScript
43 lines
797 B
JavaScript
module.exports = {
|
|
root: true,
|
|
env: {
|
|
node: true,
|
|
es2021: true,
|
|
jest: true,
|
|
browser: true,
|
|
},
|
|
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'] }],
|
|
},
|
|
},
|
|
],
|
|
};
|