@ololoepepe/eslint-config-typescript 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1 @@
1
+ # ESLint config for TypeScript
package/package.json ADDED
@@ -0,0 +1,43 @@
1
+ {
2
+ "name": "@ololoepepe/eslint-config-typescript",
3
+ "version": "0.0.1",
4
+ "description": "ESLint config for TypeScript",
5
+ "main": "src/index.js",
6
+ "imports": {
7
+ "#src/*.js": "./src/*.js"
8
+ },
9
+ "type": "module",
10
+ "scripts": {
11
+ "lint": "eslint ./src",
12
+ "test": "mocha ./test/*"
13
+ },
14
+ "publishConfig": {
15
+ "registry": "https://registry.npmjs.com"
16
+ },
17
+ "files": [
18
+ "src",
19
+ "package.json",
20
+ "README.md"
21
+ ],
22
+ "repository": {
23
+ "type": "git",
24
+ "url": "git+ssh://git@ssh.gitea.void-walkers.com:1022/libs/eslint-config-typescript.git"
25
+ },
26
+ "author": "Andrey Bogdanov <ololoepepe@gmail.com>",
27
+ "license": "UNLICENSED",
28
+ "bugs": {
29
+ "url": "https://gitea.void-walkers.com/libs/eslint-config-typescript/issues"
30
+ },
31
+ "homepage": "https://gitea.void-walkers.com/libs/eslint-config-typescript#README",
32
+ "dependencies": {
33
+ "@typescript-eslint/eslint-plugin": "^8.47.0",
34
+ "@typescript-eslint/parser": "^8.47.0",
35
+ "eslint": ">=8.57.0",
36
+ "eslint-plugin-import": "^2.32.0",
37
+ "eslint-plugin-perfectionist": "^4.15.1",
38
+ "eslint-plugin-sort-keys-shorthand": "^2.3.0"
39
+ },
40
+ "devDependencies": {
41
+ "mocha": "^11.7.5"
42
+ }
43
+ }
package/src/index.js ADDED
@@ -0,0 +1,310 @@
1
+ import pluginImport from '#src/plugins/import.js';
2
+ import pluginPerfectionist from '#src/plugins/perfectionist.js';
3
+ import pluginSortKeysShorthand from '#src/plugins/sort-keys-shorthand.js';
4
+ import pluginTypescript from '#src/plugins/typescript/index.js';
5
+ import rulesNo from '#src/rules/no.js';
6
+
7
+ export const env = {
8
+ es2021: true,
9
+ node: true
10
+ };
11
+
12
+ export const parser = '@typescript-eslint/parser';
13
+
14
+ export const parserOptions = {
15
+ ecmaFeatures: {
16
+ jsx: true
17
+ },
18
+ ecmaVersion: 'latest',
19
+ project: './tsconfig.json',
20
+ requireConfigFile: false,
21
+ sourceType: 'module'
22
+ };
23
+
24
+ export const plugins = [
25
+ '@typescript-eslint',
26
+ 'import',
27
+ 'perfectionist',
28
+ 'sort-keys-shorthand'
29
+ ];
30
+
31
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
32
+ export const rules = {
33
+ 'accessor-pairs': ['warn', {
34
+ enforceForClassMembers: true,
35
+ getWithoutSet: false,
36
+ setWithoutGet: true
37
+ }],
38
+ 'array-bracket-newline': ['error', 'consistent'],
39
+ 'array-bracket-spacing': ['error', 'never', {
40
+ arraysInArrays: false,
41
+ objectsInArrays: false,
42
+ singleValue: false
43
+ }],
44
+ 'array-callback-return': ['error', {
45
+ allowImplicit: false,
46
+ checkForEach: false
47
+ }],
48
+ 'array-element-newline': ['error', 'consistent'],
49
+ 'arrow-body-style': ['error', 'as-needed'],
50
+ 'arrow-parens': ['error', 'as-needed', {
51
+ requireForBlockBody: false
52
+ }],
53
+ 'arrow-spacing': ['error', {
54
+ after: true,
55
+ before: true
56
+ }],
57
+ 'block-scoped-var': 'error',
58
+ 'block-spacing': ['error', 'always'],
59
+ 'brace-style': ['error', '1tbs', {
60
+ allowSingleLine: false
61
+ }],
62
+ camelcase: ['error', {
63
+ ignoreDestructuring: false,
64
+ ignoreGlobals: true,
65
+ ignoreImports: false,
66
+ properties: 'never'
67
+ }],
68
+ 'capitalized-comments': ['error', 'always', {
69
+ ignoreConsecutiveComments: true,
70
+ ignoreInlineComments: false,
71
+ ignorePattern: 'webpackChunkName'
72
+ }],
73
+ 'class-methods-use-this': 'off',
74
+ 'comma-dangle': ['error', 'never'],
75
+ 'comma-spacing': ['error', {
76
+ after: true,
77
+ before: false
78
+ }],
79
+ 'comma-style': ['error', 'last'],
80
+ complexity: ['warn', 20],
81
+ 'computed-property-spacing': ['error', 'never', {
82
+ enforceForClassMembers: true
83
+ }],
84
+ 'consistent-return': 'off',
85
+ 'consistent-this': ['error', 'self'],
86
+ 'constructor-super': 'error',
87
+ curly: ['error', 'all'],
88
+ 'default-case': ['error', {
89
+ commentPattern: '^skip\\sdefault'
90
+ }],
91
+ 'default-case-last': 'error',
92
+ 'default-param-last': 'error',
93
+ 'dot-location': ['error', 'property'],
94
+ 'dot-notation': 'off', // NOTE: See TypeScript rule extending this one
95
+ 'eol-last': ['error', 'always'],
96
+ eqeqeq: ['error', 'always'],
97
+ 'for-direction': 'error',
98
+ 'func-call-spacing': ['error', 'never'],
99
+ 'func-name-matching': ['warn', 'always'],
100
+ 'func-names': ['error', 'never', {
101
+ generators: 'never'
102
+ }],
103
+ 'func-style': ['error', 'declaration', {
104
+ allowArrowFunctions: true
105
+ }],
106
+ 'function-call-argument-newline': ['error', 'consistent'],
107
+ 'function-paren-newline': ['error', 'multiline-arguments'],
108
+ 'generator-star-spacing': ['error', {
109
+ after: true,
110
+ before: true
111
+ }],
112
+ 'getter-return': ['error', {
113
+ allowImplicit: false
114
+ }],
115
+ 'grouped-accessor-pairs': ['error', 'getBeforeSet'],
116
+ 'guard-for-in': 'error',
117
+ 'id-denylist': 'off',
118
+ 'id-length': 'off',
119
+ 'id-match': 'off',
120
+ 'implicit-arrow-linebreak': ['error', 'beside'],
121
+ indent: ['error', 2],
122
+ 'init-declarations': 'off', // NOTE: See TypeScript rule extending this one
123
+ 'jsx-quotes': ['error', 'prefer-double'],
124
+ 'key-spacing': ['error', {
125
+ afterColon: true,
126
+ beforeColon: false
127
+ }],
128
+ 'keyword-spacing': ['error', {
129
+ after: true,
130
+ before: true
131
+ }],
132
+ 'line-comment-position': 'off',
133
+ 'linebreak-style': ['error', 'unix'],
134
+ 'lines-around-comment': 'off',
135
+ 'lines-between-class-members': ['error', 'always', {
136
+ exceptAfterSingleLine: true
137
+ }],
138
+ 'logical-assignment-operators': ['error', 'always', {
139
+ enforceForIfStatements: false
140
+ }],
141
+ 'max-classes-per-file': 'off',
142
+ 'max-depth': ['warn', 5],
143
+ 'max-len': ['error', {
144
+ code: 120,
145
+ comments: 120,
146
+ ignoreComments: false,
147
+ ignoreRegExpLiterals: false,
148
+ ignoreStrings: false,
149
+ ignoreTemplateLiterals: false,
150
+ ignoreTrailingComments: false,
151
+ ignoreUrls: false,
152
+ tabWidth: 2
153
+ }],
154
+ 'max-lines': ['warn', {
155
+ max: 500,
156
+ skipBlankLines: true,
157
+ skipComments: true
158
+ }],
159
+ 'max-lines-per-function': ['warn', {
160
+ IIFEs: true,
161
+ max: 100,
162
+ skipBlankLines: true,
163
+ skipComments: true
164
+ }],
165
+ 'max-nested-callbacks': ['warn', 5],
166
+ 'max-params': 'off', // NOTE: See TypeScript rule extending this one
167
+ 'max-statements': 'off',
168
+ 'max-statements-per-line': ['error', {
169
+ max: 1
170
+ }],
171
+ 'multiline-comment-style': 'off',
172
+ 'multiline-ternary': 'off',
173
+ 'new-cap': ['error', {
174
+ capIsNew: true,
175
+ newIsCap: true,
176
+ properties: true
177
+ }],
178
+ 'new-parens': ['error', 'always'],
179
+ 'newline-per-chained-call': ['error', {
180
+ ignoreChainWithDepth: 3
181
+ }],
182
+ 'nonblock-statement-body-position': 'off',
183
+ 'object-curly-newline': 'off',
184
+ 'object-curly-spacing': ['error', 'never', {
185
+ arraysInObjects: false,
186
+ objectsInObjects: false
187
+ }],
188
+ 'object-property-newline': 'off', // Reconsider
189
+ 'object-shorthand': ['error', 'always', {
190
+ avoidExplicitReturnArrows: false,
191
+ avoidQuotes: true,
192
+ ignoreConstructors: false
193
+ }],
194
+ 'one-var': ['error', 'never'],
195
+ 'one-var-declaration-per-line': 'off',
196
+ 'operator-assignment': ['error', 'always'],
197
+ 'operator-linebreak': ['error', 'after'],
198
+ 'padded-blocks': ['error', 'never', {
199
+ allowSingleLineBlocks: false
200
+ }],
201
+ 'padding-line-between-statements': ['error', {
202
+ blankLine: 'always',
203
+ next: '*',
204
+ prev: 'multiline-block-like'
205
+ }],
206
+ 'prefer-arrow-callback': ['error', {
207
+ allowNamedFunctions: false,
208
+ allowUnboundThis: true
209
+ }],
210
+ 'prefer-const': ['error', {
211
+ destructuring: 'all',
212
+ ignoreReadBeforeAssign: true
213
+ }],
214
+ 'prefer-destructuring': 'off', // NOTE: See TypeScript rule extending this one
215
+ 'prefer-exponentiation-operator': 'error',
216
+ 'prefer-named-capture-group': 'warn',
217
+ 'prefer-numeric-literals': 'error',
218
+ 'prefer-object-has-own': 'off',
219
+ 'prefer-object-spread': 'error',
220
+ 'prefer-promise-reject-errors': 'off', // NOTE: See TypeScript rule extending this one
221
+ 'prefer-regex-literals': ['error', {
222
+ disallowRedundantWrapping: true
223
+ }],
224
+ 'prefer-rest-params': 'error',
225
+ 'prefer-spread': 'error',
226
+ 'prefer-template': 'error',
227
+ 'quote-props': ['error', 'as-needed', {
228
+ keywords: false,
229
+ numbers: true,
230
+ unnecessary: true
231
+ }],
232
+ quotes: ['error', 'single', {
233
+ allowTemplateLiterals: false,
234
+ avoidEscape: true
235
+ }],
236
+ radix: ['error', 'as-needed'],
237
+ 'require-atomic-updates': 'error',
238
+ 'require-await': 'off', // NOTE: See TypeScript rule extending this one
239
+ 'require-unicode-regexp': 'error',
240
+ 'require-yield': 'off',
241
+ 'rest-spread-spacing': ['error', 'never'],
242
+ semi: ['error', 'always', {
243
+ omitLastInOneLineBlock: false
244
+ }],
245
+ 'semi-spacing': ['error', {
246
+ after: true,
247
+ before: false
248
+ }],
249
+ 'semi-style': ['error', 'last'],
250
+ 'sort-imports': 'off',
251
+ 'sort-keys': 'off',
252
+ 'sort-vars': ['error', {
253
+ ignoreCase: true
254
+ }],
255
+ 'space-before-blocks': ['error', 'always'],
256
+ 'space-before-function-paren': ['error', {
257
+ anonymous: 'always',
258
+ asyncArrow: 'always',
259
+ named: 'never'
260
+ }],
261
+ 'space-in-parens': ['error', 'never'],
262
+ 'space-infix-ops': ['error', {
263
+ int32Hint: false
264
+ }],
265
+ 'space-unary-ops': ['error', {
266
+ nonwords: false,
267
+ words: true
268
+ }],
269
+ 'spaced-comment': ['error', 'always', {
270
+ block: {
271
+ balanced: true,
272
+ exceptions: ['-', '+', '*'],
273
+ markers: ['!', '*']
274
+ },
275
+ line: {
276
+ exceptions: ['-', '+', '*'],
277
+ markers: ['!', '/', '=>']
278
+ }
279
+ }],
280
+ strict: ['error', 'never'],
281
+ 'switch-colon-spacing': ['error', {
282
+ after: true,
283
+ before: false
284
+ }],
285
+ 'symbol-description': 'error',
286
+ 'template-curly-spacing': ['error', 'never'],
287
+ 'template-tag-spacing': ['error', 'never'],
288
+ 'unicode-bom': ['error', 'never'],
289
+ 'use-isnan': ['error', {
290
+ enforceForIndexOf: true,
291
+ enforceForSwitchCase: true
292
+ }],
293
+ 'valid-typeof': ['error', {
294
+ requireStringLiterals: false
295
+ }],
296
+ 'vars-on-top': 'error',
297
+ 'wrap-iife': ['error', 'inside', {
298
+ functionPrototypeMethods: true
299
+ }],
300
+ 'wrap-regex': 'off',
301
+ 'yield-star-spacing': ['error', 'both'],
302
+ yoda: ['error', 'never'],
303
+ ...rulesNo,
304
+ /* eslint-disable @typescript-eslint/no-unsafe-member-access */
305
+ ...pluginTypescript.rules,
306
+ ...pluginPerfectionist.rules,
307
+ ...pluginImport.rules,
308
+ ...pluginSortKeysShorthand.rules
309
+ /* eslint-enable @typescript-eslint/no-unsafe-member-access */
310
+ };
@@ -0,0 +1,107 @@
1
+ export default {
2
+ rules: {
3
+ 'import/consistent-type-specifier-style': 'off', // TODO: Reconsider if use TS/Flow
4
+ 'import/default': 'error',
5
+ 'import/dynamic-import-chunkname': ['error'],
6
+ 'import/export': 'error',
7
+ 'import/exports-last': 'off',
8
+ 'import/extensions': 'off',
9
+ 'import/first': ['error', 'absolute-first'],
10
+ 'import/group-exports': 'off',
11
+ 'import/max-dependencies': 'off',
12
+ 'import/named': 'error',
13
+ 'import/namespace': ['error', {
14
+ allowComputed: false
15
+ }],
16
+ 'import/newline-after-import': ['error', {
17
+ considerComments: false,
18
+ count: 1
19
+ }],
20
+ 'import/no-absolute-path': ['error', {
21
+ amd: true,
22
+ commonjs: true,
23
+ esmodule: true
24
+ }],
25
+ 'import/no-amd': 'off',
26
+ 'import/no-anonymous-default-export': 'off',
27
+ 'import/no-commonjs': 'off',
28
+ 'import/no-cycle': ['error', {
29
+ amd: true,
30
+ commonjs: true,
31
+ esmodule: true, // TODO
32
+ ignoreExternal: true
33
+ }],
34
+ 'import/no-default-export': 'off',
35
+ 'import/no-deprecated': 'warn',
36
+ 'import/no-duplicates': ['error', {
37
+ considerQueryString: true
38
+ }],
39
+ 'import/no-dynamic-require': 'off', // TODO
40
+ 'import/no-empty-named-blocks': 'error',
41
+ 'import/no-extraneous-dependencies': 'error',
42
+ 'import/no-import-module-exports': 'off',
43
+ 'import/no-internal-modules': 'off',
44
+ 'import/no-mutable-exports': 'error',
45
+ 'import/no-named-as-default': 'warn',
46
+ 'import/no-named-as-default-member': 'error',
47
+ 'import/no-named-default': 'off',
48
+ 'import/no-named-export': 'off',
49
+ 'import/no-namespace': 'off',
50
+ 'import/no-nodejs-modules': 'off',
51
+ 'import/no-relative-packages': 'off',
52
+ 'import/no-relative-parent-imports': 'warn',
53
+ 'import/no-restricted-paths': 'off',
54
+ 'import/no-self-import': 'error',
55
+ 'import/no-unassigned-import': 'off',
56
+ 'import/no-unresolved': ['error', {
57
+ ignore: ['^#']
58
+ }],
59
+ 'import/no-unused-modules': 'off', // TODO: Reconsider
60
+ 'import/no-useless-path-segments': ['error', {
61
+ commonjs: true,
62
+ noUselessIndex: false
63
+ }],
64
+ 'import/no-webpack-loader-syntax': 'error',
65
+ 'import/order': ['error', {
66
+ alphabetize: {
67
+ caseInsensitive: true,
68
+ order: 'asc',
69
+ orderImportKind: 'ignore'
70
+ },
71
+ distinctGroup: true,
72
+ groups: ['builtin', 'external', 'type', 'internal', 'parent', 'sibling', 'index', 'object', 'unknown'],
73
+ 'newlines-between': 'always-and-inside-groups',
74
+ pathGroups: [{
75
+ group: 'internal',
76
+ pattern: '#src/**'
77
+ }, {
78
+ group: 'parent',
79
+ pattern: '../**/styles.js',
80
+ position: 'after'
81
+ }, {
82
+ group: 'parent',
83
+ pattern: '../**/styles.css',
84
+ position: 'after'
85
+ }, {
86
+ group: 'parent',
87
+ pattern: '../**/styles.less',
88
+ position: 'after'
89
+ }, {
90
+ group: 'sibling',
91
+ pattern: './**/styles.js',
92
+ position: 'after'
93
+ }, {
94
+ group: 'sibling',
95
+ pattern: './**/styles.css',
96
+ position: 'after'
97
+ }, {
98
+ group: 'sibling',
99
+ pattern: './**/styles.less',
100
+ position: 'after'
101
+ }],
102
+ warnOnUnassignedImports: false
103
+ }],
104
+ 'import/prefer-default-export': 'off',
105
+ 'import/unambiguous': 'off' // TODO: Reconsider
106
+ }
107
+ };
@@ -0,0 +1,30 @@
1
+ export default {
2
+ rules: {
3
+ 'perfectionist/sort-intersection-types': ['error', {
4
+ fallbackSort: {
5
+ type: 'unsorted'
6
+ },
7
+ ignoreCase: true,
8
+ locales: 'en-US',
9
+ newlinesBetween: 1,
10
+ order: 'asc',
11
+ partitionByComment: true,
12
+ partitionByNewLine: true,
13
+ specialCharacters: 'keep',
14
+ type: 'alphabetical'
15
+ }],
16
+ 'perfectionist/sort-union-types': ['error', {
17
+ fallbackSort: {
18
+ type: 'unsorted'
19
+ },
20
+ ignoreCase: true,
21
+ locales: 'en-US',
22
+ newlinesBetween: 1,
23
+ order: 'asc',
24
+ partitionByComment: true,
25
+ partitionByNewLine: true,
26
+ specialCharacters: 'keep',
27
+ type: 'alphabetical'
28
+ }]
29
+ }
30
+ };
@@ -0,0 +1,10 @@
1
+ export default {
2
+ rules: {
3
+ 'sort-keys-shorthand/sort-keys-shorthand': ['error', 'asc', {
4
+ caseSensitive: false,
5
+ minKeys: 2,
6
+ natural: true,
7
+ shorthand: 'first'
8
+ }]
9
+ }
10
+ };
@@ -0,0 +1,129 @@
1
+ import memberOrderingRules from './member-ordering.js';
2
+ import namingConventionRules from './naming-convention.js';
3
+ import noRules from './no.js';
4
+ import preferRules from './prefer.js';
5
+
6
+ export default {
7
+ rules: {
8
+ '@typescript-eslint/adjacent-overload-signatures': 'error',
9
+ '@typescript-eslint/array-type': ['error', {
10
+ default: 'array-simple',
11
+ readonly: 'array-simple'
12
+ }],
13
+ '@typescript-eslint/await-thenable': 'error',
14
+ '@typescript-eslint/ban-ts-comment': ['error', {
15
+ minimumDescriptionLength: 3,
16
+ 'ts-check': true,
17
+ 'ts-expect-error': 'allow-with-description',
18
+ 'ts-ignore': true,
19
+ 'ts-nocheck': true
20
+ }],
21
+ '@typescript-eslint/ban-tslint-comment': 'error',
22
+ '@typescript-eslint/class-literal-property-style': ['error', 'fields'],
23
+ '@typescript-eslint/class-methods-use-this': 'off',
24
+ '@typescript-eslint/consistent-generic-constructors': ['error', 'type-annotation'],
25
+ '@typescript-eslint/consistent-indexed-object-style': ['error', 'record'],
26
+ '@typescript-eslint/consistent-return': 'off',
27
+ '@typescript-eslint/consistent-type-assertions': ['error', {
28
+ arrayLiteralTypeAssertions: 'never',
29
+ assertionStyle: 'as',
30
+ objectLiteralTypeAssertions: 'never'
31
+ }],
32
+ '@typescript-eslint/consistent-type-definitions': 'off', // TODO: Reconsider
33
+ '@typescript-eslint/consistent-type-exports': 'off', // TODO: Reconsider
34
+ '@typescript-eslint/consistent-type-imports': 'off', // TODO: Reconsider
35
+ '@typescript-eslint/default-param-last': 'off',
36
+ '@typescript-eslint/dot-notation': ['error', {
37
+ allowIndexSignaturePropertyAccess: false,
38
+ allowKeywords: true,
39
+ allowPrivateClassPropertyAccess: false,
40
+ allowProtectedClassPropertyAccess: false
41
+ }],
42
+ '@typescript-eslint/explicit-function-return-type': ['error', {
43
+ allowConciseArrowFunctionExpressionsStartingWithVoid: false,
44
+ allowDirectConstAssertionInArrowFunctions: true,
45
+ allowExpressions: true,
46
+ allowFunctionsWithoutTypeParameters: false,
47
+ allowHigherOrderFunctions: true,
48
+ allowIIFEs: true,
49
+ allowTypedFunctionExpressions: true
50
+ }],
51
+ '@typescript-eslint/explicit-member-accessibility': ['error', {
52
+ accessibility: 'no-public'
53
+ }],
54
+ '@typescript-eslint/explicit-module-boundary-types': ['error', {
55
+ allowArgumentsExplicitlyTypedAsAny: true,
56
+ allowDirectConstAssertionInArrowFunctions: true,
57
+ allowHigherOrderFunctions: true,
58
+ allowOverloadFunctions: false,
59
+ allowTypedFunctionExpressions: true
60
+ }],
61
+ '@typescript-eslint/init-declarations': ['error', 'always'],
62
+ '@typescript-eslint/max-params': ['warn', {
63
+ countVoidThis: false,
64
+ max: 4
65
+ }],
66
+ '@typescript-eslint/method-signature-style': ['error', 'method'],
67
+ '@typescript-eslint/non-nullable-type-assertion-style': 'error',
68
+ '@typescript-eslint/only-throw-error': ['error', {
69
+ allowRethrowing: true, // TODO: Reconsider
70
+ allowThrowingAny: false,
71
+ allowThrowingUnknown: false
72
+ }],
73
+ '@typescript-eslint/parameter-properties': ['error', {
74
+ allow: [],
75
+ prefer: 'class-property'
76
+ }],
77
+ '@typescript-eslint/promise-function-async': ['error', {
78
+ allowAny: true,
79
+ allowedPromiseNames: [],
80
+ checkArrowFunctions: true,
81
+ checkFunctionDeclarations: true,
82
+ checkFunctionExpressions: true,
83
+ checkMethodDeclarations: true
84
+ }],
85
+ '@typescript-eslint/related-getter-setter-pairs': 'error',
86
+ '@typescript-eslint/require-array-sort-compare': ['error', {
87
+ ignoreStringArrays: true
88
+ }],
89
+ '@typescript-eslint/require-await': 'error',
90
+ '@typescript-eslint/restrict-plus-operands': ['error', {
91
+ allowAny: false,
92
+ allowBoolean: false,
93
+ allowNullish: false,
94
+ allowNumberAndString: false,
95
+ allowRegExp: false,
96
+ skipCompoundAssignments: false
97
+ }],
98
+ '@typescript-eslint/restrict-template-expressions': ['error', {
99
+ allowAny: false,
100
+ allowBoolean: true,
101
+ allowNever: false,
102
+ allowNullish: false,
103
+ allowNumber: true,
104
+ allowRegExp: false
105
+ }],
106
+ '@typescript-eslint/return-await': ['error', 'always'],
107
+ '@typescript-eslint/strict-boolean-expressions': 'off',
108
+ '@typescript-eslint/switch-exhaustiveness-check': ['error', {
109
+ allowDefaultCaseForExhaustiveSwitch: true,
110
+ considerDefaultExhaustiveForUnions: true,
111
+ requireDefaultForNonUnion: true
112
+ }],
113
+ '@typescript-eslint/triple-slash-reference': ['error', {
114
+ lib: 'never',
115
+ path: 'never',
116
+ types: 'never'
117
+ }],
118
+ '@typescript-eslint/unbound-method': 'off', // TODO: Reconsider
119
+ '@typescript-eslint/unified-signatures': ['error', {
120
+ ignoreDifferentlyNamedParameters: false,
121
+ ignoreOverloadsWithDifferentJSDoc: false
122
+ }],
123
+ '@typescript-eslint/use-unknown-in-catch-callback-variable': 'error',
124
+ ...memberOrderingRules,
125
+ ...namingConventionRules,
126
+ ...noRules,
127
+ ...preferRules
128
+ }
129
+ };
@@ -0,0 +1,151 @@
1
+ export default {
2
+ '@typescript-eslint/member-ordering': ['error', {
3
+ default: {
4
+ memberTypes: [
5
+ // Index signature
6
+ 'signature',
7
+ 'readonly-signature',
8
+
9
+ // Fields
10
+ 'public-static-field',
11
+ 'static-field',
12
+ 'public-static-readonly-field',
13
+ 'static-readonly-field',
14
+
15
+ 'protected-static-field',
16
+ 'protected-static-readonly-field',
17
+
18
+ 'private-static-field',
19
+ 'private-static-readonly-field',
20
+ '#private-static-field',
21
+ '#private-static-readonly-field',
22
+
23
+ 'public-abstract-field',
24
+ 'abstract-field',
25
+ 'public-abstract-readonly-field',
26
+ 'abstract-readonly-field',
27
+
28
+ 'decorated-field',
29
+ 'public-decorated-field',
30
+ 'public-instance-field',
31
+ 'instance-field',
32
+ 'public-field',
33
+ 'field',
34
+ 'public-decorated-readonly-field',
35
+ 'decorated-readonly-field',
36
+ 'public-instance-readonly-field',
37
+ 'instance-readonly-field',
38
+ 'public-readonly-field',
39
+ 'readonly-field',
40
+
41
+ 'protected-abstract-field',
42
+ 'protected-abstract-readonly-field',
43
+
44
+ 'protected-decorated-field',
45
+ 'protected-instance-field',
46
+ 'protected-field',
47
+ 'protected-decorated-readonly-field',
48
+ 'protected-instance-readonly-field',
49
+ 'protected-readonly-field',
50
+
51
+ 'private-decorated-field',
52
+ 'private-instance-field',
53
+ 'private-field',
54
+ '#private-instance-field',
55
+ '#private-field',
56
+ 'private-decorated-readonly-field',
57
+ 'private-instance-readonly-field',
58
+ 'private-readonly-field',
59
+ '#private-instance-readonly-field',
60
+ '#private-readonly-field',
61
+
62
+ // Static initialization
63
+ 'static-initialization',
64
+
65
+ // Constructors
66
+ 'public-constructor',
67
+ 'protected-constructor',
68
+ 'private-constructor',
69
+
70
+ // Getters
71
+ 'public-static-get',
72
+ 'static-get',
73
+ 'protected-static-get',
74
+ 'private-static-get',
75
+ '#private-static-get',
76
+
77
+ 'public-abstract-get',
78
+ 'abstract-get',
79
+
80
+ 'public-decorated-get',
81
+ 'decorated-get',
82
+ 'public-instance-get',
83
+ 'public-get',
84
+ 'instance-get',
85
+ 'get',
86
+
87
+ 'protected-abstract-get',
88
+
89
+ 'protected-decorated-get',
90
+ 'protected-instance-get',
91
+ 'protected-get',
92
+
93
+ 'private-decorated-get',
94
+ 'private-instance-get',
95
+ 'private-get',
96
+ '#private-instance-get',
97
+ '#private-get',
98
+
99
+ // Setters
100
+ 'public-static-set',
101
+ 'static-set',
102
+ 'protected-static-set',
103
+ 'private-static-set',
104
+ '#private-static-set',
105
+
106
+ 'public-abstract-set',
107
+ 'abstract-set',
108
+
109
+ 'public-decorated-set',
110
+ 'decorated-set',
111
+ 'public-instance-set',
112
+ 'public-set',
113
+ 'instance-set',
114
+ 'set',
115
+
116
+ 'protected-abstract-set',
117
+
118
+ 'protected-decorated-set',
119
+ 'protected-instance-set',
120
+ 'protected-set',
121
+
122
+ 'private-decorated-set',
123
+ 'private-instance-set',
124
+ 'private-set',
125
+ '#private-instance-set',
126
+ '#private-set',
127
+
128
+ // Methods
129
+ 'public-static-method',
130
+ 'protected-static-method',
131
+ 'private-static-method',
132
+ '#private-static-method',
133
+
134
+ 'public-abstract-method',
135
+
136
+ 'public-decorated-method',
137
+ 'public-instance-method',
138
+
139
+ 'protected-abstract-method',
140
+
141
+ 'protected-decorated-method',
142
+ 'protected-instance-method',
143
+
144
+ 'private-decorated-method',
145
+ 'private-instance-method',
146
+ '#private-instance-method'
147
+ ],
148
+ order: 'natural-case-insensitive'
149
+ }
150
+ }]
151
+ };
@@ -0,0 +1,73 @@
1
+ export default {
2
+ '@typescript-eslint/naming-convention': ['error', {
3
+ format: ['camelCase'],
4
+ leadingUnderscore: 'forbid',
5
+ selector: [
6
+ 'autoAccessor',
7
+ 'classicAccessor',
8
+ 'classMethod',
9
+ 'classProperty',
10
+ 'parameterProperty'
11
+ ],
12
+ trailingUnderscore: 'forbid'
13
+ }, {
14
+ format: ['camelCase'],
15
+ leadingUnderscore: 'forbid',
16
+ selector: [
17
+ 'autoAccessor',
18
+ 'classicAccessor',
19
+ 'classMethod',
20
+ 'classProperty',
21
+ 'function',
22
+ 'objectLiteralMethod',
23
+ 'parameter',
24
+ 'parameterProperty',
25
+ 'typeMethod',
26
+ 'typeProperty',
27
+ 'variable'
28
+ ],
29
+ trailingUnderscore: 'forbid'
30
+ }, {
31
+ format: ['camelCase', 'PascalCase'],
32
+ leadingUnderscore: 'forbid',
33
+ selector: [
34
+ 'objectLiteralProperty'
35
+ ],
36
+ trailingUnderscore: 'forbid'
37
+ }, {
38
+ format: null,
39
+ leadingUnderscore: 'forbid',
40
+ modifiers: ['requiresQuotes'],
41
+ selector: [
42
+ 'objectLiteralProperty'
43
+ ],
44
+ trailingUnderscore: 'forbid'
45
+ }, {
46
+ format: ['camelCase', 'UPPER_CASE'],
47
+ leadingUnderscore: 'forbid',
48
+ modifiers: ['const', 'global'],
49
+ selector: [
50
+ 'variable'
51
+ ],
52
+ trailingUnderscore: 'forbid'
53
+ }, {
54
+ format: ['PascalCase'],
55
+ leadingUnderscore: 'forbid',
56
+ selector: [
57
+ 'class',
58
+ 'enum',
59
+ 'enumMember',
60
+ 'interface',
61
+ 'typeAlias',
62
+ 'typeParameter'
63
+ ],
64
+ trailingUnderscore: 'forbid'
65
+ }, {
66
+ format: ['camelCase', 'PascalCase'],
67
+ leadingUnderscore: 'forbid',
68
+ selector: [
69
+ 'import'
70
+ ],
71
+ trailingUnderscore: 'forbid'
72
+ }]
73
+ };
@@ -0,0 +1,150 @@
1
+ export default {
2
+ '@typescript-eslint/no-array-constructor': 'error',
3
+ '@typescript-eslint/no-array-delete': 'error',
4
+ '@typescript-eslint/no-base-to-string': 'error',
5
+ '@typescript-eslint/no-confusing-non-null-assertion': 'error',
6
+ '@typescript-eslint/no-confusing-void-expression': ['error', {
7
+ ignoreArrowShorthand: false,
8
+ ignoreVoidOperator: true,
9
+ ignoreVoidReturningFunctions: false
10
+ }],
11
+ '@typescript-eslint/no-deprecated': 'off',
12
+ '@typescript-eslint/no-dupe-class-members': 'error',
13
+ '@typescript-eslint/no-duplicate-enum-values': 'error',
14
+ '@typescript-eslint/no-duplicate-type-constituents': ['error', {
15
+ ignoreIntersections: false,
16
+ ignoreUnions: false
17
+ }],
18
+ '@typescript-eslint/no-dynamic-delete': 'error',
19
+ '@typescript-eslint/no-empty-function': ['error', {
20
+ allow: ['overrideMethods', 'private-constructors', 'protected-constructors']
21
+ }],
22
+ '@typescript-eslint/no-empty-object-type': ['error', {
23
+ allowInterfaces: 'never',
24
+ allowObjectTypes: 'never'
25
+ }],
26
+ '@typescript-eslint/no-explicit-any': ['error', {
27
+ fixToUnknown: false,
28
+ ignoreRestArgs: false
29
+ }],
30
+ '@typescript-eslint/no-extra-non-null-assertion': 'error',
31
+ '@typescript-eslint/no-extraneous-class': ['error', {
32
+ allowConstructorOnly: false,
33
+ allowEmpty: false,
34
+ allowStaticOnly: false,
35
+ allowWithDecorator: false
36
+ }],
37
+ '@typescript-eslint/no-floating-promises': ['error', {
38
+ allowForKnownSafeCalls: [],
39
+ allowForKnownSafePromises: [],
40
+ checkThenables: false,
41
+ ignoreIIFE: true,
42
+ ignoreVoid: true
43
+ }],
44
+ '@typescript-eslint/no-for-in-array': 'error',
45
+ '@typescript-eslint/no-implied-eval': 'error',
46
+ '@typescript-eslint/no-import-type-side-effects': 'error',
47
+ '@typescript-eslint/no-inferrable-types': 'off',
48
+ '@typescript-eslint/no-invalid-this': ['error', {
49
+ capIsConstructor: true
50
+ }],
51
+ '@typescript-eslint/no-invalid-void-type': ['error', {
52
+ allowAsThisParameter: false,
53
+ allowInGenericTypeArguments: true
54
+ }],
55
+ '@typescript-eslint/no-loop-func': 'error',
56
+ '@typescript-eslint/no-magic-numbers': 'off',
57
+ '@typescript-eslint/no-meaningless-void-operator': ['error', {
58
+ checkNever: true
59
+ }],
60
+ '@typescript-eslint/no-misused-new': 'error',
61
+ '@typescript-eslint/no-misused-promises': ['error', {
62
+ checksConditionals: true,
63
+ checksSpreads: true,
64
+ checksVoidReturn: true
65
+ }],
66
+ '@typescript-eslint/no-misused-spread': ['error', {
67
+ allow: []
68
+ }],
69
+ '@typescript-eslint/no-mixed-enums': 'error',
70
+ '@typescript-eslint/no-namespace': ['error', {
71
+ allowDeclarations: false,
72
+ allowDefinitionFiles: true
73
+ }],
74
+ '@typescript-eslint/no-non-null-asserted-nullish-coalescing': 'error',
75
+ '@typescript-eslint/no-non-null-asserted-optional-chain': 'error',
76
+ '@typescript-eslint/no-non-null-assertion': 'warn',
77
+ '@typescript-eslint/no-redeclare': ['error', {
78
+ builtinGlobals: true,
79
+ ignoreDeclarationMerge: false
80
+ }],
81
+ '@typescript-eslint/no-redundant-type-constituents': 'error',
82
+ '@typescript-eslint/no-require-imports': ['error', {
83
+ allow: [],
84
+ allowAsImport: false
85
+ }],
86
+ '@typescript-eslint/no-restricted-imports': 'off',
87
+ '@typescript-eslint/no-restricted-types': 'off',
88
+ '@typescript-eslint/no-shadow': ['error', {
89
+ builtinGlobals: false,
90
+ hoist: 'functions-and-types',
91
+ ignoreFunctionTypeParameterNameValueShadow: false,
92
+ ignoreOnInitialization: false,
93
+ ignoreTypeValueShadow: false
94
+ }],
95
+ '@typescript-eslint/no-this-alias': ['error', {
96
+ allowDestructuring: true,
97
+ allowedNames: []
98
+ }],
99
+ '@typescript-eslint/no-unnecessary-condition': ['error', {
100
+ allowConstantLoopConditions: 'only-allowed-literals',
101
+ checkTypePredicates: false
102
+ }],
103
+ '@typescript-eslint/no-unnecessary-parameter-property-assignment': 'error',
104
+ '@typescript-eslint/no-unnecessary-qualifier': 'error',
105
+ '@typescript-eslint/no-unnecessary-template-expression': 'error',
106
+ '@typescript-eslint/no-unnecessary-type-arguments': 'off',
107
+ '@typescript-eslint/no-unnecessary-type-assertion': ['error', {
108
+ checkLiteralConstAssertions: true,
109
+ typesToIgnore: []
110
+ }],
111
+ '@typescript-eslint/no-unnecessary-type-constraint': 'error',
112
+ '@typescript-eslint/no-unnecessary-type-conversion': 'error',
113
+ '@typescript-eslint/no-unnecessary-type-parameters': 'error',
114
+ '@typescript-eslint/no-unsafe-argument': 'error',
115
+ '@typescript-eslint/no-unsafe-assignment': 'error',
116
+ '@typescript-eslint/no-unsafe-call': 'error',
117
+ '@typescript-eslint/no-unsafe-declaration-merging': 'error',
118
+ '@typescript-eslint/no-unsafe-enum-comparison': 'error',
119
+ '@typescript-eslint/no-unsafe-function-type': 'error',
120
+ '@typescript-eslint/no-unsafe-member-access': ['error', {
121
+ allowOptionalChaining: false
122
+ }],
123
+ '@typescript-eslint/no-unsafe-return': 'error',
124
+ '@typescript-eslint/no-unsafe-type-assertion': 'error',
125
+ '@typescript-eslint/no-unsafe-unary-minus': 'error',
126
+ '@typescript-eslint/no-unused-expressions': ['error', {
127
+ allowShortCircuit: false,
128
+ allowTaggedTemplates: false,
129
+ allowTernary: false,
130
+ enforceForJSX: true
131
+ }],
132
+ '@typescript-eslint/no-unused-private-class-members': 'error',
133
+ '@typescript-eslint/no-unused-vars': ['warn', {
134
+ args: 'after-used',
135
+ caughtErrors: 'all',
136
+ ignoreRestSiblings: true,
137
+ vars: 'all'
138
+ }],
139
+ '@typescript-eslint/no-use-before-define': ['error', {
140
+ classes: true,
141
+ enums: true,
142
+ functions: false,
143
+ ignoreTypeReferences: true,
144
+ typedefs: true,
145
+ variables: true
146
+ }],
147
+ '@typescript-eslint/no-useless-constructor': 'error',
148
+ '@typescript-eslint/no-useless-empty-export': 'error',
149
+ '@typescript-eslint/no-wrapper-object-types': 'error'
150
+ };
@@ -0,0 +1,56 @@
1
+ export default {
2
+ '@typescript-eslint/prefer-as-const': 'error',
3
+ '@typescript-eslint/prefer-destructuring': ['error', {
4
+ array: true,
5
+ object: true
6
+ }, {
7
+ enforceForDeclarationWithTypeAnnotation: false,
8
+ enforceForRenamedProperties: false
9
+ }],
10
+ '@typescript-eslint/prefer-enum-initializers': 'error',
11
+ '@typescript-eslint/prefer-find': 'error',
12
+ '@typescript-eslint/prefer-for-of': 'error',
13
+ '@typescript-eslint/prefer-function-type': 'error',
14
+ '@typescript-eslint/prefer-includes': 'error',
15
+ '@typescript-eslint/prefer-literal-enum-member': ['error', {
16
+ allowBitwiseExpressions: false
17
+ }],
18
+ '@typescript-eslint/prefer-namespace-keyword': 'error',
19
+ '@typescript-eslint/prefer-nullish-coalescing': ['error', {
20
+ ignoreBooleanCoercion: false,
21
+ ignoreConditionalTests: true,
22
+ ignoreIfStatements: false,
23
+ ignoreMixedLogicalExpressions: true,
24
+ ignorePrimitives: {
25
+ bigint: false,
26
+ boolean: false,
27
+ number: false,
28
+ string: false
29
+ },
30
+ ignoreTernaryTests: false
31
+ }],
32
+ '@typescript-eslint/prefer-optional-chain': ['error', {
33
+ checkAny: true,
34
+ checkBigInt: true,
35
+ checkBoolean: true,
36
+ checkNumber: true,
37
+ checkString: true,
38
+ checkUnknown: true,
39
+ requireNullish: true
40
+ }],
41
+ '@typescript-eslint/prefer-promise-reject-errors': ['error', {
42
+ allowEmptyReject: false,
43
+ allowThrowingAny: false,
44
+ allowThrowingUnknown: false
45
+ }],
46
+ '@typescript-eslint/prefer-readonly': ['error', {
47
+ onlyInlineLambdas: false
48
+ }],
49
+ '@typescript-eslint/prefer-readonly-parameter-types': 'off',
50
+ '@typescript-eslint/prefer-reduce-type-parameter': 'error',
51
+ '@typescript-eslint/prefer-regexp-exec': 'off',
52
+ '@typescript-eslint/prefer-return-this-type': 'error',
53
+ '@typescript-eslint/prefer-string-starts-ends-with': ['error', {
54
+ allowSingleElementEquality: 'never'
55
+ }]
56
+ };
@@ -0,0 +1,223 @@
1
+ export default {
2
+ 'no-alert': 'error',
3
+ 'no-array-constructor': 'off', // NOTE: See TypeScript rule extending this one
4
+ 'no-async-promise-executor': 'error',
5
+ 'no-await-in-loop': 'off',
6
+ 'no-bitwise': ['warn', {
7
+ allow: [],
8
+ int32Hint: false
9
+ }],
10
+ 'no-caller': 'error',
11
+ 'no-case-declarations': 'error',
12
+ 'no-class-assign': 'error',
13
+ 'no-compare-neg-zero': 'error',
14
+ 'no-cond-assign': ['error', 'always'],
15
+ 'no-confusing-arrow': ['error', {
16
+ allowParens: true,
17
+ onlyOneSimpleParam: false
18
+ }],
19
+ 'no-console': 'off',
20
+ 'no-const-assign': 'error',
21
+ 'no-constant-binary-expression': 'error',
22
+ 'no-constant-condition': ['error', {
23
+ checkLoops: false
24
+ }],
25
+ 'no-constructor-return': 'error',
26
+ 'no-continue': 'off',
27
+ 'no-control-regex': 'error',
28
+ 'no-debugger': 'error',
29
+ 'no-delete-var': 'error',
30
+ 'no-div-regex': 'off',
31
+ 'no-dupe-args': 'error',
32
+ 'no-dupe-class-members': 'off', // NOTE: See TypeScript rule extending this one
33
+ 'no-dupe-else-if': 'error',
34
+ 'no-dupe-keys': 'error',
35
+ 'no-duplicate-case': 'error',
36
+ 'no-duplicate-imports': ['error', {
37
+ includeExports: true
38
+ }],
39
+ 'no-else-return': ['error', {
40
+ allowElseIf: true
41
+ }],
42
+ 'no-empty': ['error', {
43
+ allowEmptyCatch: false
44
+ }],
45
+ 'no-empty-character-class': 'error',
46
+ 'no-empty-function': 'off', // NOTE: See TypeScript rule extending this one
47
+ 'no-empty-pattern': 'error',
48
+ 'no-empty-static-block': 'error',
49
+ 'no-eq-null': 'error',
50
+ 'no-eval': ['error', {
51
+ allowIndirect: false
52
+ }],
53
+ 'no-ex-assign': 'error',
54
+ 'no-extend-native': ['error', {
55
+ exceptions: []
56
+ }],
57
+ 'no-extra-bind': 'error',
58
+ 'no-extra-boolean-cast': ['error', {
59
+ enforceForLogicalOperands: true
60
+ }],
61
+ 'no-extra-label': 'error',
62
+ 'no-extra-parens': 'off', // TODO: Reconsider
63
+ 'no-extra-semi': 'error',
64
+ 'no-fallthrough': ['error', {
65
+ allowEmptyCase: false,
66
+ commentPattern: 'break[\\s\\w]*omitted'
67
+ }],
68
+ 'no-floating-decimal': 'error',
69
+ 'no-func-assign': 'error',
70
+ 'no-global-assign': ['error', {
71
+ exceptions: []
72
+ }],
73
+ 'no-implicit-coercion': ['error', {
74
+ allow: [],
75
+ boolean: true,
76
+ disallowTemplateShorthand: true,
77
+ number: true,
78
+ string: true
79
+ }],
80
+ 'no-implicit-globals': ['error', {
81
+ lexicalBindings: false
82
+ }],
83
+ 'no-implied-eval': 'off', // NOTE: See TypeScript rule extending this one
84
+ 'no-import-assign': 'error',
85
+ 'no-inline-comments': 'off',
86
+ 'no-inner-declarations': ['error', 'both'],
87
+ 'no-invalid-regexp': ['error'],
88
+ 'no-invalid-this': 'off', // NOTE: See TypeScript rule extending this one
89
+ 'no-irregular-whitespace': ['error', {
90
+ skipComments: true,
91
+ skipRegExps: true,
92
+ skipStrings: true,
93
+ skipTemplates: true
94
+ }],
95
+ 'no-iterator': 'error',
96
+ 'no-label-var': 'error',
97
+ 'no-labels': 'off',
98
+ 'no-lone-blocks': 'off',
99
+ 'no-lonely-if': 'error',
100
+ 'no-loop-func': 'off', // NOTE: See TypeScript rule extending this one
101
+ 'no-loss-of-precision': 'error',
102
+ 'no-magic-numbers': 'off',
103
+ 'no-misleading-character-class': 'error',
104
+ 'no-mixed-operators': ['error', {
105
+ allowSamePrecedence: true
106
+ }],
107
+ 'no-mixed-spaces-and-tabs': 'error',
108
+ 'no-multi-assign': ['error', {
109
+ ignoreNonDeclaration: false
110
+ }],
111
+ 'no-multi-spaces': ['error', {
112
+ exceptions: {
113
+ Property: false
114
+ }
115
+ }],
116
+ 'no-multi-str': 'error',
117
+ 'no-multiple-empty-lines': ['error', {
118
+ max: 1,
119
+ maxBOF: 0,
120
+ maxEOF: 1
121
+ }],
122
+ 'no-negated-condition': 'error',
123
+ 'no-nested-ternary': 'off',
124
+ 'no-new': 'error',
125
+ 'no-new-func': 'error',
126
+ 'no-new-native-nonconstructor': 'error',
127
+ 'no-new-object': 'error',
128
+ 'no-new-symbol': 'error',
129
+ 'no-new-wrappers': 'error',
130
+ 'no-nonoctal-decimal-escape': 'error',
131
+ 'no-obj-calls': 'error',
132
+ 'no-octal': 'error',
133
+ 'no-octal-escape': 'error',
134
+ 'no-param-reassign': 'off',
135
+ 'no-plusplus': 'off',
136
+ 'no-promise-executor-return': 'error',
137
+ 'no-proto': 'error',
138
+ 'no-prototype-builtins': 'error',
139
+ 'no-redeclare': 'off', // NOTE: See TypeScript rule extending this one
140
+ 'no-regex-spaces': 'error',
141
+ 'no-restricted-exports': 'off',
142
+ 'no-restricted-globals': 'off',
143
+ 'no-restricted-imports': 'off',
144
+ 'no-restricted-properties': 'off',
145
+ 'no-restricted-syntax': 'off',
146
+ 'no-return-assign': ['error', 'always'],
147
+ 'no-return-await': 'off',
148
+ 'no-script-url': 'error',
149
+ 'no-self-assign': ['error', {
150
+ props: true
151
+ }],
152
+ 'no-self-compare': 'error',
153
+ 'no-sequences': ['error', {
154
+ allowInParentheses: false
155
+ }],
156
+ 'no-setter-return': 'error',
157
+ 'no-shadow': 'off', // NOTE: See TypeScript rule extending this one
158
+ 'no-shadow-restricted-names': 'error',
159
+ 'no-sparse-arrays': 'error',
160
+ 'no-tabs': ['error', {
161
+ allowIndentationTabs: false
162
+ }],
163
+ 'no-template-curly-in-string': 'warn',
164
+ 'no-ternary': 'off',
165
+ 'no-this-before-super': 'error',
166
+ 'no-throw-literal': 'off', // NOTE: See TypeScript rule extending this one
167
+ 'no-trailing-spaces': ['error', {
168
+ ignoreComments: false,
169
+ skipBlankLines: false
170
+ }],
171
+ 'no-undef': ['error', {
172
+ typeof: true
173
+ }],
174
+ 'no-undef-init': 'error',
175
+ 'no-undefined': 'off',
176
+ 'no-underscore-dangle': 'off',
177
+ 'no-unexpected-multiline': 'error',
178
+ 'no-unmodified-loop-condition': 'warn',
179
+ 'no-unneeded-ternary': ['error', {
180
+ defaultAssignment: false
181
+ }],
182
+ 'no-unreachable': 'error',
183
+ 'no-unreachable-loop': ['error', {
184
+ ignore: []
185
+ }],
186
+ 'no-unsafe-finally': 'error',
187
+ 'no-unsafe-negation': ['error', {
188
+ enforceForOrderingRelations: true
189
+ }],
190
+ 'no-unsafe-optional-chaining': ['error', {
191
+ disallowArithmeticOperators: true
192
+ }],
193
+ 'no-unused-expressions': 'off', // NOTE: See TypeScript rule extending this one
194
+ 'no-unused-labels': 'error',
195
+ 'no-unused-private-class-members': 'off', // NOTE: See TypeScript rule extending this one
196
+ 'no-unused-vars': 'off', // NOTE: See TypeScript rule extending this one
197
+ 'no-use-before-define': 'off', // NOTE: See TypeScript rule extending this one
198
+ 'no-useless-backreference': 'error',
199
+ 'no-useless-call': 'error',
200
+ 'no-useless-catch': 'error',
201
+ 'no-useless-computed-key': ['error', {
202
+ enforceForClassMembers: true
203
+ }],
204
+ 'no-useless-concat': 'error',
205
+ 'no-useless-constructor': 'off', // NOTE: See TypeScript rule extending this one
206
+ 'no-useless-escape': 'error',
207
+ 'no-useless-rename': ['error', {
208
+ ignoreDestructuring: false,
209
+ ignoreExport: false,
210
+ ignoreImport: false
211
+ }],
212
+ 'no-useless-return': 'error',
213
+ 'no-var': 'error',
214
+ 'no-void': ['error', {
215
+ allowAsStatement: false
216
+ }],
217
+ 'no-warning-comments': ['warn', {
218
+ location: 'start',
219
+ terms: ['fix', 'fixme', 'todo']
220
+ }],
221
+ 'no-whitespace-before-property': 'error',
222
+ 'no-with': 'error'
223
+ };