2021-01-12 23:35:36 +08:00
|
|
|
module.exports = {
|
|
|
|
root: true,
|
|
|
|
parserOptions: {
|
|
|
|
ecmaVersion: 2020,
|
|
|
|
sourceType: 'module',
|
|
|
|
ecmaFeatures: {
|
|
|
|
jsx: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
settings: {
|
|
|
|
react: {
|
|
|
|
version: 'detect',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
env: {
|
|
|
|
browser: true,
|
|
|
|
amd: true,
|
|
|
|
node: true,
|
2021-05-18 23:46:30 +08:00
|
|
|
es6: true,
|
2021-01-12 23:35:36 +08:00
|
|
|
},
|
|
|
|
extends: [
|
|
|
|
'eslint:recommended',
|
|
|
|
'plugin:react/recommended',
|
2021-04-20 17:04:11 +02:00
|
|
|
'plugin:react-hooks/recommended',
|
2021-01-12 23:35:36 +08:00
|
|
|
'plugin:jsx-a11y/recommended',
|
|
|
|
'plugin:prettier/recommended',
|
|
|
|
],
|
|
|
|
rules: {
|
|
|
|
'prettier/prettier': 'error',
|
|
|
|
'react/react-in-jsx-scope': 'off',
|
|
|
|
'jsx-a11y/anchor-is-valid': [
|
|
|
|
'error',
|
|
|
|
{
|
|
|
|
components: ['Link'],
|
|
|
|
specialLink: ['hrefLeft', 'hrefRight'],
|
|
|
|
aspects: ['invalidHref', 'preferButton'],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
'react/prop-types': 0,
|
|
|
|
'no-unused-vars': 0,
|
|
|
|
'react/no-unescaped-entities': 0,
|
|
|
|
},
|
|
|
|
}
|