-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
36 lines (36 loc) · 942 Bytes
/
.eslintrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
module.exports = {
env: {
browser: true,
node: true,
},
settings: {
react: {
pragma: "React",
version: "detect",
},
},
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 11,
sourceType: "module",
},
extends: [
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"prettier/@typescript-eslint", //去掉@typescript-eslint中和prettier冲突的规则
],
plugins: ["prettier", "@typescript-eslint", "react", "react-hooks"],
rules: {
"@typescript-eslint/no-unused-vars": ["error"],
"@typescript-eslint/no-var-requires": "off",
"react/prop-types": "off",
"react/display-name": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-non-null-assertion": "off",
},
};