@virmator/lint 14.30.2 → 14.30.3

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.
@@ -41,6 +41,16 @@ const objectShapeTesterAssertionNames = [
41
41
  * of its exports (`describe`, `it`, etc.) define tests instead of asserting within them.
42
42
  */
43
43
  const augmentVirTestAssertionNames = ['assertSnapshot'];
44
+ /**
45
+ * Names of `date-vir` exports that throw on invalid input, so a test that calls one is asserting.
46
+ * Recognized by name rather than by treating the whole module as assertion utilities because nearly
47
+ * all of `date-vir`'s exports create or format dates instead of asserting.
48
+ */
49
+ const dateVirAssertionNames = [
50
+ 'assertHasFullDateKeys',
51
+ 'assertValidFullDate',
52
+ 'assertValidTimezone',
53
+ ];
44
54
  /** Names of the test-defining functions whose callbacks must contain at least one assertion. */
45
55
  const testFunctionNames = [
46
56
  'it',
@@ -216,6 +226,7 @@ const rule = {
216
226
  ...augmentVirAssertionNames,
217
227
  ...objectShapeTesterAssertionNames,
218
228
  ...augmentVirTestAssertionNames,
229
+ ...dateVirAssertionNames,
219
230
  ...(options.additionalAssertionNames || []),
220
231
  ];
221
232
  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.30.2",
3
+ "version": "14.30.3",
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.2.1",
36
36
  "@augment-vir/common": "^32.2.1",
37
37
  "@augment-vir/node": "^32.2.1",
38
- "@virmator/core": "^14.30.2",
38
+ "@virmator/core": "^14.30.3",
39
39
  "globals": "^17.7.0",
40
40
  "jiti": "^2.7.0",
41
41
  "mri": "^1.2.0"
@@ -56,6 +56,17 @@ const objectShapeTesterAssertionNames: ReadonlyArray<string> = [
56
56
  */
57
57
  const augmentVirTestAssertionNames: ReadonlyArray<string> = ['assertSnapshot'];
58
58
 
59
+ /**
60
+ * Names of `date-vir` exports that throw on invalid input, so a test that calls one is asserting.
61
+ * Recognized by name rather than by treating the whole module as assertion utilities because nearly
62
+ * all of `date-vir`'s exports create or format dates instead of asserting.
63
+ */
64
+ const dateVirAssertionNames: ReadonlyArray<string> = [
65
+ 'assertHasFullDateKeys',
66
+ 'assertValidFullDate',
67
+ 'assertValidTimezone',
68
+ ];
69
+
59
70
  /** Names of the test-defining functions whose callbacks must contain at least one assertion. */
60
71
  const testFunctionNames: ReadonlyArray<string> = [
61
72
  'it',
@@ -303,6 +314,7 @@ const rule: Rule.RuleModule = {
303
314
  ...augmentVirAssertionNames,
304
315
  ...objectShapeTesterAssertionNames,
305
316
  ...augmentVirTestAssertionNames,
317
+ ...dateVirAssertionNames,
306
318
  ...(options.additionalAssertionNames || []),
307
319
  ];
308
320