代码拉取完成,页面将自动刷新
const OFF = 0;
const WARNING = 1;
const ERROR = 2;
/** @type {import('eslint').Linter.Config} */
module.exports = {
env: {
browser: true,
es6: true
},
parser: '@typescript-eslint/parser',
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'prettier'
],
parserOptions: {},
plugins: ['@typescript-eslint', 'react'],
rules: {
semi: [ERROR, 'always'],
'space-infix-ops': ERROR,
'prefer-spread': ERROR,
'no-multi-spaces': ERROR,
'class-methods-use-this': WARNING,
'arrow-parens': [ERROR, 'as-needed'],
'@typescript-eslint/no-unused-vars': ERROR,
'@typescript-eslint/no-explicit-any': OFF,
'@typescript-eslint/explicit-function-return-type': OFF,
'@typescript-eslint/explicit-member-accessibility': OFF,
'@typescript-eslint/no-namespace': OFF,
'@typescript-eslint/explicit-module-boundary-types': OFF,
'react/display-name': OFF,
'react/prop-types': OFF,
'react/react-in-jsx-scope': OFF
},
settings: {
react: {
version: 'detect'
}
},
overrides: [
{
files: ['*.js'],
rules: {
'@typescript-eslint/no-var-requires': 'off'
}
},
{
files: ['*Spec.js', '*Spec.ts', '*Spec.tsx'],
extends: ['plugin:testing-library/react'],
rules: {
'react/prop-types': 'off',
'testing-library/no-node-access': [
'error',
{
allowContainerFirstChild: true
}
],
'testing-library/no-wait-for-multiple-assertions': 'off'
},
settings: {
'testing-library/custom-renders': 'off'
},
overrides: [
{
files: ['*StylesSpec.tsx'],
rules: {
// Node access is unavoidable in style tests as they do test against class selectors
'testing-library/no-node-access': 'off'
}
}
]
}
]
};
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。