@vitest/eslint-plugin 1.3.24 → 1.3.25
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/dist/index.cjs +7 -7
- package/dist/index.d.cts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +7 -7
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -33,7 +33,7 @@ let __typescript_eslint_scope_manager = require("@typescript-eslint/scope-manage
|
|
|
33
33
|
__typescript_eslint_scope_manager = __toESM(__typescript_eslint_scope_manager);
|
|
34
34
|
|
|
35
35
|
//#region package.json
|
|
36
|
-
var version = "1.3.
|
|
36
|
+
var version = "1.3.25";
|
|
37
37
|
|
|
38
38
|
//#endregion
|
|
39
39
|
//#region src/utils/index.ts
|
|
@@ -2669,20 +2669,20 @@ var consistent_test_filename_default = createEslintRule({
|
|
|
2669
2669
|
}]
|
|
2670
2670
|
},
|
|
2671
2671
|
defaultOptions: [{
|
|
2672
|
-
pattern: defaultPattern,
|
|
2673
|
-
allTestPattern: defaultTestsPattern
|
|
2672
|
+
pattern: defaultPattern.source,
|
|
2673
|
+
allTestPattern: defaultTestsPattern.source
|
|
2674
2674
|
}],
|
|
2675
2675
|
create: (context, options) => {
|
|
2676
2676
|
const { pattern: patternRaw, allTestPattern: allTestPatternRaw } = options[0];
|
|
2677
|
-
const pattern =
|
|
2678
|
-
const
|
|
2677
|
+
const pattern = new RegExp(patternRaw);
|
|
2678
|
+
const allTestPattern = new RegExp(allTestPatternRaw);
|
|
2679
2679
|
const { filename } = context;
|
|
2680
|
-
if (!
|
|
2680
|
+
if (!allTestPattern.test(filename)) return {};
|
|
2681
2681
|
return { Program: (p) => {
|
|
2682
2682
|
if (!pattern.test(filename)) context.report({
|
|
2683
2683
|
node: p,
|
|
2684
2684
|
messageId: "consistentTestFilename",
|
|
2685
|
-
data: { pattern:
|
|
2685
|
+
data: { pattern: patternRaw }
|
|
2686
2686
|
});
|
|
2687
2687
|
} };
|
|
2688
2688
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -104,8 +104,8 @@ declare const plugin: {
|
|
|
104
104
|
}>], PluginDocs, _typescript_eslint_utils_ts_eslint0.RuleListener>;
|
|
105
105
|
readonly "no-restricted-vi-methods": _typescript_eslint_utils_ts_eslint0.RuleModule<MESSAGE_ID$1, Options$2, PluginDocs, _typescript_eslint_utils_ts_eslint0.RuleListener>;
|
|
106
106
|
readonly "consistent-test-filename": _typescript_eslint_utils_ts_eslint0.RuleModule<"consistentTestFilename", [Partial<{
|
|
107
|
-
pattern:
|
|
108
|
-
allTestPattern:
|
|
107
|
+
pattern: string;
|
|
108
|
+
allTestPattern: string;
|
|
109
109
|
}>], PluginDocs, _typescript_eslint_utils_ts_eslint0.RuleListener>;
|
|
110
110
|
readonly "max-expects": _typescript_eslint_utils_ts_eslint0.RuleModule<"maxExpect", Options$1, PluginDocs, _typescript_eslint_utils_ts_eslint0.RuleListener>;
|
|
111
111
|
readonly "no-alias-methods": _typescript_eslint_utils_ts_eslint0.RuleModule<"noAliasMethods", [], PluginDocs, _typescript_eslint_utils_ts_eslint0.RuleListener>;
|
|
@@ -271,8 +271,8 @@ declare const plugin: {
|
|
|
271
271
|
}>], PluginDocs, _typescript_eslint_utils_ts_eslint0.RuleListener>;
|
|
272
272
|
readonly "no-restricted-vi-methods": _typescript_eslint_utils_ts_eslint0.RuleModule<MESSAGE_ID$1, Options$2, PluginDocs, _typescript_eslint_utils_ts_eslint0.RuleListener>;
|
|
273
273
|
readonly "consistent-test-filename": _typescript_eslint_utils_ts_eslint0.RuleModule<"consistentTestFilename", [Partial<{
|
|
274
|
-
pattern:
|
|
275
|
-
allTestPattern:
|
|
274
|
+
pattern: string;
|
|
275
|
+
allTestPattern: string;
|
|
276
276
|
}>], PluginDocs, _typescript_eslint_utils_ts_eslint0.RuleListener>;
|
|
277
277
|
readonly "max-expects": _typescript_eslint_utils_ts_eslint0.RuleModule<"maxExpect", Options$1, PluginDocs, _typescript_eslint_utils_ts_eslint0.RuleListener>;
|
|
278
278
|
readonly "no-alias-methods": _typescript_eslint_utils_ts_eslint0.RuleModule<"noAliasMethods", [], PluginDocs, _typescript_eslint_utils_ts_eslint0.RuleListener>;
|
|
@@ -576,8 +576,8 @@ declare const plugin: {
|
|
|
576
576
|
}>], PluginDocs, _typescript_eslint_utils_ts_eslint0.RuleListener>;
|
|
577
577
|
readonly "no-restricted-vi-methods": _typescript_eslint_utils_ts_eslint0.RuleModule<MESSAGE_ID$1, Options$2, PluginDocs, _typescript_eslint_utils_ts_eslint0.RuleListener>;
|
|
578
578
|
readonly "consistent-test-filename": _typescript_eslint_utils_ts_eslint0.RuleModule<"consistentTestFilename", [Partial<{
|
|
579
|
-
pattern:
|
|
580
|
-
allTestPattern:
|
|
579
|
+
pattern: string;
|
|
580
|
+
allTestPattern: string;
|
|
581
581
|
}>], PluginDocs, _typescript_eslint_utils_ts_eslint0.RuleListener>;
|
|
582
582
|
readonly "max-expects": _typescript_eslint_utils_ts_eslint0.RuleModule<"maxExpect", Options$1, PluginDocs, _typescript_eslint_utils_ts_eslint0.RuleListener>;
|
|
583
583
|
readonly "no-alias-methods": _typescript_eslint_utils_ts_eslint0.RuleModule<"noAliasMethods", [], PluginDocs, _typescript_eslint_utils_ts_eslint0.RuleListener>;
|
package/dist/index.d.ts
CHANGED
|
@@ -106,8 +106,8 @@ declare const plugin: {
|
|
|
106
106
|
}>], PluginDocs, _typescript_eslint_utils_ts_eslint0.RuleListener>;
|
|
107
107
|
readonly "no-restricted-vi-methods": _typescript_eslint_utils_ts_eslint0.RuleModule<MESSAGE_ID$1, Options$2, PluginDocs, _typescript_eslint_utils_ts_eslint0.RuleListener>;
|
|
108
108
|
readonly "consistent-test-filename": _typescript_eslint_utils_ts_eslint0.RuleModule<"consistentTestFilename", [Partial<{
|
|
109
|
-
pattern:
|
|
110
|
-
allTestPattern:
|
|
109
|
+
pattern: string;
|
|
110
|
+
allTestPattern: string;
|
|
111
111
|
}>], PluginDocs, _typescript_eslint_utils_ts_eslint0.RuleListener>;
|
|
112
112
|
readonly "max-expects": _typescript_eslint_utils_ts_eslint0.RuleModule<"maxExpect", Options$1, PluginDocs, _typescript_eslint_utils_ts_eslint0.RuleListener>;
|
|
113
113
|
readonly "no-alias-methods": _typescript_eslint_utils_ts_eslint0.RuleModule<"noAliasMethods", [], PluginDocs, _typescript_eslint_utils_ts_eslint0.RuleListener>;
|
|
@@ -273,8 +273,8 @@ declare const plugin: {
|
|
|
273
273
|
}>], PluginDocs, _typescript_eslint_utils_ts_eslint0.RuleListener>;
|
|
274
274
|
readonly "no-restricted-vi-methods": _typescript_eslint_utils_ts_eslint0.RuleModule<MESSAGE_ID$1, Options$2, PluginDocs, _typescript_eslint_utils_ts_eslint0.RuleListener>;
|
|
275
275
|
readonly "consistent-test-filename": _typescript_eslint_utils_ts_eslint0.RuleModule<"consistentTestFilename", [Partial<{
|
|
276
|
-
pattern:
|
|
277
|
-
allTestPattern:
|
|
276
|
+
pattern: string;
|
|
277
|
+
allTestPattern: string;
|
|
278
278
|
}>], PluginDocs, _typescript_eslint_utils_ts_eslint0.RuleListener>;
|
|
279
279
|
readonly "max-expects": _typescript_eslint_utils_ts_eslint0.RuleModule<"maxExpect", Options$1, PluginDocs, _typescript_eslint_utils_ts_eslint0.RuleListener>;
|
|
280
280
|
readonly "no-alias-methods": _typescript_eslint_utils_ts_eslint0.RuleModule<"noAliasMethods", [], PluginDocs, _typescript_eslint_utils_ts_eslint0.RuleListener>;
|
|
@@ -578,8 +578,8 @@ declare const plugin: {
|
|
|
578
578
|
}>], PluginDocs, _typescript_eslint_utils_ts_eslint0.RuleListener>;
|
|
579
579
|
readonly "no-restricted-vi-methods": _typescript_eslint_utils_ts_eslint0.RuleModule<MESSAGE_ID$1, Options$2, PluginDocs, _typescript_eslint_utils_ts_eslint0.RuleListener>;
|
|
580
580
|
readonly "consistent-test-filename": _typescript_eslint_utils_ts_eslint0.RuleModule<"consistentTestFilename", [Partial<{
|
|
581
|
-
pattern:
|
|
582
|
-
allTestPattern:
|
|
581
|
+
pattern: string;
|
|
582
|
+
allTestPattern: string;
|
|
583
583
|
}>], PluginDocs, _typescript_eslint_utils_ts_eslint0.RuleListener>;
|
|
584
584
|
readonly "max-expects": _typescript_eslint_utils_ts_eslint0.RuleModule<"maxExpect", Options$1, PluginDocs, _typescript_eslint_utils_ts_eslint0.RuleListener>;
|
|
585
585
|
readonly "no-alias-methods": _typescript_eslint_utils_ts_eslint0.RuleModule<"noAliasMethods", [], PluginDocs, _typescript_eslint_utils_ts_eslint0.RuleListener>;
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { isAbsolute, posix } from "node:path";
|
|
|
5
5
|
import { DefinitionType } from "@typescript-eslint/scope-manager";
|
|
6
6
|
|
|
7
7
|
//#region package.json
|
|
8
|
-
var version = "1.3.
|
|
8
|
+
var version = "1.3.25";
|
|
9
9
|
|
|
10
10
|
//#endregion
|
|
11
11
|
//#region src/utils/index.ts
|
|
@@ -2641,20 +2641,20 @@ var consistent_test_filename_default = createEslintRule({
|
|
|
2641
2641
|
}]
|
|
2642
2642
|
},
|
|
2643
2643
|
defaultOptions: [{
|
|
2644
|
-
pattern: defaultPattern,
|
|
2645
|
-
allTestPattern: defaultTestsPattern
|
|
2644
|
+
pattern: defaultPattern.source,
|
|
2645
|
+
allTestPattern: defaultTestsPattern.source
|
|
2646
2646
|
}],
|
|
2647
2647
|
create: (context, options) => {
|
|
2648
2648
|
const { pattern: patternRaw, allTestPattern: allTestPatternRaw } = options[0];
|
|
2649
|
-
const pattern =
|
|
2650
|
-
const
|
|
2649
|
+
const pattern = new RegExp(patternRaw);
|
|
2650
|
+
const allTestPattern = new RegExp(allTestPatternRaw);
|
|
2651
2651
|
const { filename } = context;
|
|
2652
|
-
if (!
|
|
2652
|
+
if (!allTestPattern.test(filename)) return {};
|
|
2653
2653
|
return { Program: (p) => {
|
|
2654
2654
|
if (!pattern.test(filename)) context.report({
|
|
2655
2655
|
node: p,
|
|
2656
2656
|
messageId: "consistentTestFilename",
|
|
2657
|
-
data: { pattern:
|
|
2657
|
+
data: { pattern: patternRaw }
|
|
2658
2658
|
});
|
|
2659
2659
|
} };
|
|
2660
2660
|
}
|