@vitest/eslint-plugin 1.1.24 → 1.1.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 +14 -5
- package/dist/index.d.cts +1 -1
- package/dist/index.mjs +14 -5
- package/package.json +7 -7
package/dist/index.cjs
CHANGED
|
@@ -23,7 +23,7 @@ function _interopNamespaceCompat(e) {
|
|
|
23
23
|
const path__namespace = /*#__PURE__*/_interopNamespaceCompat(path);
|
|
24
24
|
const ts__default = /*#__PURE__*/_interopDefaultCompat(ts);
|
|
25
25
|
|
|
26
|
-
const version = "1.1.
|
|
26
|
+
const version = "1.1.24";
|
|
27
27
|
|
|
28
28
|
function createEslintRule(rule) {
|
|
29
29
|
const createRule = utils.ESLintUtils.RuleCreator(
|
|
@@ -913,10 +913,19 @@ const consistentTestIt = createEslintRule({
|
|
|
913
913
|
node: specifier,
|
|
914
914
|
data: { testFnKeyWork, oppositeTestKeyword },
|
|
915
915
|
messageId: "consistentMethod",
|
|
916
|
-
fix: (fixer) =>
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
916
|
+
fix: (fixer) => {
|
|
917
|
+
const remainingSpecifiers = node.specifiers.filter((spec) => spec.local.name !== oppositeTestKeyword);
|
|
918
|
+
if (remainingSpecifiers.length > 0) {
|
|
919
|
+
const importText = remainingSpecifiers.map((spec) => spec.local.name).join(", ");
|
|
920
|
+
const lastSpecifierRange = node.specifiers.at(-1)?.range;
|
|
921
|
+
if (!lastSpecifierRange) return null;
|
|
922
|
+
return fixer.replaceTextRange(
|
|
923
|
+
[node.specifiers[0].range[0], lastSpecifierRange[1]],
|
|
924
|
+
importText
|
|
925
|
+
);
|
|
926
|
+
}
|
|
927
|
+
return fixer.replaceText(specifier.local, testFnDisabled);
|
|
928
|
+
}
|
|
920
929
|
});
|
|
921
930
|
}
|
|
922
931
|
}
|
package/dist/index.d.cts
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import { isAbsolute, posix } from 'node:path';
|
|
|
4
4
|
import ts from 'typescript';
|
|
5
5
|
import { createRequire } from 'node:module';
|
|
6
6
|
|
|
7
|
-
const version = "1.1.
|
|
7
|
+
const version = "1.1.24";
|
|
8
8
|
|
|
9
9
|
function createEslintRule(rule) {
|
|
10
10
|
const createRule = ESLintUtils.RuleCreator(
|
|
@@ -894,10 +894,19 @@ const consistentTestIt = createEslintRule({
|
|
|
894
894
|
node: specifier,
|
|
895
895
|
data: { testFnKeyWork, oppositeTestKeyword },
|
|
896
896
|
messageId: "consistentMethod",
|
|
897
|
-
fix: (fixer) =>
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
897
|
+
fix: (fixer) => {
|
|
898
|
+
const remainingSpecifiers = node.specifiers.filter((spec) => spec.local.name !== oppositeTestKeyword);
|
|
899
|
+
if (remainingSpecifiers.length > 0) {
|
|
900
|
+
const importText = remainingSpecifiers.map((spec) => spec.local.name).join(", ");
|
|
901
|
+
const lastSpecifierRange = node.specifiers.at(-1)?.range;
|
|
902
|
+
if (!lastSpecifierRange) return null;
|
|
903
|
+
return fixer.replaceTextRange(
|
|
904
|
+
[node.specifiers[0].range[0], lastSpecifierRange[1]],
|
|
905
|
+
importText
|
|
906
|
+
);
|
|
907
|
+
}
|
|
908
|
+
return fixer.replaceText(specifier.local, testFnDisabled);
|
|
909
|
+
}
|
|
901
910
|
});
|
|
902
911
|
}
|
|
903
912
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitest/eslint-plugin",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.25",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Eslint plugin for vitest",
|
|
6
6
|
"repository": "vitest-dev/eslint-plugin-vitest",
|
|
@@ -32,13 +32,13 @@
|
|
|
32
32
|
"@stylistic/eslint-plugin": "^2.12.1",
|
|
33
33
|
"@types/eslint": "^9.6.1",
|
|
34
34
|
"@types/mocha": "^10.0.10",
|
|
35
|
-
"@types/node": "^22.10.
|
|
36
|
-
"@typescript-eslint/eslint-plugin": "8.
|
|
37
|
-
"@typescript-eslint/parser": "8.
|
|
35
|
+
"@types/node": "^22.10.5",
|
|
36
|
+
"@typescript-eslint/eslint-plugin": "8.19.0",
|
|
37
|
+
"@typescript-eslint/parser": "8.19.0",
|
|
38
38
|
"@typescript-eslint/rule-tester": "8.18.2",
|
|
39
|
-
"@vitest/eslint-plugin": "^1.1.
|
|
39
|
+
"@vitest/eslint-plugin": "^1.1.24",
|
|
40
40
|
"bumpp": "^9.9.2",
|
|
41
|
-
"concurrently": "^9.1.
|
|
41
|
+
"concurrently": "^9.1.2",
|
|
42
42
|
"eslint": "^9.17.0",
|
|
43
43
|
"eslint-doc-generator": "^2.0.2",
|
|
44
44
|
"eslint-plugin-eslint-plugin": "^6.4.0",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"eslint-remote-tester-repositories": "^2.0.0",
|
|
47
47
|
"tsx": "^4.19.2",
|
|
48
48
|
"typescript": "^5.7.2",
|
|
49
|
-
"unbuild": "^3.0
|
|
49
|
+
"unbuild": "^3.2.0",
|
|
50
50
|
"vitest": "^2.1.8"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|