This repository has been archived by the owner on Oct 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
.eslintrc.js
76 lines (76 loc) · 1.91 KB
/
.eslintrc.js
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
module.exports = {
"root": true,
"parser": "@typescript-eslint/parser",
"env": {
"node": true
},
"plugins": [
"@typescript-eslint"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react-hooks/recommended"
],
"rules": {
"semi": ["error", "always"],
"curly": "error",
"quotes": ["warn", "double"],
"dot-notation": "error",
"no-cond-assign": "warn",
"no-nested-ternary": "warn",
"arrow-body-style": ["error", "as-needed"],
"arrow-parens": ["error", "as-needed"],
"prefer-arrow-callback": "warn",
"no-debugger": "warn",
"no-extra-bind": "error",
"no-fallthrough": "off",
"no-use-before-define": "off",
"prefer-const": ["warn", {
"ignoreReadBeforeAssign": true
}],
"no-var": "error",
"no-shadow-restricted-names": "error",
"no-undef": "error",
"no-unused-vars": "warn",
"no-console": "off",
"no-irregular-whitespace": "warn",
"comma-dangle": ["warn", "never"],
"func-call-spacing": ["error", "never"],
"no-trailing-spaces": "error",
"no-unneeded-ternary": "warn",
"object-property-newline": ["warn", {
"allowMultiplePropertiesPerLine": true
}],
"one-var-declaration-per-line": ["error", "initializations"],
"constructor-super": "warn",
"no-dupe-class-members": "error",
"no-duplicate-imports": "error",
"no-useless-constructor": "warn",
"object-shorthand": ["warn", "properties"],
"prefer-destructuring": "warn",
"prefer-template": "error",
"object-curly-spacing": ["error", "always"],
"camelcase": ["error", {
"allow": ["^\\$_"]
}],
"indent": ["warn", "tab", {
"SwitchCase": 1
}],
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": [
"warn", {
"additionalHooks": "useRecoilCallback|useRecoilTransaction_UNSTABLE"
}
]
},
"overrides": [
{
"files": ["*.tsx", "*.ts"],
"rules": {
"no-undef": "off"
}
}
]
};