Skip to content

Releases: re-cinq/re-lint

v1.11.0

Choose a tag to compare

@saadahmed95 saadahmed95 released this 04 Nov 08:33
9444836
  • A validated by or implemented by title that only a test.describe(),
    test.suite() or test.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-reanchor and no-stale-spec-links report it, which is a
    new error on a spec that cites one; cite an it()/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-link no longer asks for a link on a test.describe(),
    test.suite() or test.step(), in any modifier chain. It still does on every
    it() and test() inside them.

v1.10.0

Choose a tag to compare

@gedaiu gedaiu released this 27 Oct 11:53
3600fa5
  • no-stale-spec-links reports 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 as require-spec-link on the test, with a hint to run
    eslint --fix that could not help. A new error on specs that carried such
    links unnoticed. reportUnhealable: false turns 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's misanchoredLink says to run eslint --fix on the
    spec and to repoint by hand when no-stale-spec-links reports 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 an it.each
    whose table spans several lines. The declaration stays at its opening line,
    where require-spec-link counts 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

Choose a tag to compare

@gedaiu gedaiu released this 26 Oct 12:54
9ea8e26
  • 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-link matches a link whose label names a test of the cited
    file ([validated by <title>], compared as re-lint-reanchor compares
    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-links and re-lint-reanchor repoint 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

Choose a tag to compare

@gedaiu gedaiu released this 09 Oct 09:43
e898dae
  • require-status-matches-coverage and require-statement-links resolve 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 a Draft status passed on a corpus whose links hold.

v1.8.0

Choose a tag to compare

@gedaiu gedaiu released this 07 Oct 12:57
56d11b7

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

Choose a tag to compare

@gedaiu gedaiu released this 06 Oct 11:41
7902805
  • New opt-in no-unguarded-async-button rule: a <button type="submit">, or a
    button whose onClick is an async function, with no disabled binding is
    reported, since a second click starts the request again. A handler name is
    followed in scope to async function, const f = async () => and
    useCallback(async () => …); a spread passes, as it may carry the guard, and
    aria-disabled does not count. components adds a consumer's own button
    components, and pendingComponent / submitComponent name the house
    replacement in the message. Syntactic only, so it runs without type
    information.

What's Changed

Full Changelog: v1.6.0...v1.7.0

v1.6.0

Choose a tag to compare

@gedaiu gedaiu released this 06 Oct 11:27
28f7e82

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

Choose a tag to compare

@loredanamoanga loredanamoanga released this 25 Sep 14:06
dab2375

What's Changed

New Contributors

Full Changelog: v1.4.1...v1.5.0