-
Notifications
You must be signed in to change notification settings - Fork 2
/
.eslintrc.json
140 lines (133 loc) · 4.15 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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
{
"env": {
"browser": true,
"es6": true,
"node": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"project": "tsconfig.json",
"sourceType": "module"
},
"plugins": ["@typescript-eslint", "import", "unicorn", "perfectionist"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended-type-checked",
"plugin:@typescript-eslint/strict-type-checked",
"plugin:@typescript-eslint/stylistic-type-checked",
"plugin:perfectionist/recommended-natural",
"plugin:unicorn/recommended",
"prettier"
],
"rules": {
"perfectionist/sort-imports": [
"error",
{
"type": "line-length",
"order": "desc",
"newlines-between": "never"
}
],
"unicorn/explicit-length-check": "off",
"unicorn/no-array-reduce": "off",
"unicorn/no-null": "off",
"unicorn/no-useless-undefined": "off",
"unicorn/prefer-ternary": "off",
"import/consistent-type-specifier-style": ["error", "prefer-inline"],
"import/no-duplicates": ["error", { "prefer-inline": true }],
"import/no-useless-path-segments": "error",
"@typescript-eslint/array-type": ["error", { "default": "generic" }],
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/consistent-type-definitions": "error",
"@typescript-eslint/consistent-type-imports": ["error", { "fixStyle": "inline-type-imports" }],
"@typescript-eslint/explicit-member-accessibility": "error",
"@typescript-eslint/method-signature-style": ["error", "property"],
"@typescript-eslint/no-base-to-string": "off",
"@typescript-eslint/no-import-type-side-effects": "off",
"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/no-meaningless-void-operator": "error",
"@typescript-eslint/no-misused-promises": "error",
"@typescript-eslint/no-non-null-asserted-nullish-coalescing": "error",
"@typescript-eslint/no-non-null-assertion": "error",
"@typescript-eslint/no-unnecessary-condition": "error",
"@typescript-eslint/no-unnecessary-type-arguments": "error",
"@typescript-eslint/no-unnecessary-type-assertion": "error",
"@typescript-eslint/prefer-optional-chain": "error",
"@typescript-eslint/prefer-readonly": "error",
"@typescript-eslint/promise-function-async": "error",
"@typescript-eslint/require-await": "error",
"@typescript-eslint/switch-exhaustiveness-check": "error",
"@typescript-eslint/padding-line-between-statements": [
"error",
{
"blankLine": "always",
"next": ["class", "do", "for", "function", "if", "interface", "return", "switch", "throw", "while"],
"prev": "*"
},
{
"blankLine": "always",
"next": "*",
"prev": [
"directive",
"import",
"multiline-block-like",
"multiline-const",
"multiline-expression",
"multiline-let"
]
},
{
"blankLine": "never",
"next": "import",
"prev": "import"
}
],
"@typescript-eslint/prefer-nullish-coalescing": "off",
"arrow-body-style": ["error", "as-needed"],
"consistent-return": "error",
"curly": "error",
"eqeqeq": ["error", "smart"],
"no-constant-binary-expression": "error",
"no-constructor-return": "error",
"no-else-return": "error",
"no-extra-boolean-cast": "error",
"no-implicit-coercion": "error",
"no-invalid-regexp": "error",
"no-lonely-if": "error",
"no-multi-assign": "error",
"no-multi-spaces": "error",
"no-new-native-nonconstructor": "error",
"no-param-reassign": "error",
"no-self-compare": "error",
"no-unneeded-ternary": "error",
"no-unused-private-class-members": "error",
"no-useless-concat": "error",
"no-useless-escape": "error",
"no-useless-rename": "error",
"no-useless-return": "error",
"no-var": "error",
"object-curly-newline": [
"error",
{
"ExportDeclaration": {
"consistent": true,
"minProperties": 3,
"multiline": true
},
"ObjectExpression": {
"consistent": true,
"minProperties": 3,
"multiline": true
}
}
],
"object-shorthand": "error",
"prefer-arrow-callback": "error",
"prefer-const": "error",
"prefer-template": "error",
"quote-props": ["error", "consistent-as-needed"],
"quotes": ["error", "double", { "avoidEscape": true }],
"yoda": ["error", "never"]
}
}