-
Notifications
You must be signed in to change notification settings - Fork 358
/
.eslintrc.json
94 lines (93 loc) · 3.03 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
86
87
88
89
90
91
92
93
94
{
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:react-hooks/recommended", "plugin:react/recommended", "plugin:react-perf/recommended"],
"plugins": ["eslint-plugin-local-rules"],
"rules": {
"no-undef": "error",
"no-console": "warn",
"no-var": "error",
"no-case-declarations": "error",
"@typescript-eslint/no-empty-function": "error",
"no-extra-boolean-cast": "error",
"no-prototype-builtins": "error",
"no-empty": "error",
"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
"react/no-unused-prop-types": "error",
"react-hooks/rules-of-hooks": "warn",
"react/hook-use-state": "warn",
"@typescript-eslint/no-unused-vars": "warn",
"react/jsx-fragments": "warn",
"react-perf/jsx-no-new-array-as-prop": "warn",
"react-perf/jsx-no-new-object-as-prop": "warn",
"react-perf/jsx-no-new-function-as-prop": "off",
/* might be useful */
"@typescript-eslint/no-non-null-assertion": "off",
"curly": "off",
"@typescript-eslint/no-explicit-any": "off",
"prefer-const": "off",
"no-irregular-whitespace": "off",
"@typescript-eslint/ban-ts-comment": "off",
"no-async-promise-executor": "off",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/no-empty-interface": "off",
"react/react-in-jsx-scope": "off",
"react/no-unescaped-entities": "off",
"react/prop-types": "off",
"react/jsx-no-bind": "off",
"react/jsx-no-leaked-render": "off",
"react/no-multi-comp": "off",
"react/no-array-index-key": "off",
"react/no-unstable-nested-components": "off",
"react/jsx-no-useless-fragment": "off",
"react/require-default-props": "off",
"react/jsx-handler-names": "off",
"react/display-name": "off",
"local-rules/no-bigint-negation": "off",
"local-rules/no-logical-bigint": "off",
"no-restricted-imports": ["error", {
"paths": ["lodash"]
}],
"no-restricted-globals": ["error", {
"name": "process",
"message": "Don't use `process` in client code"
}]
},
"env": {
"browser": true,
"jest": true,
"es2020": true
},
"globals": {
"TradingView": true
},
"settings": {
"react": {
"version": "detect"
}
},
"overrides": [
{
// Disable no-undef for TypeScript files as it's already checked by the TypeScript compiler
"files": ["*.ts", "*.tsx"],
"rules": {
"no-undef": "off"
}
},
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
"local-rules/no-bigint-negation": "error",
"local-rules/no-logical-bigint": "error"
},
"parserOptions": {
"project": ["./tsconfig.json"]
}
},
{
"files": ["scripts/**"],
"rules": {
"no-restricted-globals": "off"
}
}
]
}