-
Notifications
You must be signed in to change notification settings - Fork 373
/
Copy path.eslintrc.json
129 lines (126 loc) · 3.79 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
{
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react-hooks/recommended",
"plugin:react/recommended",
"plugin:react-perf/recommended",
"plugin:es-x/restrict-to-es2017"
],
"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",
"es-x/no-bigint": "off",
"es-x/no-optional-chaining": "off",
"es-x/no-import-meta": "off",
"es-x/no-dynamic-import": "off",
"es-x/no-class-instance-fields": "off",
"es-x/no-class-static-fields": "off",
"es-x/no-nullish-coalescing-operators": "off",
"es-x/no-global-this": "off",
"es-x/no-numeric-separators": "off",
"es-x/no-rest-spread-properties": "off",
"es-x/no-regexp-named-capture-groups": "off",
// polyfills
"es-x/no-array-prototype-at": "off",
"es-x/no-array-prototype-flat": "off",
"es-x/no-object-fromentries": "off",
"es-x/no-promise-prototype-finally": "off",
"es-x/no-promise-any": "off",
"es-x/no-promise-all-settled": "off",
"es-x/no-promise-withresolvers": "off",
"es-x/no-array-prototype-findlast-findlastindex": "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": ["./src/**/*.ts", "./src/**/*.tsx", "./src/**/*.js", "./src/**/*.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"
}
}
]
}