@vitest/eslint-plugin 1.6.5 → 1.6.6
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 +1 -0
- package/dist/index.cjs +245 -144
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +245 -144
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { isAbsolute, posix } from "node:path";
|
|
|
4
4
|
import { DefinitionType } from "@typescript-eslint/scope-manager";
|
|
5
5
|
|
|
6
6
|
//#region package.json
|
|
7
|
-
var version = "1.6.
|
|
7
|
+
var version = "1.6.6";
|
|
8
8
|
|
|
9
9
|
//#endregion
|
|
10
10
|
//#region src/utils/index.ts
|
|
@@ -1786,7 +1786,7 @@ const followTypeAssertionChain$1 = (expression) => isTypeCastExpression$1(expres
|
|
|
1786
1786
|
|
|
1787
1787
|
//#endregion
|
|
1788
1788
|
//#region src/rules/consistent-each-for.ts
|
|
1789
|
-
const RULE_NAME$
|
|
1789
|
+
const RULE_NAME$80 = "consistent-each-for";
|
|
1790
1790
|
const BASE_FN_NAMES = [
|
|
1791
1791
|
"test",
|
|
1792
1792
|
"it",
|
|
@@ -1794,7 +1794,7 @@ const BASE_FN_NAMES = [
|
|
|
1794
1794
|
"suite"
|
|
1795
1795
|
];
|
|
1796
1796
|
var consistent_each_for_default = createEslintRule({
|
|
1797
|
-
name: RULE_NAME$
|
|
1797
|
+
name: RULE_NAME$80,
|
|
1798
1798
|
meta: {
|
|
1799
1799
|
type: "suggestion",
|
|
1800
1800
|
docs: {
|
|
@@ -1854,11 +1854,11 @@ var consistent_each_for_default = createEslintRule({
|
|
|
1854
1854
|
|
|
1855
1855
|
//#endregion
|
|
1856
1856
|
//#region src/rules/consistent-test-filename.ts
|
|
1857
|
-
const RULE_NAME$
|
|
1857
|
+
const RULE_NAME$79 = "consistent-test-filename";
|
|
1858
1858
|
const defaultPattern = /.*\.test\.[tj]sx?$/;
|
|
1859
1859
|
const defaultTestsPattern = /.*\.(test|spec)\.[tj]sx?$/;
|
|
1860
1860
|
var consistent_test_filename_default = createEslintRule({
|
|
1861
|
-
name: RULE_NAME$
|
|
1861
|
+
name: RULE_NAME$79,
|
|
1862
1862
|
meta: {
|
|
1863
1863
|
type: "problem",
|
|
1864
1864
|
docs: {
|
|
@@ -1906,7 +1906,7 @@ var consistent_test_filename_default = createEslintRule({
|
|
|
1906
1906
|
|
|
1907
1907
|
//#endregion
|
|
1908
1908
|
//#region src/rules/consistent-test-it.ts
|
|
1909
|
-
const RULE_NAME$
|
|
1909
|
+
const RULE_NAME$78 = "consistent-test-it";
|
|
1910
1910
|
const buildFixer = (callee, nodeName, preferredTestKeyword) => (fixer) => [fixer.replaceText(callee.type === AST_NODE_TYPES.MemberExpression ? callee.object : callee, getPreferredNodeName(nodeName, preferredTestKeyword))];
|
|
1911
1911
|
function getPreferredNodeName(nodeName, preferredTestKeyword) {
|
|
1912
1912
|
if (nodeName === TestCaseName.fit) return "test.only";
|
|
@@ -1917,7 +1917,7 @@ function getOppositeTestKeyword(test) {
|
|
|
1917
1917
|
return TestCaseName.test;
|
|
1918
1918
|
}
|
|
1919
1919
|
var consistent_test_it_default = createEslintRule({
|
|
1920
|
-
name: RULE_NAME$
|
|
1920
|
+
name: RULE_NAME$78,
|
|
1921
1921
|
meta: {
|
|
1922
1922
|
type: "suggestion",
|
|
1923
1923
|
fixable: "code",
|
|
@@ -2026,10 +2026,10 @@ var consistent_test_it_default = createEslintRule({
|
|
|
2026
2026
|
|
|
2027
2027
|
//#endregion
|
|
2028
2028
|
//#region src/rules/consistent-vitest-vi.ts
|
|
2029
|
-
const RULE_NAME$
|
|
2029
|
+
const RULE_NAME$77 = "consistent-vitest-vi";
|
|
2030
2030
|
const getOppositeVitestUtilKeyword = (util) => util === UtilName.vi ? UtilName.vitest : UtilName.vi;
|
|
2031
2031
|
var consistent_vitest_vi_default = createEslintRule({
|
|
2032
|
-
name: RULE_NAME$
|
|
2032
|
+
name: RULE_NAME$77,
|
|
2033
2033
|
meta: {
|
|
2034
2034
|
type: "suggestion",
|
|
2035
2035
|
fixable: "code",
|
|
@@ -2111,9 +2111,9 @@ function parsePluginSettings(settings) {
|
|
|
2111
2111
|
|
|
2112
2112
|
//#endregion
|
|
2113
2113
|
//#region src/rules/expect-expect.ts
|
|
2114
|
-
const RULE_NAME$
|
|
2114
|
+
const RULE_NAME$76 = "expect-expect";
|
|
2115
2115
|
var expect_expect_default = createEslintRule({
|
|
2116
|
-
name: RULE_NAME$
|
|
2116
|
+
name: RULE_NAME$76,
|
|
2117
2117
|
meta: {
|
|
2118
2118
|
type: "suggestion",
|
|
2119
2119
|
docs: {
|
|
@@ -2134,6 +2134,10 @@ var expect_expect_default = createEslintRule({
|
|
|
2134
2134
|
},
|
|
2135
2135
|
additionalProperties: false
|
|
2136
2136
|
}],
|
|
2137
|
+
defaultOptions: [{
|
|
2138
|
+
assertFunctionNames: ["expect", "assert"],
|
|
2139
|
+
additionalTestBlockFunctions: []
|
|
2140
|
+
}],
|
|
2137
2141
|
messages: { noAssertions: "Test has no assertions" }
|
|
2138
2142
|
},
|
|
2139
2143
|
defaultOptions: [{
|
|
@@ -2189,14 +2193,14 @@ function buildPatternRegexp(pattern) {
|
|
|
2189
2193
|
|
|
2190
2194
|
//#endregion
|
|
2191
2195
|
//#region src/rules/hoisted-apis-on-top.ts
|
|
2192
|
-
const RULE_NAME$
|
|
2196
|
+
const RULE_NAME$75 = "hoisted-apis-on-top";
|
|
2193
2197
|
const hoistedAPIs = [
|
|
2194
2198
|
"mock",
|
|
2195
2199
|
"hoisted",
|
|
2196
2200
|
"unmock"
|
|
2197
2201
|
];
|
|
2198
2202
|
var hoisted_apis_on_top_default = createEslintRule({
|
|
2199
|
-
name: RULE_NAME$
|
|
2203
|
+
name: RULE_NAME$75,
|
|
2200
2204
|
meta: {
|
|
2201
2205
|
hasSuggestions: true,
|
|
2202
2206
|
type: "suggestion",
|
|
@@ -2263,9 +2267,9 @@ var hoisted_apis_on_top_default = createEslintRule({
|
|
|
2263
2267
|
|
|
2264
2268
|
//#endregion
|
|
2265
2269
|
//#region src/rules/max-expects.ts
|
|
2266
|
-
const RULE_NAME$
|
|
2270
|
+
const RULE_NAME$74 = "max-expects";
|
|
2267
2271
|
var max_expects_default = createEslintRule({
|
|
2268
|
-
name: RULE_NAME$
|
|
2272
|
+
name: RULE_NAME$74,
|
|
2269
2273
|
meta: {
|
|
2270
2274
|
docs: {
|
|
2271
2275
|
requiresTypeChecking: false,
|
|
@@ -2310,9 +2314,9 @@ var max_expects_default = createEslintRule({
|
|
|
2310
2314
|
|
|
2311
2315
|
//#endregion
|
|
2312
2316
|
//#region src/rules/max-nested-describe.ts
|
|
2313
|
-
const RULE_NAME$
|
|
2317
|
+
const RULE_NAME$73 = "max-nested-describe";
|
|
2314
2318
|
var max_nested_describe_default = createEslintRule({
|
|
2315
|
-
name: RULE_NAME$
|
|
2319
|
+
name: RULE_NAME$73,
|
|
2316
2320
|
meta: {
|
|
2317
2321
|
type: "problem",
|
|
2318
2322
|
docs: {
|
|
@@ -2354,9 +2358,9 @@ var max_nested_describe_default = createEslintRule({
|
|
|
2354
2358
|
|
|
2355
2359
|
//#endregion
|
|
2356
2360
|
//#region src/rules/no-alias-methods.ts
|
|
2357
|
-
const RULE_NAME$
|
|
2361
|
+
const RULE_NAME$72 = "no-alias-methods";
|
|
2358
2362
|
var no_alias_methods_default = createEslintRule({
|
|
2359
|
-
name: RULE_NAME$
|
|
2363
|
+
name: RULE_NAME$72,
|
|
2360
2364
|
meta: {
|
|
2361
2365
|
docs: {
|
|
2362
2366
|
description: "disallow alias methods",
|
|
@@ -2406,12 +2410,12 @@ var no_alias_methods_default = createEslintRule({
|
|
|
2406
2410
|
|
|
2407
2411
|
//#endregion
|
|
2408
2412
|
//#region src/rules/no-commented-out-tests.ts
|
|
2409
|
-
const RULE_NAME$
|
|
2413
|
+
const RULE_NAME$71 = "no-commented-out-tests";
|
|
2410
2414
|
function hasTests(node) {
|
|
2411
2415
|
return /^\s*[xf]?(test|it|describe)(\.\w+|\[['"]\w+['"]\])?\s*\(/mu.test(node.value);
|
|
2412
2416
|
}
|
|
2413
2417
|
var no_commented_out_tests_default = createEslintRule({
|
|
2414
|
-
name: RULE_NAME$
|
|
2418
|
+
name: RULE_NAME$71,
|
|
2415
2419
|
meta: {
|
|
2416
2420
|
docs: {
|
|
2417
2421
|
description: "disallow commented out tests",
|
|
@@ -2440,10 +2444,10 @@ var no_commented_out_tests_default = createEslintRule({
|
|
|
2440
2444
|
|
|
2441
2445
|
//#endregion
|
|
2442
2446
|
//#region src/rules/no-conditional-expect.ts
|
|
2443
|
-
const RULE_NAME$
|
|
2447
|
+
const RULE_NAME$70 = "no-conditional-expect";
|
|
2444
2448
|
const isCatchCall = (node) => node.callee.type === AST_NODE_TYPES.MemberExpression && isSupportedAccessor(node.callee.property, "catch");
|
|
2445
2449
|
var no_conditional_expect_default = createEslintRule({
|
|
2446
|
-
name: RULE_NAME$
|
|
2450
|
+
name: RULE_NAME$70,
|
|
2447
2451
|
meta: {
|
|
2448
2452
|
type: "problem",
|
|
2449
2453
|
docs: {
|
|
@@ -2521,9 +2525,9 @@ var no_conditional_expect_default = createEslintRule({
|
|
|
2521
2525
|
|
|
2522
2526
|
//#endregion
|
|
2523
2527
|
//#region src/rules/no-conditional-in-test.ts
|
|
2524
|
-
const RULE_NAME$
|
|
2528
|
+
const RULE_NAME$69 = "no-conditional-in-test";
|
|
2525
2529
|
var no_conditional_in_test_default = createEslintRule({
|
|
2526
|
-
name: RULE_NAME$
|
|
2530
|
+
name: RULE_NAME$69,
|
|
2527
2531
|
meta: {
|
|
2528
2532
|
docs: {
|
|
2529
2533
|
description: "disallow conditional tests",
|
|
@@ -2547,9 +2551,9 @@ var no_conditional_in_test_default = createEslintRule({
|
|
|
2547
2551
|
|
|
2548
2552
|
//#endregion
|
|
2549
2553
|
//#region src/rules/no-conditional-tests.ts
|
|
2550
|
-
const RULE_NAME$
|
|
2554
|
+
const RULE_NAME$68 = "no-conditional-tests";
|
|
2551
2555
|
var no_conditional_tests_default = createEslintRule({
|
|
2552
|
-
name: RULE_NAME$
|
|
2556
|
+
name: RULE_NAME$68,
|
|
2553
2557
|
meta: {
|
|
2554
2558
|
type: "problem",
|
|
2555
2559
|
docs: {
|
|
@@ -2578,9 +2582,9 @@ var no_conditional_tests_default = createEslintRule({
|
|
|
2578
2582
|
|
|
2579
2583
|
//#endregion
|
|
2580
2584
|
//#region src/rules/no-disabled-tests.ts
|
|
2581
|
-
const RULE_NAME$
|
|
2585
|
+
const RULE_NAME$67 = "no-disabled-tests";
|
|
2582
2586
|
var no_disabled_tests_default = createEslintRule({
|
|
2583
|
-
name: RULE_NAME$
|
|
2587
|
+
name: RULE_NAME$67,
|
|
2584
2588
|
meta: {
|
|
2585
2589
|
type: "suggestion",
|
|
2586
2590
|
docs: {
|
|
@@ -2646,7 +2650,7 @@ var no_disabled_tests_default = createEslintRule({
|
|
|
2646
2650
|
|
|
2647
2651
|
//#endregion
|
|
2648
2652
|
//#region src/rules/no-done-callback.ts
|
|
2649
|
-
const RULE_NAME$
|
|
2653
|
+
const RULE_NAME$66 = "no-done-callback";
|
|
2650
2654
|
const findCallbackArg = (node, isVitestEach, context) => {
|
|
2651
2655
|
if (isVitestEach) return node.arguments[1];
|
|
2652
2656
|
const vitestFnCall = parseVitestFnCall(node, context);
|
|
@@ -2655,7 +2659,7 @@ const findCallbackArg = (node, isVitestEach, context) => {
|
|
|
2655
2659
|
return null;
|
|
2656
2660
|
};
|
|
2657
2661
|
var no_done_callback_default = createEslintRule({
|
|
2658
|
-
name: RULE_NAME$
|
|
2662
|
+
name: RULE_NAME$66,
|
|
2659
2663
|
meta: {
|
|
2660
2664
|
type: "suggestion",
|
|
2661
2665
|
docs: {
|
|
@@ -2740,9 +2744,9 @@ var no_done_callback_default = createEslintRule({
|
|
|
2740
2744
|
|
|
2741
2745
|
//#endregion
|
|
2742
2746
|
//#region src/rules/no-duplicate-hooks.ts
|
|
2743
|
-
const RULE_NAME$
|
|
2747
|
+
const RULE_NAME$65 = "no-duplicate-hooks";
|
|
2744
2748
|
var no_duplicate_hooks_default = createEslintRule({
|
|
2745
|
-
name: RULE_NAME$
|
|
2749
|
+
name: RULE_NAME$65,
|
|
2746
2750
|
meta: {
|
|
2747
2751
|
docs: {
|
|
2748
2752
|
recommended: false,
|
|
@@ -2779,7 +2783,7 @@ var no_duplicate_hooks_default = createEslintRule({
|
|
|
2779
2783
|
|
|
2780
2784
|
//#endregion
|
|
2781
2785
|
//#region src/rules/no-focused-tests.ts
|
|
2782
|
-
const RULE_NAME$
|
|
2786
|
+
const RULE_NAME$64 = "no-focused-tests";
|
|
2783
2787
|
const isTestOrDescribe = (node) => {
|
|
2784
2788
|
return node.type === "Identifier" && [
|
|
2785
2789
|
"it",
|
|
@@ -2791,7 +2795,7 @@ const isOnly = (node) => {
|
|
|
2791
2795
|
return node.type === "Identifier" && node.name === "only";
|
|
2792
2796
|
};
|
|
2793
2797
|
var no_focused_tests_default = createEslintRule({
|
|
2794
|
-
name: RULE_NAME$
|
|
2798
|
+
name: RULE_NAME$64,
|
|
2795
2799
|
meta: {
|
|
2796
2800
|
type: "problem",
|
|
2797
2801
|
docs: {
|
|
@@ -2851,9 +2855,9 @@ var no_focused_tests_default = createEslintRule({
|
|
|
2851
2855
|
|
|
2852
2856
|
//#endregion
|
|
2853
2857
|
//#region src/rules/no-hooks.ts
|
|
2854
|
-
const RULE_NAME$
|
|
2858
|
+
const RULE_NAME$63 = "no-hooks";
|
|
2855
2859
|
var no_hooks_default = createEslintRule({
|
|
2856
|
-
name: RULE_NAME$
|
|
2860
|
+
name: RULE_NAME$63,
|
|
2857
2861
|
meta: {
|
|
2858
2862
|
type: "suggestion",
|
|
2859
2863
|
docs: {
|
|
@@ -2896,13 +2900,13 @@ var no_hooks_default = createEslintRule({
|
|
|
2896
2900
|
|
|
2897
2901
|
//#endregion
|
|
2898
2902
|
//#region src/rules/no-identical-title.ts
|
|
2899
|
-
const RULE_NAME$
|
|
2903
|
+
const RULE_NAME$62 = "no-identical-title";
|
|
2900
2904
|
const newDescribeContext = () => ({
|
|
2901
2905
|
describeTitles: [],
|
|
2902
2906
|
testTitles: []
|
|
2903
2907
|
});
|
|
2904
2908
|
var no_identical_title_default = createEslintRule({
|
|
2905
|
-
name: RULE_NAME$
|
|
2909
|
+
name: RULE_NAME$62,
|
|
2906
2910
|
meta: {
|
|
2907
2911
|
type: "problem",
|
|
2908
2912
|
docs: {
|
|
@@ -2952,9 +2956,9 @@ var no_identical_title_default = createEslintRule({
|
|
|
2952
2956
|
|
|
2953
2957
|
//#endregion
|
|
2954
2958
|
//#region src/rules/no-import-node-test.ts
|
|
2955
|
-
const RULE_NAME$
|
|
2959
|
+
const RULE_NAME$61 = "no-import-node-test";
|
|
2956
2960
|
var no_import_node_test_default = createEslintRule({
|
|
2957
|
-
name: RULE_NAME$
|
|
2961
|
+
name: RULE_NAME$61,
|
|
2958
2962
|
meta: {
|
|
2959
2963
|
docs: {
|
|
2960
2964
|
description: "disallow importing `node:test`",
|
|
@@ -3051,9 +3055,9 @@ const removeNodeFromArray = (fixer, nodes, target) => {
|
|
|
3051
3055
|
|
|
3052
3056
|
//#endregion
|
|
3053
3057
|
//#region src/rules/no-importing-vitest-globals.ts
|
|
3054
|
-
const RULE_NAME$
|
|
3058
|
+
const RULE_NAME$60 = "no-importing-vitest-globals";
|
|
3055
3059
|
var no_importing_vitest_globals_default = createEslintRule({
|
|
3056
|
-
name: RULE_NAME$
|
|
3060
|
+
name: RULE_NAME$60,
|
|
3057
3061
|
meta: {
|
|
3058
3062
|
type: "suggestion",
|
|
3059
3063
|
docs: {
|
|
@@ -3109,9 +3113,9 @@ var no_importing_vitest_globals_default = createEslintRule({
|
|
|
3109
3113
|
|
|
3110
3114
|
//#endregion
|
|
3111
3115
|
//#region src/rules/no-interpolation-in-snapshots.ts
|
|
3112
|
-
const RULE_NAME$
|
|
3116
|
+
const RULE_NAME$59 = "no-interpolation-in-snapshots";
|
|
3113
3117
|
var no_interpolation_in_snapshots_default = createEslintRule({
|
|
3114
|
-
name: RULE_NAME$
|
|
3118
|
+
name: RULE_NAME$59,
|
|
3115
3119
|
meta: {
|
|
3116
3120
|
type: "problem",
|
|
3117
3121
|
docs: {
|
|
@@ -3139,7 +3143,7 @@ var no_interpolation_in_snapshots_default = createEslintRule({
|
|
|
3139
3143
|
|
|
3140
3144
|
//#endregion
|
|
3141
3145
|
//#region src/rules/no-large-snapshots.ts
|
|
3142
|
-
const RULE_NAME$
|
|
3146
|
+
const RULE_NAME$58 = "no-large-snapshots";
|
|
3143
3147
|
const reportOnViolation = (context, node, { maxSize: lineLimit = 50, allowedSnapshots = {} }) => {
|
|
3144
3148
|
const startLine = node.loc.start.line;
|
|
3145
3149
|
const lineCount = node.loc.end.line - startLine;
|
|
@@ -3165,7 +3169,7 @@ const reportOnViolation = (context, node, { maxSize: lineLimit = 50, allowedSnap
|
|
|
3165
3169
|
});
|
|
3166
3170
|
};
|
|
3167
3171
|
var no_large_snapshots_default = createEslintRule({
|
|
3168
|
-
name: RULE_NAME$
|
|
3172
|
+
name: RULE_NAME$58,
|
|
3169
3173
|
meta: {
|
|
3170
3174
|
docs: {
|
|
3171
3175
|
description: "disallow large snapshots",
|
|
@@ -3210,9 +3214,9 @@ var no_large_snapshots_default = createEslintRule({
|
|
|
3210
3214
|
const mocksDirName = "__mocks__";
|
|
3211
3215
|
const isMockPath = (path) => path.split(posix.sep).includes(mocksDirName);
|
|
3212
3216
|
const isMockImportLiteral = (expression) => isStringNode(expression) && isMockPath(getStringValue(expression));
|
|
3213
|
-
const RULE_NAME$
|
|
3217
|
+
const RULE_NAME$57 = "no-mocks-import";
|
|
3214
3218
|
var no_mocks_import_default = createEslintRule({
|
|
3215
|
-
name: RULE_NAME$
|
|
3219
|
+
name: RULE_NAME$57,
|
|
3216
3220
|
meta: {
|
|
3217
3221
|
type: "problem",
|
|
3218
3222
|
docs: {
|
|
@@ -3244,13 +3248,13 @@ var no_mocks_import_default = createEslintRule({
|
|
|
3244
3248
|
|
|
3245
3249
|
//#endregion
|
|
3246
3250
|
//#region src/rules/no-restricted-matchers.ts
|
|
3247
|
-
const RULE_NAME$
|
|
3251
|
+
const RULE_NAME$56 = "no-restricted-matchers";
|
|
3248
3252
|
const isChainRestricted = (chain, restriction) => {
|
|
3249
3253
|
if (Object.prototype.hasOwnProperty.call(ModifierName, restriction) || restriction.endsWith(".not")) return chain.startsWith(restriction);
|
|
3250
3254
|
return chain === restriction;
|
|
3251
3255
|
};
|
|
3252
3256
|
var no_restricted_matchers_default = createEslintRule({
|
|
3253
|
-
name: RULE_NAME$
|
|
3257
|
+
name: RULE_NAME$56,
|
|
3254
3258
|
meta: {
|
|
3255
3259
|
docs: {
|
|
3256
3260
|
description: "disallow the use of certain matchers",
|
|
@@ -3261,6 +3265,7 @@ var no_restricted_matchers_default = createEslintRule({
|
|
|
3261
3265
|
type: "object",
|
|
3262
3266
|
additionalProperties: { type: ["string", "null"] }
|
|
3263
3267
|
}],
|
|
3268
|
+
defaultOptions: [],
|
|
3264
3269
|
messages: {
|
|
3265
3270
|
restrictedChain: "use of {{ restriction }} is disallowed",
|
|
3266
3271
|
restrictedChainWithMessage: "{{ message }}"
|
|
@@ -3292,9 +3297,9 @@ var no_restricted_matchers_default = createEslintRule({
|
|
|
3292
3297
|
|
|
3293
3298
|
//#endregion
|
|
3294
3299
|
//#region src/rules/no-restricted-vi-methods.ts
|
|
3295
|
-
const RULE_NAME$
|
|
3300
|
+
const RULE_NAME$55 = "no-restricted-vi-methods";
|
|
3296
3301
|
var no_restricted_vi_methods_default = createEslintRule({
|
|
3297
|
-
name: RULE_NAME$
|
|
3302
|
+
name: RULE_NAME$55,
|
|
3298
3303
|
meta: {
|
|
3299
3304
|
type: "suggestion",
|
|
3300
3305
|
docs: {
|
|
@@ -3336,7 +3341,7 @@ var no_restricted_vi_methods_default = createEslintRule({
|
|
|
3336
3341
|
|
|
3337
3342
|
//#endregion
|
|
3338
3343
|
//#region src/rules/no-standalone-expect.ts
|
|
3339
|
-
const RULE_NAME$
|
|
3344
|
+
const RULE_NAME$54 = "no-standalone-expect";
|
|
3340
3345
|
const getBlockType = (statement, context) => {
|
|
3341
3346
|
const func = statement.parent;
|
|
3342
3347
|
if (!func) throw new Error("Unexpected block statement. If you feel like this is a bug report https://github.com/veritem/eslint-plugin-vitest/issues/new");
|
|
@@ -3349,7 +3354,7 @@ const getBlockType = (statement, context) => {
|
|
|
3349
3354
|
return null;
|
|
3350
3355
|
};
|
|
3351
3356
|
var no_standalone_expect_default = createEslintRule({
|
|
3352
|
-
name: RULE_NAME$
|
|
3357
|
+
name: RULE_NAME$54,
|
|
3353
3358
|
meta: {
|
|
3354
3359
|
docs: {
|
|
3355
3360
|
description: "disallow using `expect` outside of `it` or `test` blocks",
|
|
@@ -3364,7 +3369,8 @@ var no_standalone_expect_default = createEslintRule({
|
|
|
3364
3369
|
items: { type: "string" }
|
|
3365
3370
|
} },
|
|
3366
3371
|
additionalProperties: false
|
|
3367
|
-
}]
|
|
3372
|
+
}],
|
|
3373
|
+
defaultOptions: []
|
|
3368
3374
|
},
|
|
3369
3375
|
defaultOptions: [{ additionalTestBlockFunctions: [] }],
|
|
3370
3376
|
create(context, [{ additionalTestBlockFunctions = [] }]) {
|
|
@@ -3408,9 +3414,9 @@ var no_standalone_expect_default = createEslintRule({
|
|
|
3408
3414
|
|
|
3409
3415
|
//#endregion
|
|
3410
3416
|
//#region src/rules/no-test-prefixes.ts
|
|
3411
|
-
const RULE_NAME$
|
|
3417
|
+
const RULE_NAME$53 = "no-test-prefixes";
|
|
3412
3418
|
var no_test_prefixes_default = createEslintRule({
|
|
3413
|
-
name: RULE_NAME$
|
|
3419
|
+
name: RULE_NAME$53,
|
|
3414
3420
|
meta: {
|
|
3415
3421
|
docs: {
|
|
3416
3422
|
description: "disallow using the `f` and `x` prefixes in favour of `.only` and `.skip`",
|
|
@@ -3445,14 +3451,14 @@ var no_test_prefixes_default = createEslintRule({
|
|
|
3445
3451
|
|
|
3446
3452
|
//#endregion
|
|
3447
3453
|
//#region src/rules/no-test-return-statement.ts
|
|
3448
|
-
const RULE_NAME$
|
|
3454
|
+
const RULE_NAME$52 = "no-test-return-statement";
|
|
3449
3455
|
const getBody = (args) => {
|
|
3450
3456
|
const [, secondArg] = args;
|
|
3451
3457
|
if (secondArg && isFunction(secondArg) && secondArg.body.type === AST_NODE_TYPES.BlockStatement) return secondArg.body.body;
|
|
3452
3458
|
return [];
|
|
3453
3459
|
};
|
|
3454
3460
|
var no_test_return_statement_default = createEslintRule({
|
|
3455
|
-
name: RULE_NAME$
|
|
3461
|
+
name: RULE_NAME$52,
|
|
3456
3462
|
meta: {
|
|
3457
3463
|
type: "problem",
|
|
3458
3464
|
docs: {
|
|
@@ -3723,7 +3729,7 @@ const createPaddingRule = (name, description, configs, deprecated = false) => {
|
|
|
3723
3729
|
|
|
3724
3730
|
//#endregion
|
|
3725
3731
|
//#region src/rules/padding-around-after-all-blocks.ts
|
|
3726
|
-
const RULE_NAME$
|
|
3732
|
+
const RULE_NAME$51 = "padding-around-after-all-blocks";
|
|
3727
3733
|
const config = [{
|
|
3728
3734
|
paddingType: PaddingType.Always,
|
|
3729
3735
|
prevStatementType: StatementType.Any,
|
|
@@ -3733,11 +3739,11 @@ const config = [{
|
|
|
3733
3739
|
prevStatementType: StatementType.AfterAllToken,
|
|
3734
3740
|
nextStatementType: StatementType.Any
|
|
3735
3741
|
}];
|
|
3736
|
-
var padding_around_after_all_blocks_default = createPaddingRule(RULE_NAME$
|
|
3742
|
+
var padding_around_after_all_blocks_default = createPaddingRule(RULE_NAME$51, "Enforce padding around `afterAll` blocks", config);
|
|
3737
3743
|
|
|
3738
3744
|
//#endregion
|
|
3739
3745
|
//#region src/rules/padding-around-after-each-blocks.ts
|
|
3740
|
-
const RULE_NAME$
|
|
3746
|
+
const RULE_NAME$50 = "padding-around-after-each-blocks";
|
|
3741
3747
|
const config$1 = [{
|
|
3742
3748
|
paddingType: PaddingType.Always,
|
|
3743
3749
|
prevStatementType: StatementType.Any,
|
|
@@ -3747,11 +3753,11 @@ const config$1 = [{
|
|
|
3747
3753
|
prevStatementType: StatementType.AfterEachToken,
|
|
3748
3754
|
nextStatementType: StatementType.Any
|
|
3749
3755
|
}];
|
|
3750
|
-
var padding_around_after_each_blocks_default = createPaddingRule(RULE_NAME$
|
|
3756
|
+
var padding_around_after_each_blocks_default = createPaddingRule(RULE_NAME$50, "Enforce padding around `afterEach` blocks", config$1);
|
|
3751
3757
|
|
|
3752
3758
|
//#endregion
|
|
3753
3759
|
//#region src/rules/padding-around-before-all-blocks.ts
|
|
3754
|
-
const RULE_NAME$
|
|
3760
|
+
const RULE_NAME$49 = "padding-around-before-all-blocks";
|
|
3755
3761
|
const config$2 = [{
|
|
3756
3762
|
paddingType: PaddingType.Always,
|
|
3757
3763
|
prevStatementType: StatementType.Any,
|
|
@@ -3761,11 +3767,11 @@ const config$2 = [{
|
|
|
3761
3767
|
prevStatementType: StatementType.BeforeAllToken,
|
|
3762
3768
|
nextStatementType: StatementType.Any
|
|
3763
3769
|
}];
|
|
3764
|
-
var padding_around_before_all_blocks_default = createPaddingRule(RULE_NAME$
|
|
3770
|
+
var padding_around_before_all_blocks_default = createPaddingRule(RULE_NAME$49, "Enforce padding around `beforeAll` blocks", config$2);
|
|
3765
3771
|
|
|
3766
3772
|
//#endregion
|
|
3767
3773
|
//#region src/rules/padding-around-before-each-blocks.ts
|
|
3768
|
-
const RULE_NAME$
|
|
3774
|
+
const RULE_NAME$48 = "padding-around-before-each-blocks";
|
|
3769
3775
|
const config$3 = [{
|
|
3770
3776
|
paddingType: PaddingType.Always,
|
|
3771
3777
|
prevStatementType: StatementType.Any,
|
|
@@ -3775,11 +3781,11 @@ const config$3 = [{
|
|
|
3775
3781
|
prevStatementType: StatementType.BeforeEachToken,
|
|
3776
3782
|
nextStatementType: StatementType.Any
|
|
3777
3783
|
}];
|
|
3778
|
-
var padding_around_before_each_blocks_default = createPaddingRule(RULE_NAME$
|
|
3784
|
+
var padding_around_before_each_blocks_default = createPaddingRule(RULE_NAME$48, "Enforce padding around `beforeEach` blocks", config$3);
|
|
3779
3785
|
|
|
3780
3786
|
//#endregion
|
|
3781
3787
|
//#region src/rules/padding-around-describe-blocks.ts
|
|
3782
|
-
const RULE_NAME$
|
|
3788
|
+
const RULE_NAME$47 = "padding-around-describe-blocks";
|
|
3783
3789
|
const config$4 = [{
|
|
3784
3790
|
paddingType: PaddingType.Always,
|
|
3785
3791
|
prevStatementType: StatementType.Any,
|
|
@@ -3797,11 +3803,11 @@ const config$4 = [{
|
|
|
3797
3803
|
],
|
|
3798
3804
|
nextStatementType: StatementType.Any
|
|
3799
3805
|
}];
|
|
3800
|
-
var padding_around_describe_blocks_default = createPaddingRule(RULE_NAME$
|
|
3806
|
+
var padding_around_describe_blocks_default = createPaddingRule(RULE_NAME$47, "Enforce padding around `describe` blocks", config$4);
|
|
3801
3807
|
|
|
3802
3808
|
//#endregion
|
|
3803
3809
|
//#region src/rules/padding-around-expect-groups.ts
|
|
3804
|
-
const RULE_NAME$
|
|
3810
|
+
const RULE_NAME$46 = "padding-around-expect-groups";
|
|
3805
3811
|
const config$5 = [
|
|
3806
3812
|
{
|
|
3807
3813
|
paddingType: PaddingType.Always,
|
|
@@ -3834,11 +3840,11 @@ const config$5 = [
|
|
|
3834
3840
|
nextStatementType: StatementType.ExpectTypeOfToken
|
|
3835
3841
|
}
|
|
3836
3842
|
];
|
|
3837
|
-
var padding_around_expect_groups_default = createPaddingRule(RULE_NAME$
|
|
3843
|
+
var padding_around_expect_groups_default = createPaddingRule(RULE_NAME$46, "Enforce padding around `expect` groups", config$5);
|
|
3838
3844
|
|
|
3839
3845
|
//#endregion
|
|
3840
3846
|
//#region src/rules/padding-around-test-blocks.ts
|
|
3841
|
-
const RULE_NAME$
|
|
3847
|
+
const RULE_NAME$45 = "padding-around-test-blocks";
|
|
3842
3848
|
const config$6 = [{
|
|
3843
3849
|
paddingType: PaddingType.Always,
|
|
3844
3850
|
prevStatementType: StatementType.Any,
|
|
@@ -3860,12 +3866,12 @@ const config$6 = [{
|
|
|
3860
3866
|
],
|
|
3861
3867
|
nextStatementType: StatementType.Any
|
|
3862
3868
|
}];
|
|
3863
|
-
var padding_around_test_blocks_default = createPaddingRule(RULE_NAME$
|
|
3869
|
+
var padding_around_test_blocks_default = createPaddingRule(RULE_NAME$45, "Enforce padding around `test` blocks", config$6);
|
|
3864
3870
|
|
|
3865
3871
|
//#endregion
|
|
3866
3872
|
//#region src/rules/padding-around-all.ts
|
|
3867
|
-
const RULE_NAME$
|
|
3868
|
-
var padding_around_all_default = createPaddingRule(RULE_NAME$
|
|
3873
|
+
const RULE_NAME$44 = "padding-around-all";
|
|
3874
|
+
var padding_around_all_default = createPaddingRule(RULE_NAME$44, "Enforce padding around vitest functions", [
|
|
3869
3875
|
...config,
|
|
3870
3876
|
...config$1,
|
|
3871
3877
|
...config$2,
|
|
@@ -3877,7 +3883,7 @@ var padding_around_all_default = createPaddingRule(RULE_NAME$43, "Enforce paddin
|
|
|
3877
3883
|
|
|
3878
3884
|
//#endregion
|
|
3879
3885
|
//#region src/rules/prefer-called-exactly-once-with.ts
|
|
3880
|
-
const RULE_NAME$
|
|
3886
|
+
const RULE_NAME$43 = "prefer-called-exactly-once-with";
|
|
3881
3887
|
const MATCHERS_TO_COMBINE = ["toHaveBeenCalledOnce", "toHaveBeenCalledWith"];
|
|
3882
3888
|
const MOCK_CALL_RESET_METHODS = [
|
|
3883
3889
|
"mockClear",
|
|
@@ -3936,7 +3942,7 @@ const hasMockResetBetween = (body, firstCallExpression, secondCallExpression) =>
|
|
|
3936
3942
|
};
|
|
3937
3943
|
const getMemberProperty = (expression) => expression.callee.type === AST_NODE_TYPES.MemberExpression ? expression.callee.property : null;
|
|
3938
3944
|
var prefer_called_exactly_once_with_default = createEslintRule({
|
|
3939
|
-
name: RULE_NAME$
|
|
3945
|
+
name: RULE_NAME$43,
|
|
3940
3946
|
meta: {
|
|
3941
3947
|
docs: { description: "Prefer `toHaveBeenCalledExactlyOnceWith` over `toHaveBeenCalledOnce` and `toHaveBeenCalledWith`" },
|
|
3942
3948
|
messages: { preferCalledExactlyOnceWith: "Using `toHaveBeenCalledOnce` and `toHaveBeenCalledWith` on the same target; prefer `toHaveBeenCalledExactlyOnceWith` instead." },
|
|
@@ -4004,10 +4010,10 @@ var prefer_called_exactly_once_with_default = createEslintRule({
|
|
|
4004
4010
|
|
|
4005
4011
|
//#endregion
|
|
4006
4012
|
//#region src/rules/prefer-called-once.ts
|
|
4007
|
-
const RULE_NAME$
|
|
4013
|
+
const RULE_NAME$42 = "prefer-called-once";
|
|
4008
4014
|
const isOneLiteral = (node) => node.type === AST_NODE_TYPES.Literal && node.value === 1;
|
|
4009
4015
|
var prefer_called_once_default = createEslintRule({
|
|
4010
|
-
name: RULE_NAME$
|
|
4016
|
+
name: RULE_NAME$42,
|
|
4011
4017
|
meta: {
|
|
4012
4018
|
docs: {
|
|
4013
4019
|
description: "enforce using `toBeCalledOnce()` or `toHaveBeenCalledOnce()`",
|
|
@@ -4040,9 +4046,9 @@ var prefer_called_once_default = createEslintRule({
|
|
|
4040
4046
|
|
|
4041
4047
|
//#endregion
|
|
4042
4048
|
//#region src/rules/prefer-called-times.ts
|
|
4043
|
-
const RULE_NAME$
|
|
4049
|
+
const RULE_NAME$41 = "prefer-called-times";
|
|
4044
4050
|
var prefer_called_times_default = createEslintRule({
|
|
4045
|
-
name: RULE_NAME$
|
|
4051
|
+
name: RULE_NAME$41,
|
|
4046
4052
|
meta: {
|
|
4047
4053
|
docs: {
|
|
4048
4054
|
description: "enforce using `toBeCalledTimes(1)` or `toHaveBeenCalledTimes(1)`",
|
|
@@ -4075,9 +4081,9 @@ var prefer_called_times_default = createEslintRule({
|
|
|
4075
4081
|
|
|
4076
4082
|
//#endregion
|
|
4077
4083
|
//#region src/rules/prefer-called-with.ts
|
|
4078
|
-
const RULE_NAME$
|
|
4084
|
+
const RULE_NAME$40 = "prefer-called-with";
|
|
4079
4085
|
var prefer_called_with_default = createEslintRule({
|
|
4080
|
-
name: RULE_NAME$
|
|
4086
|
+
name: RULE_NAME$40,
|
|
4081
4087
|
meta: {
|
|
4082
4088
|
docs: {
|
|
4083
4089
|
description: "enforce using `toBeCalledWith()` or `toHaveBeenCalledWith()`",
|
|
@@ -4125,7 +4131,7 @@ const hasOnlyOneArgument = (call) => call.arguments.length === 1;
|
|
|
4125
4131
|
|
|
4126
4132
|
//#endregion
|
|
4127
4133
|
//#region src/rules/prefer-comparison-matcher.ts
|
|
4128
|
-
const RULE_NAME$
|
|
4134
|
+
const RULE_NAME$39 = "prefer-comparison-matcher";
|
|
4129
4135
|
const isString = (node) => {
|
|
4130
4136
|
return isStringNode(node) || node?.type === AST_NODE_TYPES.TemplateLiteral;
|
|
4131
4137
|
};
|
|
@@ -4151,7 +4157,7 @@ const determineMatcher = (operator, negated) => {
|
|
|
4151
4157
|
return null;
|
|
4152
4158
|
};
|
|
4153
4159
|
var prefer_comparison_matcher_default = createEslintRule({
|
|
4154
|
-
name: RULE_NAME$
|
|
4160
|
+
name: RULE_NAME$39,
|
|
4155
4161
|
meta: {
|
|
4156
4162
|
type: "suggestion",
|
|
4157
4163
|
docs: {
|
|
@@ -4197,9 +4203,9 @@ var prefer_comparison_matcher_default = createEslintRule({
|
|
|
4197
4203
|
|
|
4198
4204
|
//#endregion
|
|
4199
4205
|
//#region src/rules/prefer-describe-function-title.ts
|
|
4200
|
-
const RULE_NAME$
|
|
4206
|
+
const RULE_NAME$38 = "prefer-describe-function-title";
|
|
4201
4207
|
var prefer_describe_function_title_default = createEslintRule({
|
|
4202
|
-
name: RULE_NAME$
|
|
4208
|
+
name: RULE_NAME$38,
|
|
4203
4209
|
meta: {
|
|
4204
4210
|
type: "problem",
|
|
4205
4211
|
docs: {
|
|
@@ -4249,9 +4255,9 @@ var prefer_describe_function_title_default = createEslintRule({
|
|
|
4249
4255
|
|
|
4250
4256
|
//#endregion
|
|
4251
4257
|
//#region src/rules/prefer-each.ts
|
|
4252
|
-
const RULE_NAME$
|
|
4258
|
+
const RULE_NAME$37 = "prefer-each";
|
|
4253
4259
|
var prefer_each_default = createEslintRule({
|
|
4254
|
-
name: RULE_NAME$
|
|
4260
|
+
name: RULE_NAME$37,
|
|
4255
4261
|
meta: {
|
|
4256
4262
|
type: "suggestion",
|
|
4257
4263
|
docs: {
|
|
@@ -4304,9 +4310,9 @@ var prefer_each_default = createEslintRule({
|
|
|
4304
4310
|
|
|
4305
4311
|
//#endregion
|
|
4306
4312
|
//#region src/rules/prefer-equality-matcher.ts
|
|
4307
|
-
const RULE_NAME$
|
|
4313
|
+
const RULE_NAME$36 = "prefer-equality-matcher";
|
|
4308
4314
|
var prefer_equality_matcher_default = createEslintRule({
|
|
4309
|
-
name: RULE_NAME$
|
|
4315
|
+
name: RULE_NAME$36,
|
|
4310
4316
|
meta: {
|
|
4311
4317
|
type: "suggestion",
|
|
4312
4318
|
docs: {
|
|
@@ -4364,7 +4370,7 @@ var prefer_equality_matcher_default = createEslintRule({
|
|
|
4364
4370
|
|
|
4365
4371
|
//#endregion
|
|
4366
4372
|
//#region src/rules/prefer-expect-assertions.ts
|
|
4367
|
-
const RULE_NAME$
|
|
4373
|
+
const RULE_NAME$35 = "prefer-expect-assertions";
|
|
4368
4374
|
const isFirstStatement = (node) => {
|
|
4369
4375
|
let parent = node;
|
|
4370
4376
|
while (parent) {
|
|
@@ -4379,7 +4385,7 @@ const suggestRemovingExtraArguments = (context, func, from) => ({
|
|
|
4379
4385
|
fix: (fixer) => removeExtraArgumentsFixer(fixer, context, func, from)
|
|
4380
4386
|
});
|
|
4381
4387
|
var prefer_expect_assertions_default = createEslintRule({
|
|
4382
|
-
name: RULE_NAME$
|
|
4388
|
+
name: RULE_NAME$35,
|
|
4383
4389
|
meta: {
|
|
4384
4390
|
docs: {
|
|
4385
4391
|
description: "enforce using expect assertions instead of callbacks",
|
|
@@ -4404,7 +4410,8 @@ var prefer_expect_assertions_default = createEslintRule({
|
|
|
4404
4410
|
onlyFunctionsWithExpectInCallback: { type: "boolean" }
|
|
4405
4411
|
},
|
|
4406
4412
|
additionalProperties: false
|
|
4407
|
-
}]
|
|
4413
|
+
}],
|
|
4414
|
+
defaultOptions: []
|
|
4408
4415
|
},
|
|
4409
4416
|
defaultOptions: [{
|
|
4410
4417
|
onlyFunctionsWithAsyncKeyword: false,
|
|
@@ -4525,9 +4532,9 @@ var prefer_expect_assertions_default = createEslintRule({
|
|
|
4525
4532
|
|
|
4526
4533
|
//#endregion
|
|
4527
4534
|
//#region src/rules/prefer-expect-resolves.ts
|
|
4528
|
-
const RULE_NAME$
|
|
4535
|
+
const RULE_NAME$34 = "prefer-expect-resolves";
|
|
4529
4536
|
var prefer_expect_resolves_default = createEslintRule({
|
|
4530
|
-
name: RULE_NAME$
|
|
4537
|
+
name: RULE_NAME$34,
|
|
4531
4538
|
meta: {
|
|
4532
4539
|
type: "suggestion",
|
|
4533
4540
|
docs: {
|
|
@@ -4561,7 +4568,7 @@ var prefer_expect_resolves_default = createEslintRule({
|
|
|
4561
4568
|
|
|
4562
4569
|
//#endregion
|
|
4563
4570
|
//#region src/rules/prefer-expect-type-of.ts
|
|
4564
|
-
const RULE_NAME$
|
|
4571
|
+
const RULE_NAME$33 = "prefer-expect-type-of";
|
|
4565
4572
|
const typeMatchers = {
|
|
4566
4573
|
string: "toBeString",
|
|
4567
4574
|
number: "toBeNumber",
|
|
@@ -4573,7 +4580,7 @@ const typeMatchers = {
|
|
|
4573
4580
|
undefined: "toBeUndefined"
|
|
4574
4581
|
};
|
|
4575
4582
|
var prefer_expect_type_of_default = createEslintRule({
|
|
4576
|
-
name: RULE_NAME$
|
|
4583
|
+
name: RULE_NAME$33,
|
|
4577
4584
|
meta: {
|
|
4578
4585
|
type: "suggestion",
|
|
4579
4586
|
docs: {
|
|
@@ -4622,7 +4629,7 @@ var prefer_expect_type_of_default = createEslintRule({
|
|
|
4622
4629
|
|
|
4623
4630
|
//#endregion
|
|
4624
4631
|
//#region src/rules/prefer-hooks-in-order.ts
|
|
4625
|
-
const RULE_NAME$
|
|
4632
|
+
const RULE_NAME$32 = "prefer-hooks-in-order";
|
|
4626
4633
|
const HooksOrder = [
|
|
4627
4634
|
"beforeAll",
|
|
4628
4635
|
"beforeEach",
|
|
@@ -4630,7 +4637,7 @@ const HooksOrder = [
|
|
|
4630
4637
|
"afterAll"
|
|
4631
4638
|
];
|
|
4632
4639
|
var prefer_hooks_in_order_default = createEslintRule({
|
|
4633
|
-
name: RULE_NAME$
|
|
4640
|
+
name: RULE_NAME$32,
|
|
4634
4641
|
meta: {
|
|
4635
4642
|
type: "suggestion",
|
|
4636
4643
|
docs: {
|
|
@@ -4683,9 +4690,9 @@ var prefer_hooks_in_order_default = createEslintRule({
|
|
|
4683
4690
|
|
|
4684
4691
|
//#endregion
|
|
4685
4692
|
//#region src/rules/prefer-hooks-on-top.ts
|
|
4686
|
-
const RULE_NAME$
|
|
4693
|
+
const RULE_NAME$31 = "prefer-hooks-on-top";
|
|
4687
4694
|
var prefer_hooks_on_top_default = createEslintRule({
|
|
4688
|
-
name: RULE_NAME$
|
|
4695
|
+
name: RULE_NAME$31,
|
|
4689
4696
|
meta: {
|
|
4690
4697
|
type: "suggestion",
|
|
4691
4698
|
docs: {
|
|
@@ -4718,9 +4725,9 @@ var prefer_hooks_on_top_default = createEslintRule({
|
|
|
4718
4725
|
|
|
4719
4726
|
//#endregion
|
|
4720
4727
|
//#region src/rules/prefer-import-in-mock.ts
|
|
4721
|
-
const RULE_NAME$
|
|
4728
|
+
const RULE_NAME$30 = "prefer-import-in-mock";
|
|
4722
4729
|
var prefer_import_in_mock_default = createEslintRule({
|
|
4723
|
-
name: RULE_NAME$
|
|
4730
|
+
name: RULE_NAME$30,
|
|
4724
4731
|
meta: {
|
|
4725
4732
|
fixable: "code",
|
|
4726
4733
|
type: "suggestion",
|
|
@@ -4759,9 +4766,9 @@ var prefer_import_in_mock_default = createEslintRule({
|
|
|
4759
4766
|
|
|
4760
4767
|
//#endregion
|
|
4761
4768
|
//#region src/rules/prefer-importing-vitest-globals.ts
|
|
4762
|
-
const RULE_NAME$
|
|
4769
|
+
const RULE_NAME$29 = "prefer-importing-vitest-globals";
|
|
4763
4770
|
var prefer_importing_vitest_globals_default = createEslintRule({
|
|
4764
|
-
name: RULE_NAME$
|
|
4771
|
+
name: RULE_NAME$29,
|
|
4765
4772
|
meta: {
|
|
4766
4773
|
type: "suggestion",
|
|
4767
4774
|
docs: {
|
|
@@ -4834,7 +4841,7 @@ var prefer_importing_vitest_globals_default = createEslintRule({
|
|
|
4834
4841
|
|
|
4835
4842
|
//#endregion
|
|
4836
4843
|
//#region src/rules/prefer-lowercase-title.ts
|
|
4837
|
-
const RULE_NAME$
|
|
4844
|
+
const RULE_NAME$28 = "prefer-lowercase-title";
|
|
4838
4845
|
const hasStringAsFirstArgument = (node) => node.arguments[0] && isStringNode(node.arguments[0]);
|
|
4839
4846
|
const populateIgnores = (ignore) => {
|
|
4840
4847
|
const ignores = [];
|
|
@@ -4844,7 +4851,7 @@ const populateIgnores = (ignore) => {
|
|
|
4844
4851
|
return ignores;
|
|
4845
4852
|
};
|
|
4846
4853
|
var prefer_lowercase_title_default = createEslintRule({
|
|
4847
|
-
name: RULE_NAME$
|
|
4854
|
+
name: RULE_NAME$28,
|
|
4848
4855
|
meta: {
|
|
4849
4856
|
type: "problem",
|
|
4850
4857
|
docs: {
|
|
@@ -4931,7 +4938,7 @@ var prefer_lowercase_title_default = createEslintRule({
|
|
|
4931
4938
|
|
|
4932
4939
|
//#endregion
|
|
4933
4940
|
//#region src/rules/prefer-mock-promise-shorthand.ts
|
|
4934
|
-
const RULE_NAME$
|
|
4941
|
+
const RULE_NAME$27 = "prefer-mock-promise-shorthand";
|
|
4935
4942
|
const withOnce$1 = (name, addOnce) => {
|
|
4936
4943
|
return `${name}${addOnce ? "Once" : ""}`;
|
|
4937
4944
|
};
|
|
@@ -4941,7 +4948,7 @@ const findSingleReturnArgumentNode$1 = (fnNode) => {
|
|
|
4941
4948
|
return null;
|
|
4942
4949
|
};
|
|
4943
4950
|
var prefer_mock_promise_shorthand_default = createEslintRule({
|
|
4944
|
-
name: RULE_NAME$
|
|
4951
|
+
name: RULE_NAME$27,
|
|
4945
4952
|
meta: {
|
|
4946
4953
|
type: "suggestion",
|
|
4947
4954
|
docs: {
|
|
@@ -4986,7 +4993,7 @@ var prefer_mock_promise_shorthand_default = createEslintRule({
|
|
|
4986
4993
|
|
|
4987
4994
|
//#endregion
|
|
4988
4995
|
//#region src/rules/prefer-mock-return-shorthand.ts
|
|
4989
|
-
const RULE_NAME$
|
|
4996
|
+
const RULE_NAME$26 = "prefer-mock-return-shorthand";
|
|
4990
4997
|
const withOnce = (name, addOnce) => {
|
|
4991
4998
|
return `${name}${addOnce ? "Once" : ""}`;
|
|
4992
4999
|
};
|
|
@@ -4996,7 +5003,7 @@ const findSingleReturnArgumentNode = (fnNode) => {
|
|
|
4996
5003
|
return null;
|
|
4997
5004
|
};
|
|
4998
5005
|
var prefer_mock_return_shorthand_default = createEslintRule({
|
|
4999
|
-
name: RULE_NAME$
|
|
5006
|
+
name: RULE_NAME$26,
|
|
5000
5007
|
meta: {
|
|
5001
5008
|
docs: {
|
|
5002
5009
|
description: "Prefer mock return shorthands",
|
|
@@ -5037,7 +5044,7 @@ var prefer_mock_return_shorthand_default = createEslintRule({
|
|
|
5037
5044
|
|
|
5038
5045
|
//#endregion
|
|
5039
5046
|
//#region src/rules/prefer-snapshot-hint.ts
|
|
5040
|
-
const RULE_NAME$
|
|
5047
|
+
const RULE_NAME$25 = "prefer-snapshot-hint";
|
|
5041
5048
|
const snapshotMatcherNames = ["toMatchSnapshot", "toThrowErrorMatchingSnapshot"];
|
|
5042
5049
|
const isSnapshotMatcherWithoutHint = (expectFnCall) => {
|
|
5043
5050
|
if (expectFnCall.args.length === 0) return true;
|
|
@@ -5047,7 +5054,7 @@ const isSnapshotMatcherWithoutHint = (expectFnCall) => {
|
|
|
5047
5054
|
return !isStringNode(arg);
|
|
5048
5055
|
};
|
|
5049
5056
|
var prefer_snapshot_hint_default = createEslintRule({
|
|
5050
|
-
name: RULE_NAME$
|
|
5057
|
+
name: RULE_NAME$25,
|
|
5051
5058
|
meta: {
|
|
5052
5059
|
type: "suggestion",
|
|
5053
5060
|
docs: {
|
|
@@ -5058,7 +5065,8 @@ var prefer_snapshot_hint_default = createEslintRule({
|
|
|
5058
5065
|
schema: [{
|
|
5059
5066
|
type: "string",
|
|
5060
5067
|
enum: ["always", "multi"]
|
|
5061
|
-
}]
|
|
5068
|
+
}],
|
|
5069
|
+
defaultOptions: []
|
|
5062
5070
|
},
|
|
5063
5071
|
defaultOptions: ["multi"],
|
|
5064
5072
|
create(context, [mode]) {
|
|
@@ -5116,7 +5124,7 @@ var prefer_snapshot_hint_default = createEslintRule({
|
|
|
5116
5124
|
|
|
5117
5125
|
//#endregion
|
|
5118
5126
|
//#region src/rules/prefer-spy-on.ts
|
|
5119
|
-
const RULE_NAME$
|
|
5127
|
+
const RULE_NAME$24 = "prefer-spy-on";
|
|
5120
5128
|
const findNodeObject = (node) => {
|
|
5121
5129
|
if ("object" in node) return node.object;
|
|
5122
5130
|
if (node.callee.type === AST_NODE_TYPES.MemberExpression) return node.callee.object;
|
|
@@ -5136,7 +5144,7 @@ const getAutoFixMockImplementation = (vitestFnCall, context) => {
|
|
|
5136
5144
|
return argSource ? `.mockImplementation(${argSource})` : ".mockImplementation()";
|
|
5137
5145
|
};
|
|
5138
5146
|
var prefer_spy_on_default = createEslintRule({
|
|
5139
|
-
name: RULE_NAME$
|
|
5147
|
+
name: RULE_NAME$24,
|
|
5140
5148
|
meta: {
|
|
5141
5149
|
type: "suggestion",
|
|
5142
5150
|
docs: {
|
|
@@ -5173,9 +5181,9 @@ var prefer_spy_on_default = createEslintRule({
|
|
|
5173
5181
|
|
|
5174
5182
|
//#endregion
|
|
5175
5183
|
//#region src/rules/prefer-strict-boolean-matchers.ts
|
|
5176
|
-
const RULE_NAME$
|
|
5184
|
+
const RULE_NAME$23 = "prefer-strict-boolean-matchers";
|
|
5177
5185
|
var prefer_strict_boolean_matchers_default = createEslintRule({
|
|
5178
|
-
name: RULE_NAME$
|
|
5186
|
+
name: RULE_NAME$23,
|
|
5179
5187
|
meta: {
|
|
5180
5188
|
type: "suggestion",
|
|
5181
5189
|
docs: {
|
|
@@ -5211,9 +5219,9 @@ var prefer_strict_boolean_matchers_default = createEslintRule({
|
|
|
5211
5219
|
|
|
5212
5220
|
//#endregion
|
|
5213
5221
|
//#region src/rules/prefer-strict-equal.ts
|
|
5214
|
-
const RULE_NAME$
|
|
5222
|
+
const RULE_NAME$22 = "prefer-strict-equal";
|
|
5215
5223
|
var prefer_strict_equal_default = createEslintRule({
|
|
5216
|
-
name: RULE_NAME$
|
|
5224
|
+
name: RULE_NAME$22,
|
|
5217
5225
|
meta: {
|
|
5218
5226
|
type: "suggestion",
|
|
5219
5227
|
docs: {
|
|
@@ -5247,10 +5255,10 @@ var prefer_strict_equal_default = createEslintRule({
|
|
|
5247
5255
|
|
|
5248
5256
|
//#endregion
|
|
5249
5257
|
//#region src/rules/prefer-to-be-falsy.ts
|
|
5250
|
-
const RULE_NAME$
|
|
5258
|
+
const RULE_NAME$21 = "prefer-to-be-falsy";
|
|
5251
5259
|
const isFalseLiteral = (node) => node.type === AST_NODE_TYPES.Literal && node.value === false;
|
|
5252
5260
|
var prefer_to_be_falsy_default = createEslintRule({
|
|
5253
|
-
name: RULE_NAME$
|
|
5261
|
+
name: RULE_NAME$21,
|
|
5254
5262
|
meta: {
|
|
5255
5263
|
type: "suggestion",
|
|
5256
5264
|
docs: {
|
|
@@ -5277,9 +5285,9 @@ var prefer_to_be_falsy_default = createEslintRule({
|
|
|
5277
5285
|
|
|
5278
5286
|
//#endregion
|
|
5279
5287
|
//#region src/rules/prefer-to-be-object.ts
|
|
5280
|
-
const RULE_NAME$
|
|
5288
|
+
const RULE_NAME$20 = "prefer-to-be-object";
|
|
5281
5289
|
var prefer_to_be_object_default = createEslintRule({
|
|
5282
|
-
name: RULE_NAME$
|
|
5290
|
+
name: RULE_NAME$20,
|
|
5283
5291
|
meta: {
|
|
5284
5292
|
type: "suggestion",
|
|
5285
5293
|
docs: {
|
|
@@ -5331,10 +5339,10 @@ var prefer_to_be_object_default = createEslintRule({
|
|
|
5331
5339
|
|
|
5332
5340
|
//#endregion
|
|
5333
5341
|
//#region src/rules/prefer-to-be-truthy.ts
|
|
5334
|
-
const RULE_NAME$
|
|
5342
|
+
const RULE_NAME$19 = "prefer-to-be-truthy";
|
|
5335
5343
|
const isTrueLiteral = (node) => node.type === AST_NODE_TYPES.Literal && node.value === true;
|
|
5336
5344
|
var prefer_to_be_truthy_default = createEslintRule({
|
|
5337
|
-
name: RULE_NAME$
|
|
5345
|
+
name: RULE_NAME$19,
|
|
5338
5346
|
meta: {
|
|
5339
5347
|
type: "suggestion",
|
|
5340
5348
|
docs: {
|
|
@@ -5361,7 +5369,7 @@ var prefer_to_be_truthy_default = createEslintRule({
|
|
|
5361
5369
|
|
|
5362
5370
|
//#endregion
|
|
5363
5371
|
//#region src/rules/prefer-to-be.ts
|
|
5364
|
-
const RULE_NAME$
|
|
5372
|
+
const RULE_NAME$18 = "prefer-to-be";
|
|
5365
5373
|
const isNullLiteral = (node) => node.type === AST_NODE_TYPES.Literal && node.value === null;
|
|
5366
5374
|
const isNullEqualityMatcher = (expectFnCall) => isNullLiteral(getFirstMatcherArg(expectFnCall));
|
|
5367
5375
|
const isFirstArgumentIdentifier = (expectFnCall, name) => isIdentifier(getFirstMatcherArg(expectFnCall), name);
|
|
@@ -5386,7 +5394,7 @@ const reportPreferToBe = (context, whatToBe, expectFnCall, func, modifierNode) =
|
|
|
5386
5394
|
});
|
|
5387
5395
|
};
|
|
5388
5396
|
var prefer_to_be_default = createEslintRule({
|
|
5389
|
-
name: RULE_NAME$
|
|
5397
|
+
name: RULE_NAME$18,
|
|
5390
5398
|
meta: {
|
|
5391
5399
|
type: "suggestion",
|
|
5392
5400
|
docs: {
|
|
@@ -5434,10 +5442,10 @@ var prefer_to_be_default = createEslintRule({
|
|
|
5434
5442
|
|
|
5435
5443
|
//#endregion
|
|
5436
5444
|
//#region src/rules/prefer-to-contain.ts
|
|
5437
|
-
const RULE_NAME$
|
|
5445
|
+
const RULE_NAME$17 = "prefer-to-contain";
|
|
5438
5446
|
const isFixableIncludesCallExpression = (node) => node.type === AST_NODE_TYPES.CallExpression && node.callee.type === AST_NODE_TYPES.MemberExpression && isSupportedAccessor(node.callee.property, "includes") && hasOnlyOneArgument(node) && node.arguments[0].type !== AST_NODE_TYPES.SpreadElement;
|
|
5439
5447
|
var prefer_to_contain_default = createEslintRule({
|
|
5440
|
-
name: RULE_NAME$
|
|
5448
|
+
name: RULE_NAME$17,
|
|
5441
5449
|
meta: {
|
|
5442
5450
|
docs: {
|
|
5443
5451
|
description: "enforce using toContain()",
|
|
@@ -5479,9 +5487,9 @@ var prefer_to_contain_default = createEslintRule({
|
|
|
5479
5487
|
|
|
5480
5488
|
//#endregion
|
|
5481
5489
|
//#region src/rules/prefer-to-have-length.ts
|
|
5482
|
-
const RULE_NAME$
|
|
5490
|
+
const RULE_NAME$16 = "prefer-to-have-length";
|
|
5483
5491
|
var prefer_to_have_length_default = createEslintRule({
|
|
5484
|
-
name: RULE_NAME$
|
|
5492
|
+
name: RULE_NAME$16,
|
|
5485
5493
|
meta: {
|
|
5486
5494
|
type: "suggestion",
|
|
5487
5495
|
docs: {
|
|
@@ -5515,7 +5523,7 @@ var prefer_to_have_length_default = createEslintRule({
|
|
|
5515
5523
|
|
|
5516
5524
|
//#endregion
|
|
5517
5525
|
//#region src/rules/prefer-todo.ts
|
|
5518
|
-
const RULE_NAME$
|
|
5526
|
+
const RULE_NAME$15 = "prefer-todo";
|
|
5519
5527
|
const isTargetedTestCase = (vitestFnCall) => {
|
|
5520
5528
|
if (vitestFnCall.members.some((s) => getAccessorValue(s) !== "skip")) return false;
|
|
5521
5529
|
if (vitestFnCall.name.startsWith("x")) return false;
|
|
@@ -5530,7 +5538,7 @@ function createTodoFixer(vitestFnCall, fixer) {
|
|
|
5530
5538
|
return fixer.replaceText(vitestFnCall.head.node, `${vitestFnCall.head.local}.todo`);
|
|
5531
5539
|
}
|
|
5532
5540
|
var prefer_todo_default = createEslintRule({
|
|
5533
|
-
name: RULE_NAME$
|
|
5541
|
+
name: RULE_NAME$15,
|
|
5534
5542
|
meta: {
|
|
5535
5543
|
type: "layout",
|
|
5536
5544
|
docs: {
|
|
@@ -5566,7 +5574,7 @@ var prefer_todo_default = createEslintRule({
|
|
|
5566
5574
|
|
|
5567
5575
|
//#endregion
|
|
5568
5576
|
//#region src/rules/prefer-vi-mocked.ts
|
|
5569
|
-
const RULE_NAME$
|
|
5577
|
+
const RULE_NAME$14 = "prefer-vi-mocked";
|
|
5570
5578
|
const mockTypes = [
|
|
5571
5579
|
"Mock",
|
|
5572
5580
|
"MockedFunction",
|
|
@@ -5574,7 +5582,7 @@ const mockTypes = [
|
|
|
5574
5582
|
"MockedObject"
|
|
5575
5583
|
];
|
|
5576
5584
|
var prefer_vi_mocked_default = createEslintRule({
|
|
5577
|
-
name: RULE_NAME$
|
|
5585
|
+
name: RULE_NAME$14,
|
|
5578
5586
|
meta: {
|
|
5579
5587
|
type: "suggestion",
|
|
5580
5588
|
docs: {
|
|
@@ -5617,9 +5625,9 @@ var prefer_vi_mocked_default = createEslintRule({
|
|
|
5617
5625
|
|
|
5618
5626
|
//#endregion
|
|
5619
5627
|
//#region src/rules/require-awaited-expect-poll.ts
|
|
5620
|
-
const RULE_NAME$
|
|
5628
|
+
const RULE_NAME$13 = "require-awaited-expect-poll";
|
|
5621
5629
|
var require_awaited_expect_poll_default = createEslintRule({
|
|
5622
|
-
name: RULE_NAME$
|
|
5630
|
+
name: RULE_NAME$13,
|
|
5623
5631
|
meta: {
|
|
5624
5632
|
docs: {
|
|
5625
5633
|
requiresTypeChecking: false,
|
|
@@ -5666,7 +5674,7 @@ function skipSequenceExpressions(node) {
|
|
|
5666
5674
|
|
|
5667
5675
|
//#endregion
|
|
5668
5676
|
//#region src/rules/require-hook.ts
|
|
5669
|
-
const RULE_NAME$
|
|
5677
|
+
const RULE_NAME$12 = "require-hook";
|
|
5670
5678
|
const isVitestFnCall = (node, context) => {
|
|
5671
5679
|
if (parseVitestFnCall(node, context)) return true;
|
|
5672
5680
|
return !!getNodeName(node)?.startsWith("vi");
|
|
@@ -5685,7 +5693,7 @@ const shouldBeInHook = (node, context, allowedFunctionCalls = []) => {
|
|
|
5685
5693
|
}
|
|
5686
5694
|
};
|
|
5687
5695
|
var require_hook_default = createEslintRule({
|
|
5688
|
-
name: RULE_NAME$
|
|
5696
|
+
name: RULE_NAME$12,
|
|
5689
5697
|
meta: {
|
|
5690
5698
|
docs: {
|
|
5691
5699
|
description: "require setup and teardown to be within a hook",
|
|
@@ -5724,6 +5732,95 @@ var require_hook_default = createEslintRule({
|
|
|
5724
5732
|
}
|
|
5725
5733
|
});
|
|
5726
5734
|
|
|
5735
|
+
//#endregion
|
|
5736
|
+
//#region src/rules/require-test-timeout.ts
|
|
5737
|
+
const RULE_NAME$11 = "require-test-timeout";
|
|
5738
|
+
var require_test_timeout_default = createEslintRule({
|
|
5739
|
+
name: RULE_NAME$11,
|
|
5740
|
+
meta: {
|
|
5741
|
+
type: "suggestion",
|
|
5742
|
+
docs: {
|
|
5743
|
+
description: "require tests to declare a timeout",
|
|
5744
|
+
recommended: false
|
|
5745
|
+
},
|
|
5746
|
+
messages: { missingTimeout: "Test is missing a timeout. Add an explicit timeout." },
|
|
5747
|
+
schema: []
|
|
5748
|
+
},
|
|
5749
|
+
defaultOptions: [],
|
|
5750
|
+
create(context) {
|
|
5751
|
+
/**
|
|
5752
|
+
* Track positions (character offsets) of vi.setConfig({ testTimeout })
|
|
5753
|
+
* calls so we only exempt tests that appear _after_ the call. We use the
|
|
5754
|
+
* call's end offset and the test's start offset so that a setConfig on the
|
|
5755
|
+
* same line but before the test still exempts it.
|
|
5756
|
+
*/
|
|
5757
|
+
const setConfigPositions = [];
|
|
5758
|
+
return { CallExpression(node) {
|
|
5759
|
+
const vitestFnCall = parseVitestFnCall(node, context);
|
|
5760
|
+
if (vitestFnCall && vitestFnCall.type === "vi") {
|
|
5761
|
+
const firstMember = vitestFnCall.members[0];
|
|
5762
|
+
if (firstMember && getAccessorValue(firstMember) === "setConfig") {
|
|
5763
|
+
const arg = node.arguments[0];
|
|
5764
|
+
if (arg && arg.type === AST_NODE_TYPES.ObjectExpression) {
|
|
5765
|
+
for (const prop of arg.properties) if (prop.type === AST_NODE_TYPES.Property) {
|
|
5766
|
+
const key = prop.key;
|
|
5767
|
+
if ((key.type === AST_NODE_TYPES.Identifier && key.name === "testTimeout" || key.type === AST_NODE_TYPES.Literal && key.value === "testTimeout") && prop.value.type === AST_NODE_TYPES.Literal && typeof prop.value.value === "number" && prop.value.value >= 0) {
|
|
5768
|
+
const endOffset = node.range ? node.range[1] : 0;
|
|
5769
|
+
setConfigPositions.push(endOffset);
|
|
5770
|
+
break;
|
|
5771
|
+
}
|
|
5772
|
+
}
|
|
5773
|
+
}
|
|
5774
|
+
}
|
|
5775
|
+
}
|
|
5776
|
+
if (!vitestFnCall) return;
|
|
5777
|
+
if (vitestFnCall.type !== "test" && vitestFnCall.type !== "it") return;
|
|
5778
|
+
if (vitestFnCall.members.some((m) => {
|
|
5779
|
+
const v = getAccessorValue(m);
|
|
5780
|
+
return v === "todo" || v === "skip";
|
|
5781
|
+
}) || vitestFnCall.name.startsWith("x")) return;
|
|
5782
|
+
const args = node.arguments;
|
|
5783
|
+
if (!args.some((a) => a.type === AST_NODE_TYPES.FunctionExpression || a.type === AST_NODE_TYPES.ArrowFunctionExpression)) return;
|
|
5784
|
+
/**
|
|
5785
|
+
* If there is a setConfig call *before* this test that sets testTimeout,
|
|
5786
|
+
* exempt this test. Note: we compare source positions (character offsets)
|
|
5787
|
+
* so that a later setConfig call does not affect earlier tests.
|
|
5788
|
+
*/
|
|
5789
|
+
const testPos = node.range ? node.range[0] : 0;
|
|
5790
|
+
if (setConfigPositions.some((p) => p <= testPos)) return;
|
|
5791
|
+
let foundNumericTimeout = false;
|
|
5792
|
+
let foundObjectTimeout = false;
|
|
5793
|
+
for (const a of args) {
|
|
5794
|
+
if (a.type === AST_NODE_TYPES.Literal && typeof a.value === "number") if (a.value >= 0) foundNumericTimeout = true;
|
|
5795
|
+
else {
|
|
5796
|
+
context.report({
|
|
5797
|
+
node,
|
|
5798
|
+
messageId: "missingTimeout"
|
|
5799
|
+
});
|
|
5800
|
+
return;
|
|
5801
|
+
}
|
|
5802
|
+
if (a.type === AST_NODE_TYPES.ObjectExpression) for (const prop of a.properties) {
|
|
5803
|
+
if (prop.type !== AST_NODE_TYPES.Property) continue;
|
|
5804
|
+
const key = prop.key;
|
|
5805
|
+
if (key.type === AST_NODE_TYPES.Identifier && key.name === "timeout" || key.type === AST_NODE_TYPES.Literal && key.value === "timeout") if (prop.value.type === AST_NODE_TYPES.Literal && typeof prop.value.value === "number" && prop.value.value >= 0) foundObjectTimeout = true;
|
|
5806
|
+
else {
|
|
5807
|
+
context.report({
|
|
5808
|
+
node,
|
|
5809
|
+
messageId: "missingTimeout"
|
|
5810
|
+
});
|
|
5811
|
+
return;
|
|
5812
|
+
}
|
|
5813
|
+
}
|
|
5814
|
+
}
|
|
5815
|
+
if (foundNumericTimeout || foundObjectTimeout) return;
|
|
5816
|
+
context.report({
|
|
5817
|
+
node,
|
|
5818
|
+
messageId: "missingTimeout"
|
|
5819
|
+
});
|
|
5820
|
+
} };
|
|
5821
|
+
}
|
|
5822
|
+
});
|
|
5823
|
+
|
|
5727
5824
|
//#endregion
|
|
5728
5825
|
//#region src/rules/require-local-test-context-for-concurrent-snapshots.ts
|
|
5729
5826
|
const RULE_NAME$10 = "require-local-test-context-for-concurrent-snapshots";
|
|
@@ -5784,7 +5881,8 @@ var require_mock_type_parameters_default = createEslintRule({
|
|
|
5784
5881
|
type: "object",
|
|
5785
5882
|
properties: { checkImportFunctions: { type: "boolean" } },
|
|
5786
5883
|
additionalProperties: false
|
|
5787
|
-
}]
|
|
5884
|
+
}],
|
|
5885
|
+
defaultOptions: []
|
|
5788
5886
|
},
|
|
5789
5887
|
defaultOptions: [{ checkImportFunctions: false }],
|
|
5790
5888
|
create(context, [options]) {
|
|
@@ -6509,6 +6607,7 @@ var valid_title_default = createEslintRule({
|
|
|
6509
6607
|
] } },
|
|
6510
6608
|
additionalProperties: false
|
|
6511
6609
|
}],
|
|
6610
|
+
defaultOptions: [],
|
|
6512
6611
|
fixable: "code"
|
|
6513
6612
|
},
|
|
6514
6613
|
defaultOptions: [{
|
|
@@ -6790,6 +6889,7 @@ const rules = {
|
|
|
6790
6889
|
"prefer-vi-mocked": prefer_vi_mocked_default,
|
|
6791
6890
|
"require-awaited-expect-poll": require_awaited_expect_poll_default,
|
|
6792
6891
|
"require-hook": require_hook_default,
|
|
6892
|
+
"require-test-timeout": require_test_timeout_default,
|
|
6793
6893
|
"require-local-test-context-for-concurrent-snapshots": require_local_test_context_for_concurrent_snapshots_default,
|
|
6794
6894
|
"require-mock-type-parameters": require_mock_type_parameters_default,
|
|
6795
6895
|
"require-to-throw-message": require_to_throw_message_default,
|
|
@@ -6895,7 +6995,8 @@ const allRules = {
|
|
|
6895
6995
|
"valid-expect-in-promise": "warn",
|
|
6896
6996
|
"valid-expect": "warn",
|
|
6897
6997
|
"valid-title": "warn",
|
|
6898
|
-
"require-awaited-expect-poll": "warn"
|
|
6998
|
+
"require-awaited-expect-poll": "warn",
|
|
6999
|
+
"require-test-timeout": "off"
|
|
6899
7000
|
};
|
|
6900
7001
|
const recommendedRules = {
|
|
6901
7002
|
"expect-expect": "error",
|