-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
101 lines (92 loc) · 3 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
{
"env": {
"browser": true,
"es2021": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"overrides": [
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"settings": {
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
},
"import/resolver": {
"node": { "extensions": [".js", ".mjs", ".cjs"] },
"typescript": {}
}
},
"rules": {
// Disable formatting rules
"semi": 0,
"quotes": 0,
"indent": 0,
"space-before-function-paren": 0,
"arrow-parens": 0,
"comma-dangle": 0,
"keyword-spacing": 0,
"no-multiple-empty-lines": 0,
"no-trailing-spaces": 0,
"unicorn/number-literal-case": 0,
"unicorn/template-indent": 0,
"generator-star-spacing": 0,
"space-infix-ops": 0,
"comma-spacing": 0,
"brace-style": 0,
"space-in-parens": 0,
"space-before-blocks": 0,
"semi-spacing": 0,
"object-property-newline": 0,
"no-multi-spaces": 0,
"key-spacing": 0,
"eol-last": 0,
"func-call-spacing": 0,
"comma-style": 0,
// Disable some unnecessary or conflicting rules
"no-use-before-define": "off",
"unicorn/prevent-abbreviations": 0,
"unicorn/no-await-expression-member": 0,
"unicorn/no-useless-undefined": 0,
"unicorn/no-array-push-push": 0,
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/no-empty-function": 0,
"@typescript-eslint/no-var-requires": 0,
"@typescript-eslint/ban-ts-comment": 0,
"@typescript-eslint/no-empty-interface": 0,
// Allow unresolved imports
"import/no-unresolved": "off",
// Prefer const over let
"prefer-const": [
"error",
{
"destructuring": "any",
"ignoreReadBeforeAssign": false
}
],
// No single if in an "else" block
"no-lonely-if": "error",
// Force curly braces for control flow,
// including if blocks with a single statement
"curly": ["error", "all"],
// No async function without await
"require-await": "error",
// Force dot notation when possible
"dot-notation": "error",
// Force object shorthand where possible
"object-shorthand": "error",
// No useless destructuring/importing/exporting renames
"no-useless-rename": "error"
}
}