-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
48 lines (48 loc) · 1.25 KB
/
.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
37
38
39
40
41
42
43
44
45
46
47
48
module.exports = {
parser: "@typescript-eslint/parser",
plugins: ["react-hooks"],
extends: [
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"prettier",
"prettier/@typescript-eslint",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript",
],
parserOptions: {
ecmaVersion: 2018,
ecmaFeatures: {
jsx: true,
},
},
rules: {
"no-console": "off",
"global-require": "off",
"no-use-before-define": ["error", "nofunc"],
"no-restricted-imports": [2, { patterns: ["../*"] }],
"import/no-unresolved": [2],
"import/default": [0],
"react/jsx-filename-extension": [1, { extensions: [".tsx"] }],
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/interface-name-prefix": [2, { prefixWithI: "always" }],
"@typescript-eslint/explicit-member-accessibility": "error",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
},
settings: {
react: {
version: "detect",
},
"import/resolver": {
typescript: {
alwaysTryTypes: true,
directory: ".",
},
},
},
globals: {
__DEV__: true,
},
}