module.exports = { env: { browser: true, es2021: true, node: true }, extends: [ 'plugin:react/jsx-runtime', 'plugin:react/recommended', 'plugin:@next/next/recommended', 'next', 'prettier', 'plugin:@typescript-eslint/recommended', // 添加 TypeScript 推荐规则 'plugin:@typescript-eslint/recommended-requiring-type-checking' // 添加需要类型检查的规则 ], parser: '@typescript-eslint/parser', // 使用 TypeScript 解析器 parserOptions: { ecmaFeatures: { jsx: true }, ecmaVersion: 12, sourceType: 'module', project: './tsconfig.eslint.json' // 指向新的 ESLint 配置文件 }, plugins: [ 'react', 'react-hooks', 'prettier', '@typescript-eslint' // 添加 TypeScript 插件 ], settings: { react: { version: 'detect' } }, rules: { semi: 0, 'react/no-unknown-property': 'off', //