@fullstacksjs/eslint-config 15.1.0 → 15.3.0
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 +2 -2
- package/dist/index.mjs +166 -194
- package/package.json +19 -21
- package/src/modules/base.mjs +43 -1
- package/src/modules/cypress.mjs +3 -0
- package/src/modules/imports.mjs +2 -0
- package/src/modules/jest.mjs +22 -7
- package/src/modules/next.mjs +1 -0
- package/src/modules/node.mjs +1 -1
- package/src/modules/playwright.mjs +9 -0
- package/src/modules/react.mjs +48 -47
- package/src/modules/storybook.mjs +1 -1
- package/src/modules/typescript.mjs +15 -9
- package/src/modules/vitest.mjs +17 -0
- package/src/utils/nextAllowExportNames.mjs +3 -0
package/dist/index.mjs
CHANGED
|
@@ -4,6 +4,7 @@ import { isPackageExists } from "local-pkg";
|
|
|
4
4
|
import { mergeConfigs } from "eslint-flat-config-utils";
|
|
5
5
|
import globals from "globals";
|
|
6
6
|
import plugin from "eslint-plugin-cypress";
|
|
7
|
+
import { includeIgnoreFile } from "@eslint/config-helpers";
|
|
7
8
|
import fs from "node:fs";
|
|
8
9
|
import path from "node:path";
|
|
9
10
|
import plugin$1 from "eslint-plugin-import-x";
|
|
@@ -15,7 +16,7 @@ import plugin$6 from "eslint-plugin-playwright";
|
|
|
15
16
|
import plugin$7 from "eslint-plugin-prettier";
|
|
16
17
|
import plugin$8 from "eslint-plugin-promise";
|
|
17
18
|
import reactPlugin from "@eslint-react/eslint-plugin";
|
|
18
|
-
import
|
|
19
|
+
import jsxA11yX from "eslint-plugin-jsx-a11y-x";
|
|
19
20
|
import { reactRefresh } from "eslint-plugin-react-refresh";
|
|
20
21
|
import { parser, plugin as plugin$9 } from "typescript-eslint";
|
|
21
22
|
import * as plugin$12 from "eslint-plugin-regexp";
|
|
@@ -78,10 +79,16 @@ function base(options = {}) {
|
|
|
78
79
|
rules: {
|
|
79
80
|
"accessor-pairs": "error",
|
|
80
81
|
"array-callback-return": "error",
|
|
82
|
+
"arrow-body-style": "off",
|
|
81
83
|
"block-scoped-var": "error",
|
|
82
84
|
"camelcase": ["warn", { properties: "always" }],
|
|
85
|
+
"capitalized-comments": "off",
|
|
86
|
+
"class-methods-use-this": "off",
|
|
83
87
|
"complexity": ["error", 14],
|
|
88
|
+
"consistent-return": "off",
|
|
89
|
+
"consistent-this": "off",
|
|
84
90
|
"constructor-super": "error",
|
|
91
|
+
"curly": "off",
|
|
85
92
|
"default-case-last": "error",
|
|
86
93
|
"default-case": "error",
|
|
87
94
|
"default-param-last": "warn",
|
|
@@ -90,8 +97,15 @@ function base(options = {}) {
|
|
|
90
97
|
"for-direction": "error",
|
|
91
98
|
"func-name-matching": "error",
|
|
92
99
|
"func-names": "error",
|
|
100
|
+
"func-style": "off",
|
|
93
101
|
"getter-return": ["error", { allowImplicit: true }],
|
|
94
102
|
"guard-for-in": "error",
|
|
103
|
+
"id-denylist": "off",
|
|
104
|
+
"id-length": "off",
|
|
105
|
+
"id-match": "off",
|
|
106
|
+
"init-declarations": "off",
|
|
107
|
+
"logical-assignment-operators": "off",
|
|
108
|
+
"max-classes-per-file": "off",
|
|
95
109
|
"max-depth": ["error", 4],
|
|
96
110
|
"max-lines-per-function": ["error", 150],
|
|
97
111
|
"max-lines": ["error", {
|
|
@@ -102,6 +116,7 @@ function base(options = {}) {
|
|
|
102
116
|
"max-nested-callbacks": ["error", 7],
|
|
103
117
|
"max-params": ["error", 3],
|
|
104
118
|
"max-statements": ["error", 40],
|
|
119
|
+
"new-cap": "off",
|
|
105
120
|
"no-alert": "error",
|
|
106
121
|
"no-array-constructor": "error",
|
|
107
122
|
"no-await-in-loop": "error",
|
|
@@ -115,6 +130,7 @@ function base(options = {}) {
|
|
|
115
130
|
"no-constant-binary-expression": "warn",
|
|
116
131
|
"no-constant-condition": "error",
|
|
117
132
|
"no-constructor-return": "error",
|
|
133
|
+
"no-continue": "off",
|
|
118
134
|
"no-control-regex": "error",
|
|
119
135
|
"no-debugger": "error",
|
|
120
136
|
"no-delete-var": "error",
|
|
@@ -125,11 +141,13 @@ function base(options = {}) {
|
|
|
125
141
|
"no-dupe-keys": "error",
|
|
126
142
|
"no-duplicate-case": "error",
|
|
127
143
|
"no-duplicate-imports": "error",
|
|
144
|
+
"no-else-return": "warn",
|
|
128
145
|
"no-empty-character-class": "error",
|
|
129
146
|
"no-empty-function": "warn",
|
|
130
147
|
"no-empty-pattern": "error",
|
|
131
148
|
"no-empty-static-block": "warn",
|
|
132
149
|
"no-empty": "error",
|
|
150
|
+
"no-eq-null": "off",
|
|
133
151
|
"no-eval": "error",
|
|
134
152
|
"no-ex-assign": "error",
|
|
135
153
|
"no-extend-native": "error",
|
|
@@ -138,9 +156,11 @@ function base(options = {}) {
|
|
|
138
156
|
"no-fallthrough": ["error", { allowEmptyCase: true }],
|
|
139
157
|
"no-func-assign": "error",
|
|
140
158
|
"no-global-assign": "error",
|
|
159
|
+
"no-implicit-coercion": "off",
|
|
141
160
|
"no-implicit-globals": "error",
|
|
142
161
|
"no-implied-eval": "error",
|
|
143
162
|
"no-import-assign": "error",
|
|
163
|
+
"no-inline-comments": "off",
|
|
144
164
|
"no-inner-declarations": "error",
|
|
145
165
|
"no-invalid-regexp": "error",
|
|
146
166
|
"no-invalid-this": "warn",
|
|
@@ -152,9 +172,12 @@ function base(options = {}) {
|
|
|
152
172
|
"no-lonely-if": "error",
|
|
153
173
|
"no-loop-func": "error",
|
|
154
174
|
"no-loss-of-precision": "warn",
|
|
175
|
+
"no-magic-numbers": "off",
|
|
155
176
|
"no-misleading-character-class": ["error", { allowEscape: true }],
|
|
156
177
|
"no-multi-assign": "error",
|
|
157
178
|
"no-multi-str": "error",
|
|
179
|
+
"no-negated-condition": "off",
|
|
180
|
+
"no-nested-ternary": "warn",
|
|
158
181
|
"no-new-func": "error",
|
|
159
182
|
"no-new-native-nonconstructor": "error",
|
|
160
183
|
"no-new-wrappers": "error",
|
|
@@ -166,12 +189,16 @@ function base(options = {}) {
|
|
|
166
189
|
"no-octal": "error",
|
|
167
190
|
"no-promise-executor-return": "error",
|
|
168
191
|
"no-proto": "error",
|
|
192
|
+
"no-prototype-builtins": "off",
|
|
169
193
|
"no-redeclare": "error",
|
|
170
194
|
"no-regex-spaces": "error",
|
|
195
|
+
"no-restricted-exports": "off",
|
|
171
196
|
"no-restricted-globals": ["error", {
|
|
172
197
|
name: "event",
|
|
173
198
|
message: "Use local parameter instead."
|
|
174
199
|
}],
|
|
200
|
+
"no-restricted-imports": "off",
|
|
201
|
+
"no-restricted-properties": "off",
|
|
175
202
|
"no-restricted-syntax": ["error", "WithStatement"],
|
|
176
203
|
"no-return-assign": "error",
|
|
177
204
|
"no-script-url": "error",
|
|
@@ -182,10 +209,15 @@ function base(options = {}) {
|
|
|
182
209
|
"no-shadow-restricted-names": "error",
|
|
183
210
|
"no-shadow": "error",
|
|
184
211
|
"no-sparse-arrays": "error",
|
|
212
|
+
"no-template-curly-in-string": "warn",
|
|
213
|
+
"no-ternary": "off",
|
|
185
214
|
"no-this-before-super": "error",
|
|
186
215
|
"no-throw-literal": "error",
|
|
216
|
+
"no-unassigned-vars": "error",
|
|
187
217
|
"no-undef-init": "error",
|
|
188
218
|
"no-undef": "error",
|
|
219
|
+
"no-undefined": "off",
|
|
220
|
+
"no-underscore-dangle": "off",
|
|
189
221
|
"no-unexpected-multiline": "error",
|
|
190
222
|
"no-unmodified-loop-condition": "error",
|
|
191
223
|
"no-unneeded-ternary": "error",
|
|
@@ -194,6 +226,7 @@ function base(options = {}) {
|
|
|
194
226
|
"no-unsafe-finally": "error",
|
|
195
227
|
"no-unsafe-negation": "error",
|
|
196
228
|
"no-unsafe-optional-chaining": "error",
|
|
229
|
+
"no-unused-expressions": "error",
|
|
197
230
|
"no-unused-labels": "error",
|
|
198
231
|
"no-unused-private-class-members": "warn",
|
|
199
232
|
"no-unused-vars": ["error", {
|
|
@@ -214,25 +247,27 @@ function base(options = {}) {
|
|
|
214
247
|
"no-useless-rename": "error",
|
|
215
248
|
"no-useless-return": "error",
|
|
216
249
|
"no-var": "warn",
|
|
250
|
+
"no-void": "off",
|
|
217
251
|
"no-warning-comments": ["warn", {
|
|
218
252
|
terms: ["fixme"],
|
|
219
253
|
location: "anywhere"
|
|
220
254
|
}],
|
|
255
|
+
"no-with": "error",
|
|
221
256
|
"object-shorthand": ["error", "properties"],
|
|
222
257
|
"one-var": ["error", {
|
|
223
258
|
uninitialized: "never",
|
|
224
259
|
initialized: "never"
|
|
225
260
|
}],
|
|
261
|
+
"operator-assignment": "off",
|
|
226
262
|
"prefer-arrow-callback": ["warn", {
|
|
227
263
|
allowNamedFunctions: true,
|
|
228
264
|
allowUnboundThis: true
|
|
229
265
|
}],
|
|
230
266
|
"prefer-const": "warn",
|
|
267
|
+
"prefer-named-capture-group": "off",
|
|
268
|
+
"prefer-object-spread": "warn",
|
|
231
269
|
"preserve-caught-error": strict(options, ["warn", { requireCatchParameter: true }]),
|
|
232
|
-
"prefer-destructuring":
|
|
233
|
-
object: true,
|
|
234
|
-
array: false
|
|
235
|
-
}],
|
|
270
|
+
"prefer-destructuring": "off",
|
|
236
271
|
"prefer-exponentiation-operator": "warn",
|
|
237
272
|
"prefer-numeric-literals": "error",
|
|
238
273
|
"prefer-object-has-own": "warn",
|
|
@@ -242,9 +277,14 @@ function base(options = {}) {
|
|
|
242
277
|
"prefer-promise-reject-errors": "warn",
|
|
243
278
|
"radix": "error",
|
|
244
279
|
"require-await": "error",
|
|
280
|
+
"require-unicode-regexp": "off",
|
|
245
281
|
"require-yield": "error",
|
|
282
|
+
"sort-imports": "off",
|
|
283
|
+
"sort-keys": "off",
|
|
284
|
+
"sort-vars": "off",
|
|
246
285
|
"strict": "error",
|
|
247
286
|
"symbol-description": "error",
|
|
287
|
+
"unicode-bom": "off",
|
|
248
288
|
"use-isnan": "error",
|
|
249
289
|
"valid-typeof": "error",
|
|
250
290
|
"vars-on-top": "error",
|
|
@@ -342,7 +382,10 @@ function cypress(options = {}) {
|
|
|
342
382
|
rules: {
|
|
343
383
|
"cypress/assertion-before-screenshot": "warn",
|
|
344
384
|
"cypress/no-assigning-return-values": "error",
|
|
385
|
+
"cypress/no-and": "off",
|
|
345
386
|
"cypress/no-async-tests": "error",
|
|
387
|
+
"cypress/no-async-before": "error",
|
|
388
|
+
"cypress/no-debug": "warn",
|
|
346
389
|
"cypress/no-force": "warn",
|
|
347
390
|
"cypress/no-pause": "error",
|
|
348
391
|
"cypress/no-unnecessary-waiting": "error",
|
|
@@ -355,128 +398,6 @@ function cypress(options = {}) {
|
|
|
355
398
|
return mergeConfigs(cypressConfig, overrides);
|
|
356
399
|
}
|
|
357
400
|
//#endregion
|
|
358
|
-
//#region node_modules/@eslint/config-helpers/dist/esm/index.js
|
|
359
|
-
/**
|
|
360
|
-
* @fileoverview Ignore file utilities for the config-helpers package.
|
|
361
|
-
* This file was forked from the source code for the compat package.
|
|
362
|
-
*
|
|
363
|
-
* @author Nicholas C. Zakas
|
|
364
|
-
* @author Kirk Waiblinger
|
|
365
|
-
*/
|
|
366
|
-
/**
|
|
367
|
-
* @typedef {object} IncludeIgnoreFileOptionsObject
|
|
368
|
-
* @property {boolean} [gitignoreResolution] Whether to interpret the contents of an ignore file relative to the config file or the ignore file.
|
|
369
|
-
* - gitignoreResolution: false (default): Interprets ignore patterns relative to the config file
|
|
370
|
-
* - gitignoreResolution: true: Interprets the ignore patterns in a file relative to the ignore file
|
|
371
|
-
* @property {string} [name] The name to give the output config object(s).
|
|
372
|
-
*/
|
|
373
|
-
/**
|
|
374
|
-
* Options for `includeIgnoreFile()`. May be provided as an object or, for
|
|
375
|
-
* legacy compatibility with `@eslint/compat`, as a string which is treated as
|
|
376
|
-
* the `name` option.
|
|
377
|
-
* @typedef {IncludeIgnoreFileOptionsObject | string} IncludeIgnoreFileOptions
|
|
378
|
-
*/
|
|
379
|
-
/**
|
|
380
|
-
* Converts an ESLint ignore pattern to a minimatch pattern.
|
|
381
|
-
* @param {string} pattern The .eslintignore or .gitignore pattern to convert.
|
|
382
|
-
* @returns {string} The converted pattern.
|
|
383
|
-
*/
|
|
384
|
-
function convertIgnorePatternToMinimatch(pattern) {
|
|
385
|
-
const isNegated = pattern.startsWith("!");
|
|
386
|
-
const negatedPrefix = isNegated ? "!" : "";
|
|
387
|
-
const patternToTest = (isNegated ? pattern.slice(1) : pattern).trimEnd();
|
|
388
|
-
if ([
|
|
389
|
-
"",
|
|
390
|
-
"**",
|
|
391
|
-
"/**",
|
|
392
|
-
"**/"
|
|
393
|
-
].includes(patternToTest)) return `${negatedPrefix}${patternToTest}`;
|
|
394
|
-
const firstIndexOfSlash = patternToTest.indexOf("/");
|
|
395
|
-
return `${negatedPrefix}${firstIndexOfSlash < 0 || firstIndexOfSlash === patternToTest.length - 1 ? "**/" : ""}${(firstIndexOfSlash === 0 ? patternToTest.slice(1) : patternToTest).replaceAll(/(?=((?:\\.|[^{(])*))\1([{(])/guy, "$1\\$2")}${patternToTest.endsWith("/**") ? "/*" : ""}`;
|
|
396
|
-
}
|
|
397
|
-
/**
|
|
398
|
-
* @param {string} ignoreFilePath
|
|
399
|
-
* @returns {string[]}
|
|
400
|
-
*/
|
|
401
|
-
function ignoreFilePathToPatterns(ignoreFilePath) {
|
|
402
|
-
return fs.readFileSync(ignoreFilePath, "utf8").split(/\r?\n/u).map((line) => line.trim()).filter((line) => line && !line.startsWith("#")).map(convertIgnorePatternToMinimatch);
|
|
403
|
-
}
|
|
404
|
-
/**
|
|
405
|
-
* Helper to parse and validate the options to `includeIgnoreFile()`
|
|
406
|
-
*
|
|
407
|
-
* @param {string | { gitignoreResolution?: unknown, name?: unknown } | undefined} options
|
|
408
|
-
* @returns {{ gitignoreResolution: boolean, name: string }}
|
|
409
|
-
*/
|
|
410
|
-
function parseOptions(options) {
|
|
411
|
-
if (typeof options === "string") return {
|
|
412
|
-
gitignoreResolution: false,
|
|
413
|
-
name: options
|
|
414
|
-
};
|
|
415
|
-
const optionsObject = options ?? {};
|
|
416
|
-
if (typeof optionsObject !== "object" || Array.isArray(optionsObject)) throw new TypeError("The options argument to `includeIgnoreFile()` should be an object or a string.");
|
|
417
|
-
const gitignoreResolution = optionsObject.gitignoreResolution ?? false;
|
|
418
|
-
if (typeof gitignoreResolution !== "boolean") throw new TypeError("The `gitignoreResolution` option must be specified a boolean or omitted");
|
|
419
|
-
const name = optionsObject.name ?? `Imported .gitignore patterns`;
|
|
420
|
-
if (typeof name !== "string") throw new TypeError("The `name` option must be specified as a string or omitted.");
|
|
421
|
-
return {
|
|
422
|
-
gitignoreResolution,
|
|
423
|
-
name
|
|
424
|
-
};
|
|
425
|
-
}
|
|
426
|
-
/**
|
|
427
|
-
* @overload
|
|
428
|
-
*
|
|
429
|
-
* Reads ignore files and returns objects with the ignore patterns.
|
|
430
|
-
*
|
|
431
|
-
* @param {string[]} ignoreFilePathArg The paths of ignore files to include.
|
|
432
|
-
* @param {IncludeIgnoreFileOptions} [options]
|
|
433
|
-
* @returns {ConfigObject[]}
|
|
434
|
-
*/
|
|
435
|
-
/**
|
|
436
|
-
* @overload
|
|
437
|
-
*
|
|
438
|
-
* Reads an ignore file and returns an object with the ignore patterns.
|
|
439
|
-
*
|
|
440
|
-
* @param {string} ignoreFilePathArg The path of the ignore file to include.
|
|
441
|
-
* @param {IncludeIgnoreFileOptions} [options]
|
|
442
|
-
* @returns {ConfigObject}
|
|
443
|
-
*/
|
|
444
|
-
/**
|
|
445
|
-
* @overload
|
|
446
|
-
*
|
|
447
|
-
* Reads an ignore file(s) and returns an object(s) with the ignore patterns.
|
|
448
|
-
*
|
|
449
|
-
* @param {string[] | string} ignoreFilePathArg The path(s) of the ignore file(s) to include.
|
|
450
|
-
* @param {IncludeIgnoreFileOptions} [options]
|
|
451
|
-
* @returns {ConfigObject[] | ConfigObject}
|
|
452
|
-
*/
|
|
453
|
-
/**
|
|
454
|
-
* Reads an ignore file(s) and returns an object(s) with the ignore patterns.
|
|
455
|
-
*
|
|
456
|
-
* @param {string[] | string} ignoreFilePathArg The path(s) of the ignore file(s) to include.
|
|
457
|
-
* @param {IncludeIgnoreFileOptions} [options]
|
|
458
|
-
* @returns {ConfigObject[] | ConfigObject}
|
|
459
|
-
*/
|
|
460
|
-
function includeIgnoreFile(ignoreFilePathArg, options) {
|
|
461
|
-
const returnSingleObject = !Array.isArray(ignoreFilePathArg);
|
|
462
|
-
const ignoreFilePaths = Array.isArray(ignoreFilePathArg) ? ignoreFilePathArg : [ignoreFilePathArg];
|
|
463
|
-
for (const ignorePath of ignoreFilePaths) {
|
|
464
|
-
if (typeof ignorePath !== "string") throw new TypeError("The first argument to `includeIgnoreFile()` should be a string or array of strings");
|
|
465
|
-
if (!path.isAbsolute(ignorePath)) throw new Error(`The ignore file location must be an absolute path. Received ${ignorePath}`);
|
|
466
|
-
}
|
|
467
|
-
const { gitignoreResolution, name } = parseOptions(options);
|
|
468
|
-
if (returnSingleObject) return {
|
|
469
|
-
name,
|
|
470
|
-
ignores: ignoreFilePathToPatterns(ignoreFilePathArg),
|
|
471
|
-
...gitignoreResolution ? { basePath: path.dirname(ignoreFilePathArg) } : {}
|
|
472
|
-
};
|
|
473
|
-
return ignoreFilePaths.map((ignoreFilePath, i) => ({
|
|
474
|
-
name: `${name} (${i})`,
|
|
475
|
-
ignores: ignoreFilePathToPatterns(ignoreFilePath),
|
|
476
|
-
...gitignoreResolution ? { basePath: path.dirname(ignoreFilePath) } : {}
|
|
477
|
-
}));
|
|
478
|
-
}
|
|
479
|
-
//#endregion
|
|
480
401
|
//#region src/utils/getGitignorePatterns.mjs
|
|
481
402
|
const warningMessage = "\x1B[38;2;229;229;14mWarning:\x1B[0m";
|
|
482
403
|
const fallbackMessage = "Falling back to default ignore patterns. You can suppress this warning by setting \x1B[48;5;234m`gitignore: false`\x1B[0m in the config.";
|
|
@@ -563,6 +484,7 @@ function imports(options = {}) {
|
|
|
563
484
|
"import/no-named-as-default": "error",
|
|
564
485
|
"import/no-named-default": "error",
|
|
565
486
|
"import/no-relative-packages": "error",
|
|
487
|
+
"import/no-rename-default": "off",
|
|
566
488
|
"import/no-self-import": "error",
|
|
567
489
|
"import/no-unresolved": ["error", { caseSensitiveStrict: true }],
|
|
568
490
|
"import/no-useless-path-segments": "warn",
|
|
@@ -595,6 +517,7 @@ function imports(options = {}) {
|
|
|
595
517
|
"import/no-unassigned-import": "off",
|
|
596
518
|
"import/no-unused-modules": "off",
|
|
597
519
|
"import/prefer-default-export": "off",
|
|
520
|
+
"import/prefer-namespace-import": "off",
|
|
598
521
|
"import/unambiguous": "off",
|
|
599
522
|
...predicate(options.typescript, {
|
|
600
523
|
"import/default": "off",
|
|
@@ -623,19 +546,23 @@ function jest(options = {}) {
|
|
|
623
546
|
rules: {
|
|
624
547
|
"jest/consistent-test-it": "off",
|
|
625
548
|
"jest/expect-expect": "off",
|
|
626
|
-
"jest/lowercase-name": "off",
|
|
627
549
|
"jest/max-nested-describe": ["error", { max: 2 }],
|
|
550
|
+
"jest/max-expects": "off",
|
|
628
551
|
"jest/no-alias-methods": "error",
|
|
629
552
|
"jest/no-commented-out-tests": "warn",
|
|
630
553
|
"jest/no-conditional-expect": "error",
|
|
631
554
|
"jest/no-conditional-in-test": "error",
|
|
632
555
|
"jest/no-confusing-set-timeout": "warn",
|
|
556
|
+
"jest/no-disabled-tests": "warn",
|
|
557
|
+
"jest/no-duplicate-hooks": "error",
|
|
633
558
|
"jest/no-done-callback": "warn",
|
|
634
|
-
"jest/no-expect-resolves": "off",
|
|
635
559
|
"jest/no-export": "error",
|
|
560
|
+
"jest/no-focused-tests": "error",
|
|
561
|
+
"jest/no-identical-title": "error",
|
|
636
562
|
...predicate(projectService, {
|
|
637
563
|
"jest/no-error-equal": "error",
|
|
638
|
-
"jest/no-unnecessary-assertion": "warn"
|
|
564
|
+
"jest/no-unnecessary-assertion": "warn",
|
|
565
|
+
"jest/valid-expect-with-promise": "error"
|
|
639
566
|
}),
|
|
640
567
|
"jest/no-hooks": "off",
|
|
641
568
|
"jest/no-interpolation-in-snapshots": "error",
|
|
@@ -645,27 +572,38 @@ function jest(options = {}) {
|
|
|
645
572
|
"jest/no-restricted-jest-methods": "off",
|
|
646
573
|
"jest/no-restricted-matchers": "error",
|
|
647
574
|
"jest/no-standalone-expect": "off",
|
|
648
|
-
"jest/no-test-callback": "off",
|
|
649
575
|
"jest/no-test-prefixes": "error",
|
|
650
576
|
"jest/no-test-return-statement": "off",
|
|
651
577
|
"jest/no-unneeded-async-expect-function": "warn",
|
|
652
|
-
"jest/
|
|
578
|
+
"jest/padding-around-after-all-blocks": "off",
|
|
579
|
+
"jest/padding-around-after-each-blocks": "off",
|
|
580
|
+
"jest/padding-around-all": "off",
|
|
581
|
+
"jest/padding-around-before-all-blocks": "off",
|
|
582
|
+
"jest/padding-around-before-each-blocks": "off",
|
|
583
|
+
"jest/padding-around-describe-blocks": "off",
|
|
584
|
+
"jest/padding-around-expect-groups": "off",
|
|
585
|
+
"jest/padding-around-test-blocks": "off",
|
|
653
586
|
"jest/prefer-called-with": "error",
|
|
587
|
+
"jest/prefer-comparison-matcher": "warn",
|
|
588
|
+
"jest/prefer-ending-with-an-expect": "off",
|
|
589
|
+
"jest/prefer-equality-matcher": "warn",
|
|
654
590
|
"jest/prefer-each": "warn",
|
|
655
591
|
"jest/prefer-expect-assertions": "off",
|
|
656
592
|
"jest/prefer-expect-resolves": "warn",
|
|
657
593
|
"jest/prefer-hooks-on-top": "error",
|
|
658
|
-
"jest/prefer-
|
|
594
|
+
"jest/prefer-hooks-in-order": "warn",
|
|
595
|
+
"jest/prefer-importing-jest-globals": "off",
|
|
596
|
+
"jest/prefer-jest-mocked": "warn",
|
|
659
597
|
"jest/prefer-lowercase-title": "off",
|
|
660
598
|
"jest/prefer-mock-promise-shorthand": "warn",
|
|
661
599
|
"jest/prefer-mock-return-shorthand": "warn",
|
|
662
600
|
"jest/prefer-snapshot-hint": "warn",
|
|
663
601
|
"jest/prefer-spy-on": "off",
|
|
664
602
|
"jest/prefer-strict-equal": "off",
|
|
665
|
-
"jest/prefer-to-be-null": "off",
|
|
666
|
-
"jest/prefer-to-be-undefined": "off",
|
|
667
603
|
"jest/prefer-to-be": "warn",
|
|
668
604
|
"jest/prefer-to-contain": "warn",
|
|
605
|
+
"jest/prefer-to-have-been-called": "warn",
|
|
606
|
+
"jest/prefer-to-have-been-called-times": "warn",
|
|
669
607
|
"jest/prefer-to-have-length": "warn",
|
|
670
608
|
"jest/prefer-todo": "warn",
|
|
671
609
|
"jest/require-hook": "off",
|
|
@@ -707,6 +645,7 @@ function next(options = {}) {
|
|
|
707
645
|
"next/no-head-import-in-document": "warn",
|
|
708
646
|
"next/no-html-link-for-pages": "warn",
|
|
709
647
|
"next/no-img-element": "warn",
|
|
648
|
+
"next/no-location-assign-relative-destination": "error",
|
|
710
649
|
"next/no-page-custom-font": "warn",
|
|
711
650
|
"next/no-script-component-in-head": "warn",
|
|
712
651
|
"next/no-styled-jsx-in-document": "warn",
|
|
@@ -765,7 +704,7 @@ function node(options = {}) {
|
|
|
765
704
|
"n/prefer-global/timers": "warn",
|
|
766
705
|
"n/prefer-global/url-search-params": "warn",
|
|
767
706
|
"n/prefer-global/url": "warn",
|
|
768
|
-
"/prefer-import/assert-strict": "warn",
|
|
707
|
+
"n/prefer-import/assert-strict": "warn",
|
|
769
708
|
"n/prefer-node-protocol": "warn",
|
|
770
709
|
"n/prefer-process-get-builtin-module": "warn",
|
|
771
710
|
"n/prefer-promises/dns": "warn",
|
|
@@ -864,6 +803,7 @@ function playwright(options = {}) {
|
|
|
864
803
|
"playwright/max-expects": "off",
|
|
865
804
|
"playwright/max-nested-describe": ["warn", { max: 5 }],
|
|
866
805
|
"playwright/missing-playwright-await": "error",
|
|
806
|
+
"playwright/no-action-timeout": "warn",
|
|
867
807
|
"playwright/no-commented-out-tests": "warn",
|
|
868
808
|
"playwright/no-conditional-expect": "warn",
|
|
869
809
|
"playwright/no-conditional-in-test": "warn",
|
|
@@ -871,10 +811,13 @@ function playwright(options = {}) {
|
|
|
871
811
|
"playwright/no-duplicate-slow": "off",
|
|
872
812
|
"playwright/no-element-handle": "warn",
|
|
873
813
|
"playwright/no-eval": "warn",
|
|
814
|
+
"playwright/no-export": "warn",
|
|
874
815
|
"playwright/no-focused-test": "warn",
|
|
875
816
|
"playwright/no-force-option": "warn",
|
|
876
817
|
"playwright/no-get-by-title": "off",
|
|
877
818
|
"playwright/no-hooks": "off",
|
|
819
|
+
"playwright/no-identical-title": "error",
|
|
820
|
+
"playwright/no-magic-timeouts": "off",
|
|
878
821
|
"playwright/no-nested-step": "warn",
|
|
879
822
|
"playwright/no-networkidle": "warn",
|
|
880
823
|
"playwright/no-nth-methods": "off",
|
|
@@ -886,6 +829,9 @@ function playwright(options = {}) {
|
|
|
886
829
|
"playwright/no-skipped-test": "warn",
|
|
887
830
|
"playwright/no-slowed-test": "warn",
|
|
888
831
|
"playwright/no-standalone-expect": "warn",
|
|
832
|
+
"playwright/no-template-literal-title": "off",
|
|
833
|
+
"playwright/no-test-return-statement": "warn",
|
|
834
|
+
"playwright/no-unnecessary-assertions": "warn",
|
|
889
835
|
"playwright/no-unsafe-references": "warn",
|
|
890
836
|
"playwright/no-unused-locators": "warn",
|
|
891
837
|
"playwright/no-useless-await": "error",
|
|
@@ -894,6 +840,7 @@ function playwright(options = {}) {
|
|
|
894
840
|
"playwright/no-wait-for-selector": "warn",
|
|
895
841
|
"playwright/no-wait-for-timeout": "warn",
|
|
896
842
|
"playwright/prefer-comparison-matcher": "off",
|
|
843
|
+
"playwright/prefer-ending-with-an-expect": "off",
|
|
897
844
|
"playwright/prefer-equality-matcher": "off",
|
|
898
845
|
"playwright/prefer-hooks-in-order": "off",
|
|
899
846
|
"playwright/prefer-hooks-on-top": "off",
|
|
@@ -906,6 +853,7 @@ function playwright(options = {}) {
|
|
|
906
853
|
"playwright/prefer-to-have-count": "off",
|
|
907
854
|
"playwright/prefer-to-have-length": "off",
|
|
908
855
|
"playwright/prefer-web-first-assertions": "warn",
|
|
856
|
+
"playwright/require-annotation-reason": "off",
|
|
909
857
|
"playwright/require-hook": "off",
|
|
910
858
|
"playwright/require-soft-assertions": "off",
|
|
911
859
|
"playwright/require-tags": "off",
|
|
@@ -1058,7 +1006,9 @@ const nextAllowExportNames = [
|
|
|
1058
1006
|
"generateImageMetadata",
|
|
1059
1007
|
"generateSitemaps",
|
|
1060
1008
|
"generateStaticParams",
|
|
1061
|
-
"instant"
|
|
1009
|
+
"instant",
|
|
1010
|
+
"contentType",
|
|
1011
|
+
"size"
|
|
1062
1012
|
];
|
|
1063
1013
|
//#endregion
|
|
1064
1014
|
//#region src/modules/react.mjs
|
|
@@ -1081,7 +1031,7 @@ function react(options = {}) {
|
|
|
1081
1031
|
],
|
|
1082
1032
|
plugins: {
|
|
1083
1033
|
...reactPlugin.configs.all.plugins,
|
|
1084
|
-
"jsx-a11y":
|
|
1034
|
+
"jsx-a11y-x": jsxA11yX,
|
|
1085
1035
|
"react-refresh": reactRefresh.plugin
|
|
1086
1036
|
},
|
|
1087
1037
|
...predicate(projectService, { languageOptions: {
|
|
@@ -1100,14 +1050,10 @@ function react(options = {}) {
|
|
|
1100
1050
|
"@eslint-react/dom-no-void-elements-with-children": "warn",
|
|
1101
1051
|
"@eslint-react/dom-no-dangerously-set-innerhtml-with-children": "error",
|
|
1102
1052
|
"@eslint-react/dom-no-dangerously-set-innerhtml": "off",
|
|
1103
|
-
"@eslint-react/dom-no-find-dom-node": "error",
|
|
1104
1053
|
"@eslint-react/dom-no-flush-sync": "off",
|
|
1105
|
-
"@eslint-react/dom-no-use-form-state": "warn",
|
|
1106
|
-
"@eslint-react/dom-no-hydrate": "warn",
|
|
1107
1054
|
"@eslint-react/dom-no-missing-button-type": "warn",
|
|
1108
1055
|
"@eslint-react/dom-no-missing-iframe-sandbox": "warn",
|
|
1109
1056
|
"@eslint-react/dom-no-render-return-value": "error",
|
|
1110
|
-
"@eslint-react/dom-no-render": "warn",
|
|
1111
1057
|
"@eslint-react/dom-no-script-url": "warn",
|
|
1112
1058
|
"@eslint-react/dom-no-string-style-prop": "error",
|
|
1113
1059
|
"@eslint-react/dom-no-unknown-property": "off",
|
|
@@ -1130,15 +1076,10 @@ function react(options = {}) {
|
|
|
1130
1076
|
"@eslint-react/no-children-to-array": "warn",
|
|
1131
1077
|
"@eslint-react/no-class-component": "off",
|
|
1132
1078
|
"@eslint-react/no-clone-element": "warn",
|
|
1133
|
-
"@eslint-react/no-component-will-mount": "error",
|
|
1134
|
-
"@eslint-react/no-component-will-receive-props": "error",
|
|
1135
|
-
"@eslint-react/no-component-will-update": "error",
|
|
1136
1079
|
"@eslint-react/no-context-provider": "warn",
|
|
1137
|
-
"@eslint-react/no-create-ref": "error",
|
|
1138
1080
|
"@eslint-react/no-direct-mutation-state": "error",
|
|
1139
1081
|
"@eslint-react/no-duplicate-key": "error",
|
|
1140
1082
|
"@eslint-react/no-forward-ref": "warn",
|
|
1141
|
-
"@eslint-react/no-leaked-conditional-rendering": "error",
|
|
1142
1083
|
"@eslint-react/no-missing-component-display-name": "off",
|
|
1143
1084
|
"@eslint-react/no-missing-context-display-name": "warn",
|
|
1144
1085
|
"@eslint-react/no-missing-key": "error",
|
|
@@ -1184,45 +1125,53 @@ function react(options = {}) {
|
|
|
1184
1125
|
"@eslint-react/static-components": strict("error"),
|
|
1185
1126
|
"@eslint-react/unsupported-syntax": "error",
|
|
1186
1127
|
"@eslint-react/use-memo": "error",
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
"jsx-a11y/
|
|
1195
|
-
"jsx-a11y/
|
|
1196
|
-
"jsx-a11y/
|
|
1197
|
-
"jsx-a11y/
|
|
1198
|
-
"jsx-a11y/
|
|
1199
|
-
"jsx-a11y/
|
|
1200
|
-
"jsx-a11y/
|
|
1201
|
-
"jsx-a11y/
|
|
1202
|
-
"jsx-a11y/
|
|
1203
|
-
"jsx-a11y/
|
|
1204
|
-
"jsx-a11y/
|
|
1205
|
-
"jsx-a11y/
|
|
1206
|
-
"jsx-a11y/
|
|
1207
|
-
"jsx-a11y/
|
|
1208
|
-
"jsx-a11y/
|
|
1209
|
-
"jsx-a11y/
|
|
1210
|
-
"jsx-a11y/
|
|
1211
|
-
"jsx-a11y/
|
|
1212
|
-
"jsx-a11y/
|
|
1213
|
-
"jsx-a11y/
|
|
1214
|
-
"jsx-a11y/no-
|
|
1215
|
-
"jsx-a11y/no-
|
|
1216
|
-
"jsx-a11y/no-
|
|
1217
|
-
"jsx-a11y/
|
|
1218
|
-
"jsx-a11y/
|
|
1219
|
-
"jsx-a11y/
|
|
1220
|
-
"jsx-a11y/
|
|
1221
|
-
"jsx-a11y/
|
|
1222
|
-
"jsx-a11y/
|
|
1128
|
+
...predicate(projectService, {
|
|
1129
|
+
"@eslint-react/no-implicit-children": "warn",
|
|
1130
|
+
"@eslint-react/no-implicit-key": "warn",
|
|
1131
|
+
"@eslint-react/no-implicit-ref": "warn",
|
|
1132
|
+
"@eslint-react/no-leaked-conditional-rendering": "error",
|
|
1133
|
+
"@eslint-react/no-unused-props": "warn"
|
|
1134
|
+
}),
|
|
1135
|
+
"jsx-a11y-x/alt-text": "warn",
|
|
1136
|
+
"jsx-a11y-x/anchor-has-content": "error",
|
|
1137
|
+
"jsx-a11y-x/anchor-is-valid": "error",
|
|
1138
|
+
"jsx-a11y-x/aria-activedescendant-has-tabindex": "error",
|
|
1139
|
+
"jsx-a11y-x/aria-props": "error",
|
|
1140
|
+
"jsx-a11y-x/aria-proptypes": "error",
|
|
1141
|
+
"jsx-a11y-x/aria-role": "error",
|
|
1142
|
+
"jsx-a11y-x/aria-unsupported-elements": "error",
|
|
1143
|
+
"jsx-a11y-x/autocomplete-valid": "off",
|
|
1144
|
+
"jsx-a11y-x/click-events-have-key-events": "error",
|
|
1145
|
+
"jsx-a11y-x/control-has-associated-label": "off",
|
|
1146
|
+
"jsx-a11y-x/heading-has-content": "error",
|
|
1147
|
+
"jsx-a11y-x/html-has-lang": "error",
|
|
1148
|
+
"jsx-a11y-x/iframe-has-title": "error",
|
|
1149
|
+
"jsx-a11y-x/img-redundant-alt": "error",
|
|
1150
|
+
"jsx-a11y-x/interactive-supports-focus": "warn",
|
|
1151
|
+
"jsx-a11y-x/label-has-associated-control": "error",
|
|
1152
|
+
"jsx-a11y-x/lang": "error",
|
|
1153
|
+
"jsx-a11y-x/media-has-caption": "warn",
|
|
1154
|
+
"jsx-a11y-x/mouse-events-have-key-events": "error",
|
|
1155
|
+
"jsx-a11y-x/no-access-key": "error",
|
|
1156
|
+
"jsx-a11y-x/no-aria-hidden-on-focusable": "warn",
|
|
1157
|
+
"jsx-a11y-x/no-autofocus": "off",
|
|
1158
|
+
"jsx-a11y-x/no-distracting-elements": "error",
|
|
1159
|
+
"jsx-a11y-x/no-interactive-element-to-noninteractive-role": "warn",
|
|
1160
|
+
"jsx-a11y-x/no-noninteractive-element-interactions": "warn",
|
|
1161
|
+
"jsx-a11y-x/no-noninteractive-element-to-interactive-role": "warn",
|
|
1162
|
+
"jsx-a11y-x/no-noninteractive-tabindex": "off",
|
|
1163
|
+
"jsx-a11y-x/no-redundant-roles": "error",
|
|
1164
|
+
"jsx-a11y-x/no-static-element-interactions": "off",
|
|
1165
|
+
"jsx-a11y-x/role-has-required-aria-props": "error",
|
|
1166
|
+
"jsx-a11y-x/role-supports-aria-props": "error",
|
|
1167
|
+
"jsx-a11y-x/scope": "error",
|
|
1168
|
+
"jsx-a11y-x/tabindex-no-positive": "warn",
|
|
1169
|
+
"jsx-a11y-x/anchor-ambiguous-text": "off",
|
|
1170
|
+
"jsx-a11y-x/prefer-tag-over-role": "off",
|
|
1223
1171
|
"react-refresh/only-export-components": ["error", {
|
|
1224
1172
|
allowExportNames: isPackageExists("next") ? nextAllowExportNames : [],
|
|
1225
|
-
allowConstantExport: isPackageExists("vite")
|
|
1173
|
+
allowConstantExport: isPackageExists("vite"),
|
|
1174
|
+
allowCompoundComponents: isPackageExists("vite")
|
|
1226
1175
|
}]
|
|
1227
1176
|
}
|
|
1228
1177
|
};
|
|
@@ -1363,7 +1312,7 @@ function storybook(options = {}) {
|
|
|
1363
1312
|
"storybook/no-stories-of": "warn",
|
|
1364
1313
|
"storybook/no-title-property-in-meta": "off",
|
|
1365
1314
|
"@typescript-eslint/no-confusing-void-expression": "off",
|
|
1366
|
-
"@eslint-react/no-useless-fragment": "off",
|
|
1315
|
+
"@eslint-react/jsx-no-useless-fragment": "off",
|
|
1367
1316
|
"react-hooks/rules-of-hooks": "off"
|
|
1368
1317
|
}
|
|
1369
1318
|
};
|
|
@@ -1637,8 +1586,8 @@ function typescript(options = {}) {
|
|
|
1637
1586
|
"minimumDescriptionLength": 3
|
|
1638
1587
|
}],
|
|
1639
1588
|
"@typescript-eslint/ban-tslint-comment": "off",
|
|
1640
|
-
"@typescript-eslint/camelcase": "off",
|
|
1641
1589
|
"@typescript-eslint/class-literal-property-style": ["error", "getters"],
|
|
1590
|
+
"@typescript-eslint/class-methods-use-this": "off",
|
|
1642
1591
|
"@typescript-eslint/consistent-generic-constructors": ["warn", "constructor"],
|
|
1643
1592
|
"@typescript-eslint/consistent-indexed-object-style": "warn",
|
|
1644
1593
|
"@typescript-eslint/consistent-type-assertions": "error",
|
|
@@ -1652,9 +1601,8 @@ function typescript(options = {}) {
|
|
|
1652
1601
|
"@typescript-eslint/explicit-function-return-type": "off",
|
|
1653
1602
|
"@typescript-eslint/explicit-member-accessibility": "off",
|
|
1654
1603
|
"@typescript-eslint/explicit-module-boundary-types": "off",
|
|
1655
|
-
"@typescript-eslint/generic-type-naming": "off",
|
|
1656
1604
|
"@typescript-eslint/init-declarations": "off",
|
|
1657
|
-
"@typescript-eslint/
|
|
1605
|
+
"@typescript-eslint/max-params": ["error", { max: 3 }],
|
|
1658
1606
|
"@typescript-eslint/member-ordering": "off",
|
|
1659
1607
|
"@typescript-eslint/method-signature-style": ["warn", "property"],
|
|
1660
1608
|
"@typescript-eslint/naming-convention": [
|
|
@@ -1690,7 +1638,6 @@ function typescript(options = {}) {
|
|
|
1690
1638
|
"@typescript-eslint/no-inferrable-types": "off",
|
|
1691
1639
|
"@typescript-eslint/no-invalid-this": ["error", { capIsConstructor: false }],
|
|
1692
1640
|
"@typescript-eslint/no-invalid-void-type": "error",
|
|
1693
|
-
"@typescript-eslint/no-loop-func": "error",
|
|
1694
1641
|
"@typescript-eslint/no-magic-numbers": ["off", { ignoreEnums: true }],
|
|
1695
1642
|
"@typescript-eslint/no-misused-new": "error",
|
|
1696
1643
|
"@typescript-eslint/no-namespace": "error",
|
|
@@ -1700,17 +1647,17 @@ function typescript(options = {}) {
|
|
|
1700
1647
|
...predicate(options.strict, { "@typescript-eslint/no-non-null-assertion": "warn" }),
|
|
1701
1648
|
"@typescript-eslint/no-redeclare": ["off", { ignoreDeclarationMerge: true }],
|
|
1702
1649
|
"@typescript-eslint/no-require-imports": "error",
|
|
1703
|
-
"@typescript-eslint/no-restricted-
|
|
1650
|
+
"@typescript-eslint/no-restricted-types": "off",
|
|
1704
1651
|
"@typescript-eslint/no-shadow": "error",
|
|
1705
1652
|
"@typescript-eslint/no-this-alias": "error",
|
|
1706
1653
|
"@typescript-eslint/no-unnecessary-type-constraint": "warn",
|
|
1654
|
+
"@typescript-eslint/no-unnecessary-parameter-property-assignment": "warn",
|
|
1707
1655
|
"@typescript-eslint/no-unsafe-argument": strict(options, "warn"),
|
|
1708
1656
|
"@typescript-eslint/no-unsafe-assignment": strict(options, "warn"),
|
|
1709
1657
|
"@typescript-eslint/no-unsafe-call": strict(options, "warn"),
|
|
1710
1658
|
"@typescript-eslint/no-unsafe-declaration-merging": "warn",
|
|
1711
1659
|
"@typescript-eslint/no-unsafe-member-access": strict(options, ["warn", { allowOptionalChaining: true }]),
|
|
1712
1660
|
"@typescript-eslint/no-unsafe-return": strict(options, "warn"),
|
|
1713
|
-
"@typescript-eslint/no-untyped-public-signature": "off",
|
|
1714
1661
|
"@typescript-eslint/no-unused-expressions": "error",
|
|
1715
1662
|
"@typescript-eslint/no-unused-vars": ["warn", {
|
|
1716
1663
|
argsIgnorePattern: "^_",
|
|
@@ -1728,8 +1675,10 @@ function typescript(options = {}) {
|
|
|
1728
1675
|
"@typescript-eslint/no-useless-constructor": "error",
|
|
1729
1676
|
"@typescript-eslint/no-useless-default-assignment": "warn",
|
|
1730
1677
|
"@typescript-eslint/no-useless-empty-export": "warn",
|
|
1678
|
+
"@typescript-eslint/no-wrapper-object-types": "error",
|
|
1731
1679
|
"@typescript-eslint/parameter-properties": "off",
|
|
1732
1680
|
"@typescript-eslint/prefer-as-const": "warn",
|
|
1681
|
+
"@typescript-eslint/prefer-destructuring": "off",
|
|
1733
1682
|
"@typescript-eslint/prefer-enum-initializers": "off",
|
|
1734
1683
|
"@typescript-eslint/prefer-for-of": "warn",
|
|
1735
1684
|
"@typescript-eslint/prefer-function-type": "warn",
|
|
@@ -1741,7 +1690,6 @@ function typescript(options = {}) {
|
|
|
1741
1690
|
treatMethodsAsReadonly: true
|
|
1742
1691
|
}],
|
|
1743
1692
|
"@typescript-eslint/prefer-readonly": "off",
|
|
1744
|
-
"@typescript-eslint/prefer-readonlysemi": "off",
|
|
1745
1693
|
"@typescript-eslint/promise-function-async": "off",
|
|
1746
1694
|
"@typescript-eslint/restrict-plus-operands": "warn",
|
|
1747
1695
|
"@typescript-eslint/strict-boolean-expressions": "off",
|
|
@@ -1750,6 +1698,7 @@ function typescript(options = {}) {
|
|
|
1750
1698
|
"@typescript-eslint/unified-signatures": "error",
|
|
1751
1699
|
...predicate(projectService, {
|
|
1752
1700
|
"@typescript-eslint/await-thenable": "error",
|
|
1701
|
+
"@typescript-eslint/no-array-delete": "error",
|
|
1753
1702
|
"@typescript-eslint/consistent-return": "off",
|
|
1754
1703
|
"@typescript-eslint/consistent-type-exports": "warn",
|
|
1755
1704
|
"@typescript-eslint/dot-notation": ["warn", {
|
|
@@ -1765,6 +1714,7 @@ function typescript(options = {}) {
|
|
|
1765
1714
|
"@typescript-eslint/no-duplicate-type-constituents": "warn",
|
|
1766
1715
|
"@typescript-eslint/no-deprecated": "error",
|
|
1767
1716
|
"@typescript-eslint/no-for-in-array": "error",
|
|
1717
|
+
"@typescript-eslint/no-generated-empty-object-type": "error",
|
|
1768
1718
|
"@typescript-eslint/no-implied-eval": "error",
|
|
1769
1719
|
"@typescript-eslint/no-meaningless-void-operator": ["warn", { checkNever: false }],
|
|
1770
1720
|
...predicate(!options.disableExpensiveRules, {
|
|
@@ -1783,11 +1733,14 @@ function typescript(options = {}) {
|
|
|
1783
1733
|
"@typescript-eslint/no-unnecessary-template-expression": "warn",
|
|
1784
1734
|
"@typescript-eslint/no-unnecessary-type-arguments": "error",
|
|
1785
1735
|
"@typescript-eslint/no-unnecessary-type-assertion": "error",
|
|
1736
|
+
"@typescript-eslint/no-unnecessary-type-parameters": "off",
|
|
1737
|
+
"@typescript-eslint/no-unsafe-type-assertion": "off",
|
|
1786
1738
|
"@typescript-eslint/no-unsafe-unary-minus": "error",
|
|
1787
1739
|
"@typescript-eslint/no-unused-private-class-members": "warn",
|
|
1788
1740
|
"@typescript-eslint/non-nullable-type-assertion-style": "warn",
|
|
1789
1741
|
"@typescript-eslint/only-throw-error": ["warn", { allowRethrowing: true }],
|
|
1790
1742
|
"@typescript-eslint/prefer-includes": "warn",
|
|
1743
|
+
"@typescript-eslint/prefer-find": "warn",
|
|
1791
1744
|
"@typescript-eslint/prefer-optional-chain": "warn",
|
|
1792
1745
|
"@typescript-eslint/prefer-reduce-type-parameter": "warn",
|
|
1793
1746
|
"@typescript-eslint/prefer-nullish-coalescing": ["warn", {
|
|
@@ -1812,11 +1765,13 @@ function typescript(options = {}) {
|
|
|
1812
1765
|
"@typescript-eslint/require-await": "error",
|
|
1813
1766
|
"@typescript-eslint/return-await": "error",
|
|
1814
1767
|
"@typescript-eslint/switch-exhaustiveness-check": "error",
|
|
1768
|
+
"@typescript-eslint/use-unknown-in-catch-callback-variable": "warn",
|
|
1815
1769
|
"@typescript-eslint/unbound-method": ["error", { ignoreStatic: true }],
|
|
1816
1770
|
"prefer-promise-reject-errors": "off",
|
|
1817
1771
|
"consistent-return": "off"
|
|
1818
1772
|
}),
|
|
1819
1773
|
"no-unused-private-class-members": "off",
|
|
1774
|
+
"no-unused-expressions": "off",
|
|
1820
1775
|
"no-empty-function": "off",
|
|
1821
1776
|
"default-case": "off",
|
|
1822
1777
|
"import/named": "off",
|
|
@@ -1827,9 +1782,9 @@ function typescript(options = {}) {
|
|
|
1827
1782
|
"default-param-last": "off",
|
|
1828
1783
|
"init-declarations": "off",
|
|
1829
1784
|
"no-invalid-this": "off",
|
|
1830
|
-
"
|
|
1785
|
+
"max-params": "off",
|
|
1786
|
+
"prefer-destructuring": "off",
|
|
1831
1787
|
"no-redeclare": "off",
|
|
1832
|
-
"no-restricted-imports": "off",
|
|
1833
1788
|
"no-shadow": "off",
|
|
1834
1789
|
"no-unused-vars": "off",
|
|
1835
1790
|
"no-use-before-define": "off",
|
|
@@ -1878,8 +1833,10 @@ function vitest(options = {}) {
|
|
|
1878
1833
|
rules: {
|
|
1879
1834
|
"vitest/consistent-test-filename": "off",
|
|
1880
1835
|
"vitest/consistent-test-it": "warn",
|
|
1836
|
+
"vitest/consistent-each-for": "warn",
|
|
1881
1837
|
"vitest/consistent-vitest-vi": "warn",
|
|
1882
1838
|
"vitest/expect-expect": "warn",
|
|
1839
|
+
"vitest/hoisted-apis-on-top": "warn",
|
|
1883
1840
|
"vitest/max-expects": "off",
|
|
1884
1841
|
"vitest/max-nested-describe": "off",
|
|
1885
1842
|
"vitest/no-alias-methods": "off",
|
|
@@ -1903,10 +1860,21 @@ function vitest(options = {}) {
|
|
|
1903
1860
|
"vitest/no-test-prefixes": "warn",
|
|
1904
1861
|
"vitest/no-test-return-statement": "warn",
|
|
1905
1862
|
"vitest/no-unneeded-async-expect-function": "warn",
|
|
1863
|
+
"vitest/padding-around-after-all-blocks": "off",
|
|
1864
|
+
"vitest/padding-around-after-each-blocks": "off",
|
|
1865
|
+
"vitest/padding-around-all": "off",
|
|
1866
|
+
"vitest/padding-around-before-all-blocks": "off",
|
|
1867
|
+
"vitest/padding-around-before-each-blocks": "off",
|
|
1868
|
+
"vitest/padding-around-describe-blocks": "off",
|
|
1869
|
+
"vitest/padding-around-expect-groups": "off",
|
|
1870
|
+
"vitest/padding-around-test-blocks": "off",
|
|
1906
1871
|
"vitest/prefer-called-once": "warn",
|
|
1872
|
+
"vitest/prefer-called-exactly-once-with": "off",
|
|
1907
1873
|
"vitest/prefer-called-times": "off",
|
|
1908
1874
|
"vitest/prefer-called-with": "warn",
|
|
1909
1875
|
"vitest/prefer-comparison-matcher": "warn",
|
|
1876
|
+
"vitest/prefer-expect-type-of": "warn",
|
|
1877
|
+
"vitest/prefer-import-in-mock": "warn",
|
|
1910
1878
|
"vitest/prefer-describe-function-title": "off",
|
|
1911
1879
|
"vitest/prefer-each": "warn",
|
|
1912
1880
|
"vitest/prefer-equality-matcher": "warn",
|
|
@@ -1927,14 +1895,18 @@ function vitest(options = {}) {
|
|
|
1927
1895
|
"vitest/prefer-to-be-object": "warn",
|
|
1928
1896
|
"vitest/prefer-to-be-truthy": "off",
|
|
1929
1897
|
"vitest/prefer-to-contain": "warn",
|
|
1898
|
+
"vitest/prefer-to-have-been-called-times": "off",
|
|
1930
1899
|
"vitest/prefer-to-have-length": "warn",
|
|
1931
1900
|
"vitest/prefer-todo": "warn",
|
|
1932
1901
|
"vitest/prefer-vi-mocked": "warn",
|
|
1933
1902
|
"vitest/require-hook": "off",
|
|
1903
|
+
"vitest/require-awaited-expect-poll": "error",
|
|
1934
1904
|
"vitest/require-local-test-context-for-concurrent-snapshots": "warn",
|
|
1935
1905
|
"vitest/require-mock-type-parameters": "off",
|
|
1936
1906
|
"vitest/require-to-throw-message": "warn",
|
|
1907
|
+
"vitest/require-test-timeout": "off",
|
|
1937
1908
|
"vitest/require-top-level-describe": "off",
|
|
1909
|
+
"vitest/unbound-method": "off",
|
|
1938
1910
|
"vitest/valid-describe-callback": "warn",
|
|
1939
1911
|
"vitest/valid-expect": "warn",
|
|
1940
1912
|
"vitest/valid-expect-in-promise": "warn",
|