-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
85 lines (85 loc) · 2.29 KB
/
.eslintrc.json
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
{
"root": true,
"plugins": [
"react",
"react-hooks",
"import",
"prettier",
"@typescript-eslint"
],
"extends": [
"prettier",
"eslint:recommended",
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"plugin:react-hooks/recommended",
"plugin:import/typescript",
"plugin:import/recommended",
"plugin:prettier/recommended",
"plugin:@typescript-eslint/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2022,
"ecmaFeatures": {
"jsx": true
},
"sourceType": "module",
"project": true
},
"env": {
"es6": true,
"es2020": true,
"es2021": true,
"es2022": true,
"browser": true,
"node": true
},
"rules": {
"no-debugger": "off",
"no-console": "error",
"curly": ["error", "all"],
"no-param-reassign": "error",
"prettier/prettier": [
"error",
{
"semi": true,
"tabWidth": 2,
"endOfLine": "lf",
"printWidth": 120,
"singleQuote": true,
"trailingComma": "es5",
"arrowParens": "always"
}
],
"react/jsx-uses-react": "off",
"react/react-in-jsx-scope": "off",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"class-methods-use-this": "off",
// turn on errors for missing imports
"import/no-unresolved": "error",
"max-lines-per-function": ["error", 40],
"@typescript-eslint/array-type": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-use-before-define": "error",
"@typescript-eslint/explicit-function-return-type": "error"
},
"settings": {
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
},
"import/resolver": {
"typescript": {
"alwaysTryTypes": true,
"project": ["./tsconfig.json"]
},
"node": true
},
"react": {
"pragma": "React",
"version": "detect",
"fragment": "Fragment"
}
}
}