Repository navigation
Releases: re-cinq/re-lint
Release list
v1.11.0
- A
validated byorimplemented bytitle that only atest.describe(),
test.suite()ortest.step()carries now reads as a title no test carries.
Such a link used to pass, though a suite only groups tests and a step runs only
inside one.re-lint-reanchorandno-stale-spec-linksreport it, which is a
new error on a spec that cites one; cite anit()/test()the suite groups,
or the one the step runs in, instead.
A bare label naming one is mapped through the diff hunks like any other link. require-spec-linkno longer asks for a link on atest.describe(),
test.suite()ortest.step(), in any modifier chain. It still does on every
it()andtest()inside them.
v1.10.0
no-stale-spec-linksreports a link it cannot repoint (unhealableLink),
on the spec line with the reason, and no longer stays silent about it: a
title no test carries or several carry, a cited line the branch rewrote, an
anchor on a blank or closing line in a file the branch changed. A rotten
anchor into a file the branch did not change is not reported. Before, such a
link surfaced only asrequire-spec-linkon the test, with a hint to run
eslint --fixthat could not help. A new error on specs that carried such
links unnoticed.reportUnhealable: falseturns the report off, for a
repository that is still draining a queue of them.- A label of the form
validated by name:23, with or without backticks, and a
label that opens with a stray bracket name no test, so the link is mapped
through the diff hunks and is never reported as a missing title. require-spec-link'smisanchoredLinksays to runeslint --fixon the
spec and to repoint by hand whenno-stale-spec-linksreports the link
unhealable.- A test declaration whose title sits below its opening line is read: a title
prettier wrapped onto the next line (it(\n "title",) and anit.each
whose table spans several lines. The declaration stays at its opening line,
whererequire-spec-linkcounts the test from. Before, a titled link into
such a test matched no declaration and was left alone, so it went stale
without a word.
v1.9.0
- Every trailing parenthetical of a statement is read for its test links, not
only the last.Done. ([validated by X](a.test.ts#L10)) ([from plan](https://…))
used to drop the validated-by link silently, so the test read as unlinked
wherever it pointed. Parentheticals before the last count only when they
start with a link, so a prose aside earlier in the sentence is still not
evidence. require-spec-linkmatches a link whose label names a test of the cited
file ([validated by <title>], compared asre-lint-reanchorcompares
titles) to that test alone. Its anchor must land inside the test: one that
drifted into a neighbour is reported on the named test (misanchoredLink)
and no longer counts as linking the neighbour, so a shift reveals every
unlinked test in one run instead of one per CI round. Labels that name no
test of the file keep the old rule: any test the anchor lands in.no-stale-spec-linksandre-lint-reanchorrepoint such a link to the
it()line of the test it names even in a file the branch did not change.
A titled link that lands on no test there is still out of scope.
v1.8.1
require-status-matches-coverageandrequire-statement-linksresolve a document's test links against the git work tree the document sits in, not against the directory ESLint was run from. Run from a subdirectory, every repo-relative link used to miss, a document read as having no evidence, and aDraftstatus passed on a corpus whose links hold.
v1.8.0
What's Changed
- Ground spec status in real tests, and fix status and link anchors under eslint --fix by @gedaiu in #13
- Autofix for no-nested-if, no-closing-brace-comments and require-fetch-timeout by @gedaiu in #14
Full Changelog: v1.7.0...v1.8.0
v1.7.0
- New opt-in
no-unguarded-async-buttonrule: a<button type="submit">, or a
button whoseonClickis an async function, with nodisabledbinding is
reported, since a second click starts the request again. A handler name is
followed in scope toasync function,const f = async () =>and
useCallback(async () => …); a spread passes, as it may carry the guard, and
aria-disableddoes not count.componentsadds a consumer's own button
components, andpendingComponent/submitComponentname the house
replacement in the message. Syntactic only, so it runs without type
information.
What's Changed
- feat(rules): add no-unguarded-async-button by @loredanamoanga in #11
Full Changelog: v1.6.0...v1.7.0
v1.6.0
Two new things for keeping specs true, plus the re-anchorer reading every link form a consumer's specs use.
no-ungrounded-spec-name — a repository path a spec or ADR names in backticks, or bare in a quoted passage, must exist. no-dead-md-links cannot see these: the house convention writes code paths as inline code precisely so they are not link-checked, which is how a spec came to name three files deleted two days before it was approved. The rule vendors the planning line's own grounding parser and keeps its escape hatches — a line saying the change adds the path, or a files-touched list naming it — reports a retired component with the hint that says what took its work, and skips a rejected or retired document. Identifier findings are left to the planning line, which has the file contents to judge them. In the specs preset at warn.
The specs preset — reLint.configs.specs({ markdown }) wires the five document rules over specs/**/spec.md, adrs/**/*.md and every markdown file, plus require-spec-link over test files, at the severities the repository this package grew out of runs them. README § Keeping specs true has the adoption recipe.
re-lint-reanchor now reports a [validated by <title>] link whose title no test in the cited file carries, instead of letting it fall through to the hunk mapping and keep passing --check; and it reads every link form a consumer's specs use — a root-relative href beside the ../ form, a bare href read beside the document, implemented by <title> and bare [<title>] labels — so it can replace a consumer's own copy of that logic.
Full notes in CHANGELOG.md.
v1.5.0
What's Changed
- feat(spec): add spec-link re-anchor module and cli by @loredanamoanga in #7
- ci(publish): release from a GitHub Release, staged on npm by @loredanamoanga in #8
New Contributors
- @loredanamoanga made their first contribution in #7
Full Changelog: v1.4.1...v1.5.0