2026-03-18 16:19:03 +08:00
|
|
|
module.exports = {
|
|
|
|
|
root: true,
|
|
|
|
|
env: {
|
|
|
|
|
node: true,
|
|
|
|
|
es2021: true,
|
|
|
|
|
jest: true,
|
2026-03-19 09:26:04 +08:00
|
|
|
browser: true,
|
2026-03-18 16:19:03 +08:00
|
|
|
},
|
2026-03-19 09:26:04 +08:00
|
|
|
extends: [
|
|
|
|
|
'eslint:recommended',
|
|
|
|
|
'plugin:react/recommended',
|
|
|
|
|
'plugin:react-hooks/recommended',
|
|
|
|
|
],
|
2026-03-18 16:19:03 +08:00
|
|
|
parserOptions: {
|
|
|
|
|
ecmaVersion: 'latest',
|
|
|
|
|
sourceType: 'module',
|
2026-03-19 09:26:04 +08:00
|
|
|
ecmaFeatures: {
|
|
|
|
|
jsx: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
settings: {
|
|
|
|
|
react: {
|
|
|
|
|
version: 'detect',
|
|
|
|
|
},
|
2026-03-18 16:19:03 +08:00
|
|
|
},
|
|
|
|
|
rules: {
|
|
|
|
|
'no-console': 'off',
|
|
|
|
|
'no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
|
|
|
|
|
'prefer-const': 'error',
|
|
|
|
|
'no-var': 'error',
|
2026-03-19 09:26:04 +08:00
|
|
|
'react/react-in-jsx-scope': 'off',
|
|
|
|
|
'react/prop-types': 'off',
|
2026-03-18 16:19:03 +08:00
|
|
|
},
|
2026-03-19 09:26:04 +08:00
|
|
|
overrides: [
|
|
|
|
|
{
|
|
|
|
|
files: ['**/*.js'],
|
|
|
|
|
rules: {
|
|
|
|
|
'react/no-unknown-property': ['error', { ignore: ['class'] }],
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
],
|
2026-03-18 16:19:03 +08:00
|
|
|
};
|