eslint-plugin-test-governance 0.1.1 → 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 +25 -1
- package/dist/utils/analyze.js +4 -0
- package/dist/utils/tickets.js +3 -1
- package/package.json +5 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,26 @@ 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
|
+
|
|
24
|
+
## [0.2.0] - 2026-10-01
|
|
25
|
+
|
|
26
|
+
0.1.1 was published with these changes by mistake and is deprecated. Use 0.2.0, or stay on 0.1.0
|
|
27
|
+
until you're ready for the changes below.
|
|
28
|
+
|
|
9
29
|
### Added
|
|
10
30
|
|
|
11
31
|
- New rule `require-ticket-in-comments`, on as an error in `recommended`: `FIXME` and `TODO` comments
|
|
@@ -33,6 +53,8 @@ All notable changes to this project are documented here. The format follows
|
|
|
33
53
|
|
|
34
54
|
## [0.1.1] - 2026-10-01
|
|
35
55
|
|
|
56
|
+
Deprecated: this version was published with the changes listed under 0.2.0 by mistake.
|
|
57
|
+
|
|
36
58
|
### Added
|
|
37
59
|
|
|
38
60
|
- Releases are published from a version tag by GitHub Actions, with npm provenance and a GitHub
|
|
@@ -71,6 +93,8 @@ First release.
|
|
|
71
93
|
- Support for ESLint 9 and 10 flat config, JavaScript and TypeScript test files, `.extend()`
|
|
72
94
|
fixtures, describe blocks, runtime skips and tags in titles or the `tag` option.
|
|
73
95
|
|
|
74
|
-
[Unreleased]: https://github.com/Huldoser/eslint-plugin-test-governance/compare/v0.
|
|
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
|
|
98
|
+
[0.2.0]: https://github.com/Huldoser/eslint-plugin-test-governance/compare/v0.1.1...v0.2.0
|
|
75
99
|
[0.1.1]: https://github.com/Huldoser/eslint-plugin-test-governance/compare/v0.1.0...v0.1.1
|
|
76
100
|
[0.1.0]: https://github.com/Huldoser/eslint-plugin-test-governance/releases/tag/v0.1.0
|
package/dist/utils/analyze.js
CHANGED
|
@@ -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));
|
package/dist/utils/tickets.js
CHANGED
|
@@ -139,7 +139,9 @@ function compilePreset(spec) {
|
|
|
139
139
|
}
|
|
140
140
|
let re;
|
|
141
141
|
try {
|
|
142
|
-
|
|
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.
|
|
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"
|