最佳实践antd-pro配置
@umijs/fabric
tsconfig.json
{
"compilerOptions": {
"target": "es5",
"module": "esnext",
"baseUrl": "./",
"paths": {
"@/*": [
"./src/*"
]
},
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"sourceMap": true,
"allowJs": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"skipLibCheck": true,
"noImplicitReturns": true,
"noUnusedLocals": false,
"noUnusedParameters": true,
"forceConsistentCasingInFileNames": true,
"moduleResolution": "node",
"resolveJsonModule": true,
"jsx": "react"
},
"include": [
"src",
"api"
]
}
.eslintrc.json
{
"env": {
"browser": true,
"es6": true
},
"extends": [
"airbnb"
],
"plugins": [
"react",
"react-hooks"
],
"globals": {
"__DEV__": false,
"__TEST__": false,
"__PROD__": false,
"__COVERAGE__": false
},
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2018,
"sourceType": "module"
},
"rules": {
"semi": 0,
"import/prefer-default-export": 0,
"react/prop-types": 0,
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": 2,
"react/jsx-props-no-spreading": 0,
"react/destructuring-assignment": 0,
"no-use-before-define": 0,
"prefer-const": 0,
"jsx-a11y/no-static-element-interactions": 0,
"jsx-a11y/click-events-have-key-events": 0,
"react/button-has-type": 0,
"eqeqeq": 0,
"no-useless-escape": 2
}
}