@vitest/eslint-plugin 1.0.1 → 1.0.2
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 -1
- package/dist/index.cjs +8 -6
- package/dist/index.mjs +8 -6
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -24,7 +24,7 @@ function _interopNamespaceCompat(e) {
|
|
|
24
24
|
const path__namespace = /*#__PURE__*/_interopNamespaceCompat(path);
|
|
25
25
|
const ts__default = /*#__PURE__*/_interopDefaultCompat(ts);
|
|
26
26
|
|
|
27
|
-
const version = "1.0.
|
|
27
|
+
const version = "1.0.1";
|
|
28
28
|
|
|
29
29
|
function createEslintRule(rule) {
|
|
30
30
|
const createRule = utils.ESLintUtils.RuleCreator(
|
|
@@ -806,12 +806,14 @@ const expectExpect = createEslintRule({
|
|
|
806
806
|
}
|
|
807
807
|
},
|
|
808
808
|
"Program:exit"() {
|
|
809
|
-
unchecked.
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
809
|
+
const isActuallyNotValid = unchecked.filter((node) => node.arguments.some((arg) => arg.type === utils.AST_NODE_TYPES.Literal && arg.value === "assert"));
|
|
810
|
+
if (!isActuallyNotValid.length)
|
|
811
|
+
unchecked.forEach((node) => {
|
|
812
|
+
context.report({
|
|
813
|
+
node: node.callee,
|
|
814
|
+
messageId: "noAssertions"
|
|
815
|
+
});
|
|
813
816
|
});
|
|
814
|
-
});
|
|
815
817
|
}
|
|
816
818
|
};
|
|
817
819
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import ts from 'typescript';
|
|
|
5
5
|
import { fileURLToPath } from 'node:url';
|
|
6
6
|
import { createRequire } from 'node:module';
|
|
7
7
|
|
|
8
|
-
const version = "1.0.
|
|
8
|
+
const version = "1.0.1";
|
|
9
9
|
|
|
10
10
|
function createEslintRule(rule) {
|
|
11
11
|
const createRule = ESLintUtils.RuleCreator(
|
|
@@ -787,12 +787,14 @@ const expectExpect = createEslintRule({
|
|
|
787
787
|
}
|
|
788
788
|
},
|
|
789
789
|
"Program:exit"() {
|
|
790
|
-
unchecked.
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
790
|
+
const isActuallyNotValid = unchecked.filter((node) => node.arguments.some((arg) => arg.type === AST_NODE_TYPES.Literal && arg.value === "assert"));
|
|
791
|
+
if (!isActuallyNotValid.length)
|
|
792
|
+
unchecked.forEach((node) => {
|
|
793
|
+
context.report({
|
|
794
|
+
node: node.callee,
|
|
795
|
+
messageId: "noAssertions"
|
|
796
|
+
});
|
|
794
797
|
});
|
|
795
|
-
});
|
|
796
798
|
}
|
|
797
799
|
};
|
|
798
800
|
}
|