-
Notifications
You must be signed in to change notification settings - Fork 2
/
.eslintrc.js
54 lines (51 loc) · 1.38 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
49
50
51
52
53
54
module.exports = {
root: true,
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint", "react-hooks"],
env: {
browser: true,
node: true,
mocha: true,
},
extends: [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"prettier/@typescript-eslint",
],
rules: {
"react/display-name": "off",
"@typescript-eslint/triple-slash-reference": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/interface-name-prefix": [2, "always"],
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-explicit-any": 1,
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/camelcase": [
2,
{ properties: "never", ignoreDestructuring: true },
],
"@typescript-eslint/no-use-before-define": [
"error",
{ functions: false, classes: false, variables: false },
],
// note you must disable the base rule as it can report incorrect errors
"no-unused-vars": "off",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "error",
},
overrides: [
{
files: ["*.tsx?"],
rules: {
"@typescript-eslint/no-var-requires": "error",
},
},
],
settings: {
react: {
version: "detect",
},
},
};