forked from cashubtc/eNuts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
183 lines (183 loc) · 5.44 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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
{
"env": {
"es6": true,
"node": true,
"es2021": true,
"jest/globals": true
},
"settings": {
"react": {
"pragma": "React",
"version": "detect"
},
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
}
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:promise/recommended",
"plugin:json/recommended-with-comments",
"plugin:import/typescript",
"plugin:jest/recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:react/jsx-runtime"
],
"overrides": [
{
"files": ["*.js", "*.jsx", "*.cjs", "*.mjs"],
"rules": {
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/require-await": "off",
"@typescript-eslint/await-thenable": "off",
"@typescript-eslint/consistent-type-exports": "off",
"@typescript-eslint/restrict-template-expressions": "off",
"@typescript-eslint/no-floating-promises": "off",
"@typescript-eslint/no-implied-eval": "off",
"@typescript-eslint/no-misused-promises": "off",
"@typescript-eslint/no-unnecessary-type-assertion": "off",
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/restrict-plus-operands": "off",
"@typescript-eslint/unbound-method": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-base-to-string": "off",
"@typescript-eslint/no-duplicate-type-constituents": "off",
"@typescript-eslint/no-redundant-type-constituents": "off",
"@typescript-eslint/no-unsafe-enum-comparison": "off"
}
},
{
"files": ["*.json"],
"parser": "espree",
"rules": {
"@typescript-eslint/require-await": "off",
"@typescript-eslint/await-thenable": "off",
"@typescript-eslint/consistent-type-exports": "off",
"@typescript-eslint/restrict-template-expressions": "off",
"@typescript-eslint/no-floating-promises": "off",
"@typescript-eslint/no-implied-eval": "off",
"@typescript-eslint/no-misused-promises": "off",
"@typescript-eslint/no-unnecessary-type-assertion": "off",
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/restrict-plus-operands": "off",
"@typescript-eslint/unbound-method": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-base-to-string": "off",
"@typescript-eslint/no-duplicate-type-constituents": "off",
"@typescript-eslint/no-redundant-type-constituents": "off",
"@typescript-eslint/no-unsafe-enum-comparison": "off"
}
}
],
"globals": {
"__dirname": true,
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"extraFileExtensions": [".json"],
"ecmaVersion": "latest",
"sourceType": "module",
"ecmaFeatures": {
"jsx": true,
"globalReturn": true,
"impliedStrict": true
},
"project": "tsconfig.json"
},
"plugins": [
"react",
"react-hooks",
"jest",
"@typescript-eslint",
"simple-import-sort",
"promise",
"deprecate",
"node",
"import",
"@getify/proper-arrows",
"jsdoc"
],
"rules": {
"quote-props": ["warn", "as-needed"],
"react/no-unescaped-entities": "warn",
"no-dupe-class-members": 0,
"simple-import-sort/imports": "warn",
"simple-import-sort/exports": "warn",
"import/first": "warn",
"import/newline-after-import": "warn",
"import/no-duplicates": "warn",
"promise/always-return": ["warn", { "ignoreLastCallback": true }],
// to enforce using type for object type definitions, can be type or interface
"@typescript-eslint/consistent-type-definitions": ["warn", "interface"],
"@typescript-eslint/array-type": ["warn", { "default": "array" }],
"@typescript-eslint/require-await": "warn",
"@typescript-eslint/await-thenable": "warn",
"@typescript-eslint/consistent-type-exports": "warn",
"@typescript-eslint/restrict-template-expressions": [
"warn",
{ "allowNumber": true, "allowBoolean": true, "allowNullish": true }
],
"@typescript-eslint/no-explicit-any": 0,
"new-cap": 1,
"camelcase": 0,
"@typescript-eslint/no-unused-vars": [
"warn",
{
"vars": "all",
"args": "all",
"ignoreRestSiblings": false,
"argsIgnorePattern": "^_"
}
],
"prefer-promise-reject-errors": "warn",
"no-await-in-loop": "warn",
"no-return-await": "warn",
"no-prototype-builtins": "warn",
"no-empty": "warn",
"arrow-body-style": ["warn", "as-needed"],
"no-useless-return": "warn",
"require-await": "warn",
"prefer-arrow-callback": "warn",
"no-var": "warn",
"no-fallthrough": "warn",
"no-extra-parens": ["warn", "functions"],
"no-extra-semi": "warn",
"curly": "warn",
"eqeqeq": "warn",
"no-else-return": "warn",
"prefer-const": "warn",
"no-console": 1,
"indent": ["warn", "tab", { "SwitchCase": 1 }],
"quotes": ["warn", "single"],
"semi": ["warn", "never"]
},
"ignorePatterns": [
"node_modules",
"dist",
"build",
".expo",
".jest",
".vscode",
"coverage",
"patches",
"report",
"assets",
"scripts",
"scripts/dev",
"scripts/**/*.*",
"scripts/dev/*"
]
}