@virmator/lint 14.27.2 → 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.2",
3
+ "version": "14.27.4",
4
4
  "description": "Default ESLint linting plugin for virmator.",
5
5
  "keywords": [
6
6
  "virmator",
@@ -32,16 +32,16 @@
32
32
  "test:update": "npm test update"
33
33
  },
34
34
  "dependencies": {
35
- "@augment-vir/assert": "^31.73.2",
36
- "@augment-vir/common": "^31.73.2",
37
- "@augment-vir/node": "^31.73.2",
38
- "@virmator/core": "^14.27.2",
35
+ "@augment-vir/assert": "^32.0.0",
36
+ "@augment-vir/common": "^32.0.0",
37
+ "@augment-vir/node": "^32.0.0",
38
+ "@virmator/core": "^14.27.4",
39
39
  "globals": "^17.7.0",
40
40
  "jiti": "^2.7.0",
41
41
  "mri": "^1.2.0"
42
42
  },
43
43
  "devDependencies": {
44
- "@augment-vir/test": "^31.73.2",
44
+ "@augment-vir/test": "^32.0.0",
45
45
  "@eslint/js": "10.0.1",
46
46
  "@stylistic/eslint-plugin": "^5.10.0",
47
47
  "@stylistic/eslint-plugin-ts": "^4.4.1",
@@ -51,7 +51,7 @@
51
51
  "c8": "^11.0.0",
52
52
  "eslint": "^10.5.0",
53
53
  "eslint-config-prettier": "^10.1.8",
54
- "eslint-plugin-jsdoc": "^63.0.8",
54
+ "eslint-plugin-jsdoc": "^63.0.9",
55
55
  "eslint-plugin-playwright": "^2.10.4",
56
56
  "eslint-plugin-prettier": "^5.5.6",
57
57
  "eslint-plugin-sonarjs": "^4.1.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