eslint-plugin-test-governance 0.2.0 → 0.2.1

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/CHANGELOG.md CHANGED
@@ -6,6 +6,21 @@ All notable changes to this project are documented here. The format follows
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.2.1] - 2026-10-03
10
+
11
+ ### Added
12
+
13
+ - A `funding` link in `package.json`, so `npm fund` points to
14
+ [GitHub Sponsors](https://github.com/sponsors/Huldoser).
15
+
16
+ ### Fixed
17
+
18
+ - A `pattern` ticket preset with the `g` or `y` flag no longer rejects every other valid ticket. Those
19
+ flags are now ignored, since a ticket is always matched whole.
20
+ - A marker directly above a test that is the body of an arrow function, such as
21
+ `rows.forEach((row) =>` followed by `// SKIP: WEB-1` and `test.skip(...)`, is found. It was
22
+ reported both as missing and as a stray marker.
23
+
9
24
  ## [0.2.0] - 2026-10-01
10
25
 
11
26
  0.1.1 was published with these changes by mistake and is deprecated. Use 0.2.0, or stay on 0.1.0
@@ -78,7 +93,8 @@ First release.
78
93
  - Support for ESLint 9 and 10 flat config, JavaScript and TypeScript test files, `.extend()`
79
94
  fixtures, describe blocks, runtime skips and tags in titles or the `tag` option.
80
95
 
81
- [Unreleased]: https://github.com/Huldoser/eslint-plugin-test-governance/compare/v0.2.0...HEAD
96
+ [Unreleased]: https://github.com/Huldoser/eslint-plugin-test-governance/compare/v0.2.1...HEAD
97
+ [0.2.1]: https://github.com/Huldoser/eslint-plugin-test-governance/compare/v0.2.0...v0.2.1
82
98
  [0.2.0]: https://github.com/Huldoser/eslint-plugin-test-governance/compare/v0.1.1...v0.2.0
83
99
  [0.1.1]: https://github.com/Huldoser/eslint-plugin-test-governance/compare/v0.1.0...v0.1.1
84
100
  [0.1.0]: https://github.com/Huldoser/eslint-plugin-test-governance/releases/tag/v0.1.0
@@ -297,6 +297,10 @@ function runAnalysis(sourceCode, options) {
297
297
  const parent = stack.at(-1);
298
298
  const anchor = anchorOf(call);
299
299
  const block = commentBlock(sourceCode, anchor, options.allowBlankLine);
300
+ // `rows.forEach((row) =>\n // SKIP: WEB-1\n test.skip(...))`: the marker sits above the call itself.
301
+ if (call.parent.type === 'ArrowFunctionExpression' && call.parent.body === call) {
302
+ block.push(...commentBlock(sourceCode, call, options.allowBlankLine));
303
+ }
300
304
  for (const comment of block)
301
305
  claimed.add(comment);
302
306
  const ownTags = new Set(tagInfo.tags.map((t) => t.tag));
@@ -139,7 +139,9 @@ function compilePreset(spec) {
139
139
  }
140
140
  let re;
141
141
  try {
142
- re = new RegExp(`^(?:${spec.pattern})$`, spec.flags);
142
+ // `g` and `y` make `test()` resume from the last match, so the same ticket would pass and fail
143
+ // in turn. A ticket is matched whole, so they never change what matches; drop them.
144
+ re = new RegExp(`^(?:${spec.pattern})$`, spec.flags?.replace(/[gy]/g, ''));
143
145
  }
144
146
  catch (error) {
145
147
  throw new ConfigError(`invalid ticket pattern "${spec.pattern}": ${error.message}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-test-governance",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "ESLint rules that require a ticket comment above skipped, fixme and tagged Playwright tests.",
5
5
  "keywords": [
6
6
  "eslint",
@@ -13,6 +13,10 @@
13
13
  "bugs": {
14
14
  "url": "https://github.com/Huldoser/eslint-plugin-test-governance/issues"
15
15
  },
16
+ "funding": {
17
+ "type": "github",
18
+ "url": "https://github.com/sponsors/Huldoser"
19
+ },
16
20
  "repository": {
17
21
  "type": "git",
18
22
  "url": "git+https://github.com/Huldoser/eslint-plugin-test-governance.git"