-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.json
107 lines (95 loc) · 2.77 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
102
103
104
105
106
107
{
"parser": "@typescript-eslint/parser",
"extends": [
"prettier",
"standard",
"plugin:unicorn/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:import/errors",
"plugin:import/warnings"
],
"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
"unicorn/prefer-ternary": 0,
"unicorn/no-null": 0,
"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,
"unicorn/no-array-for-each": 0,
"unicorn/prefer-includes": "warn",
"unicorn/no-process-exit": 0,
"unicorn/consistent-function-scoping": 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,
// Enforce import order
"import/order": "error",
// Imports should come first
"import/first": "error",
// Other import rules
"import/no-mutable-exports": "error",
// 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"
}
}