-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
64 lines (63 loc) · 2.1 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
{
"globals": {
"__PATH_PREFIX__": true
},
"extends": ["react-app", "preact", "plugin:@typescript-eslint/recommended"],
"plugins": ["@typescript-eslint" /* "unused-imports" */],
"overrides": [
{
"files": ["*.ts", "*.tsx"],
"rules": {
"no-console": "error",
"no-shadow": "off",
// "@typescript-eslint/no-shadow": "error",
// "unused-imports/no-unused-imports": "error",
// "unused-imports/no-unused-vars": "error",
"@typescript-eslint/no-unused-vars": "off",
"react/no-unused-state": "error",
"prefer-template": "off",
"no-nested-ternary": "error",
"no-unneeded-ternary": "error",
// "no-unnecessary-condition": "error",
// "@typescript-eslint/no-unnecessary-condition": "error",
// "no-uneces"
"react/jsx-key": [
2,
{
"warnOnDuplicates": true,
"checkKeyMustBeforeSpread": true,
"checkFragmentShorthand": true
}
],
"react/no-array-index-key": "warn",
// "arrow-body-style": ["error", "as-needed"],
"spaced-comment": ["error", "always"],
"@typescript-eslint/explicit-member-accessibility": "error",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/prefer-ts-expect-error": "error",
"@typescript-eslint/no-extra-semi": "off",
"react-hooks/exhaustive-deps": "off",
"react/react-in-jsx-scope": "off",
"react/jsx-uses-vars": "error",
"react/jsx-uses-react": "error",
"no-trailing-spaces": "error",
"no-mixed-spaces-and-tabs": "error",
"no-return-await": "error",
"radix": ["error", "as-needed"]
}
}
],
//
//
/* *
* fix eslint error "jest"
* https://github.com/microsoft/vscode-eslint/issues/
* 1145#issuecomment-781551124
* */
"settings": {
"jest": {"version": 26}
}
}