-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy path.eslintrc
103 lines (103 loc) · 3 KB
/
.eslintrc
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
{
"parser": "@typescript-eslint/parser",
"env": {
"browser": true,
"es2021": true,
"node": true,
"es6": true,
"jest": true
},
"plugins": ["@typescript-eslint", "unused-imports", "react", "import"],
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"rules": {
"import/prefer-default-export": "off",
"semi": "off",
"camelcase": "off",
"import/extensions": "off",
"import/no-cycle": "off",
"object-curly-newline": "off",
"implicit-arrow-linebreak": "off",
"@typescript-eslint/no-explicit-any": "off",
//main remvoals, the rest warning will be turned to errors later on
"no-console": "off",
"import/no-unresolved": "off",
// change to "error"
"max-len": [
"error",
{
"code": 120
}
],
"comma-dangle": "warn",
"no-unused-vars": "off",
"arrow-body-style": "error",
//change to error
"no-new": "warn",
"no-param-reassign": "error",
// change to "error"
"@typescript-eslint/no-inferrable-types": "warn",
"@typescript-eslint/ban-ts-comment": "error",
"no-empty": "error",
// change to "error"
"@typescript-eslint/no-var-requires": "error",
"@typescript-eslint/no-this-alias": "error",
"@typescript-eslint/ban-types": "warn",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/explicit-module-boundary-types": "off",
"no-var": "error",
// change to "error"
"no-prototype-builtins": "warn",
"prefer-const": "error",
// change to "error"
"react/prop-types": "error",
"no-async-promise-executor": "warn",
"@typescript-eslint/no-empty-function": "error",
"react/jsx-key": "warn",
"no-empty-pattern": "warn",
"react/jsx-no-target-blank": "warn",
"react/no-unescaped-entities": "off",
"prefer-spread": "warn",
"react/no-unknown-property": "off",
"tsdoc/syntax": "off",
"tsdoc-malformed-inline-tag": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"no-inner-declarations": ["warn"]
},
"globals": {
"React": true,
"JSX": true
},
"settings": {
"react": {
"version": "detect"
// React version. "detect" automatically picks the version you have installed.
},
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
},
"import/resolver": {
"typescript": {
"alwaysTryTypes": true
// always try to resolve types under `<root>@types` directory even it doesn't contain any source code, like `@types/unist`
}
}
},
"overrides": [
{
"files": ["perps_wasm/*.js", "perps_wasm/*.ts"],
"rules": {
"@typescript-eslint/explicit-module-boundary-types": "off",
"prefer-const": "off",
"no-param-reassign": "off",
"no-var": "off",
"max-len": "off"
}
}
],
"ignorePatterns": ["perps-wasm/gfx_perps_wasm_bg.js", "perps-wasm/gfx_perps_wasm.js\n"] // <<< ignore all files in test folder
}