forked from ethui/ethui
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.eslintrc.js
More file actions
73 lines (68 loc) · 1.72 KB
/
Copy path.eslintrc.js
File metadata and controls
73 lines (68 loc) · 1.72 KB
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
module.exports = {
extends: [
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
],
plugins: ["react", "@typescript-eslint", "simple-import-sort", "import"],
parser: "@typescript-eslint/parser",
parserOptions: {
sourceType: "module",
project: [
"./tsconfig.json",
"./gui/tsconfig.json",
"./extension/tsconfig.json",
],
},
plugins: ["react", "@typescript-eslint", "simple-import-sort", "import"],
ignorePatterns: [
"**/*.generated.ts",
"node_modules/*",
"extension/dist/*",
"gui/dist/*",
"target/*",
],
settings: {
react: {
version: "detect",
},
},
rules: {
"no-console": ["error", { allow: ["warn", "error"] }],
"react/jsx-uses-react": "off",
"react/react-in-jsx-scope": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/require-await": "error",
"@typescript-eslint/no-confusing-void-expression": [
"error",
{ ignoreArrowShorthand: true },
],
"@typescript-eslint/no-unused-vars": [
"warn",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
caughtErrorsIgnorePattern: "^_",
},
],
"simple-import-sort/imports": "error",
"simple-import-sort/exports": "error",
"import/first": "error",
"import/newline-after-import": "error",
"import/no-duplicates": "error",
"no-restricted-imports": [
"error",
{
patterns: [
{
group: ["**../"],
message: "Relative imports are not allowed.",
},
],
},
],
},
};