@virmator/lint 14.27.3 → 14.27.4
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.
|
@@ -24,6 +24,17 @@ const augmentVirAssertionNames = [
|
|
|
24
24
|
'checkWrap',
|
|
25
25
|
'waitUntil',
|
|
26
26
|
];
|
|
27
|
+
/**
|
|
28
|
+
* Names of `object-shape-tester` exports that throw on an invalid shape, so a test that calls one
|
|
29
|
+
* is asserting. Recognized by name (regardless of import path) because `object-shape-tester` is a
|
|
30
|
+
* shape-definition package rather than a dedicated assertion package: most of its exports (for
|
|
31
|
+
* example `defineShape` and `checkValidShape`) are not assertions, so the whole module cannot be
|
|
32
|
+
* treated as assertion utilities.
|
|
33
|
+
*/
|
|
34
|
+
const objectShapeTesterAssertionNames = [
|
|
35
|
+
'assertValidShape',
|
|
36
|
+
'assertWrapValidShape',
|
|
37
|
+
];
|
|
27
38
|
/** Names of the test-defining functions whose callbacks must contain at least one assertion. */
|
|
28
39
|
const testFunctionNames = [
|
|
29
40
|
'it',
|
|
@@ -191,6 +202,7 @@ const rule = {
|
|
|
191
202
|
];
|
|
192
203
|
const names = [
|
|
193
204
|
...augmentVirAssertionNames,
|
|
205
|
+
...objectShapeTesterAssertionNames,
|
|
194
206
|
...(options.additionalAssertionNames || []),
|
|
195
207
|
];
|
|
196
208
|
const assertionIdentifiers = collectAssertionIdentifiers(context.sourceCode.ast.body, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@virmator/lint",
|
|
3
|
-
"version": "14.27.
|
|
3
|
+
"version": "14.27.4",
|
|
4
4
|
"description": "Default ESLint linting plugin for virmator.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"virmator",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@augment-vir/assert": "^32.0.0",
|
|
36
36
|
"@augment-vir/common": "^32.0.0",
|
|
37
37
|
"@augment-vir/node": "^32.0.0",
|
|
38
|
-
"@virmator/core": "^14.27.
|
|
38
|
+
"@virmator/core": "^14.27.4",
|
|
39
39
|
"globals": "^17.7.0",
|
|
40
40
|
"jiti": "^2.7.0",
|
|
41
41
|
"mri": "^1.2.0"
|
|
@@ -37,6 +37,18 @@ const augmentVirAssertionNames: ReadonlyArray<string> = [
|
|
|
37
37
|
'waitUntil',
|
|
38
38
|
];
|
|
39
39
|
|
|
40
|
+
/**
|
|
41
|
+
* Names of `object-shape-tester` exports that throw on an invalid shape, so a test that calls one
|
|
42
|
+
* is asserting. Recognized by name (regardless of import path) because `object-shape-tester` is a
|
|
43
|
+
* shape-definition package rather than a dedicated assertion package: most of its exports (for
|
|
44
|
+
* example `defineShape` and `checkValidShape`) are not assertions, so the whole module cannot be
|
|
45
|
+
* treated as assertion utilities.
|
|
46
|
+
*/
|
|
47
|
+
const objectShapeTesterAssertionNames: ReadonlyArray<string> = [
|
|
48
|
+
'assertValidShape',
|
|
49
|
+
'assertWrapValidShape',
|
|
50
|
+
];
|
|
51
|
+
|
|
40
52
|
/** Names of the test-defining functions whose callbacks must contain at least one assertion. */
|
|
41
53
|
const testFunctionNames: ReadonlyArray<string> = [
|
|
42
54
|
'it',
|
|
@@ -282,6 +294,7 @@ const rule: Rule.RuleModule = {
|
|
|
282
294
|
];
|
|
283
295
|
const names = [
|
|
284
296
|
...augmentVirAssertionNames,
|
|
297
|
+
...objectShapeTesterAssertionNames,
|
|
285
298
|
...(options.additionalAssertionNames || []),
|
|
286
299
|
];
|
|
287
300
|
|