-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
79 lines (79 loc) · 1.98 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
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
module.exports = {
env: {
browser: true,
es6: true,
node: true,
},
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"standard-jsx",
"plugin:jsx-a11y/recommended",
"plugin:prettier/recommended",
"prettier",
"prettier/react",
"plugin:react-hooks/recommended",
],
globals: {
Atomics: "readonly",
SharedArrayBuffer: "readonly",
},
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2018,
sourceType: "module",
},
ignorePatterns: ["node_modules/"],
overrides: [
{
files: ["**/*.js", "**/*.spec.ts", "**/.*.test.ts"],
rules: {
"@typescript-eslint/no-var-requires": "off",
"no-undef": "off",
},
},
],
settings: {
react: {
version: "detect",
},
},
plugins: ["react", "no-loops", "@typescript-eslint", "eslint-plugin-import", "react-hooks"],
rules: {
radix: 2,
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"no-loops/no-loops": 2,
"import/order": 2,
"import/no-self-import": 2,
"import/first": 2,
"import/newline-after-import": 2,
"jsx-quotes": ["error", "prefer-double"],
"@typescript-eslint/no-explicit-any": 2,
"@typescript-eslint/generic-type-naming": 2,
"@typescript-eslint/interface-name-prefix": [
"error",
{
prefixWithI: "never",
},
],
"@typescript-eslint/explicit-function-return-type": "off",
"no-magic-numbers": "off",
"@typescript-eslint/no-magic-numbers": ["error", { ignore: [-1, 0, 1, 2] }],
"@typescript-eslint/typedef": "off",
"@typescript-eslint/no-namespace": [2, { allowDeclarations: true }],
"react-hooks/exhaustive-deps": "error",
"react/prefer-stateless-function": "error",
"@typescript-eslint/array-type": [
"error",
{
default: "array",
readonly: "array",
},
],
"require-await": "error",
},
}