noctcore-code-quality/skipped-tests-need-tracking
A skipped test must carry a tracking marker (issue URL or
TODO(@owner)) so the debt has an owner.
Recommended preset: error · Autofix: no · Suggestions: no · Type information: not needed
.skip / .fixme / xit / xdescribe are escape hatches. Left unowned they rot into permanent dark
zones — nobody remembers why the test is off or who is meant to turn it back on. Requiring a tracking
marker (an issue URL or a TODO(@owner)) within a few lines of the skip keeps a human attached to the
debt.
.only is deliberately not covered here — no-focused-tests bans it
outright, so it can never legitimately appear with or without tracking.
What it flags
Section titled “What it flags”Any line matching a skip form — it.skip( / test.skip( / describe.skip(, the .fixme( variants,
xit(, xdescribe(, xtest( — with no tracking marker on that line or within the lookback
window above it.
Faithful to the original text-scanning implementation, the source is scanned line by line, so a marker in a trailing comment, a preceding comment, or anywhere in the lookback window is honoured.
// untrackedit.skip('later', () => {});xdescribe('later', () => {});// tracked// TODO(@alice): flaky under CIit.skip('later', () => {});
it.skip('later', () => {}); // https://github.com/org/repo/issues/1What it does not flag
Section titled “What it does not flag”- A test that is not skipped.
- A skip with a
markersmatch on its own line or within thelookbacklines above it. .only:no-focused-testsbans it outright.
Options
Section titled “Options”| Option | Type | Default | Meaning |
|---|---|---|---|
markers |
string[] (regex sources) |
["https?://\\S+", "TODO\\(@?\\S+\\)"] |
Any pattern that, if found in the lookback window, satisfies the tracking requirement. Compiled with the u flag. |
lookback |
integer (≥0) |
30 |
How many lines above the skip a marker may live and still count. |
// Require a Jira-style key instead of a URL / TODO.'noctcore-code-quality/skipped-tests-need-tracking': ['error', { markers: ['[A-Z]+-\\d+'] }]When not to use it
Section titled “When not to use it”If your project already enforces skip-tracking another way, or never skips tests.