Skip to content

rules: declare checks for the remaining 311 rules and empty the clean-run baselines (in tranches of ~40) #2218

Done

Description

@nc9

Follow-up from #1741, whose acceptance criteria shipped (#2179 and 0e080dd). What is left is the baselines, which only shrink:

  • packages/rules/tests/fixtures/rule-checks-undeclared.json: 311 rules without a meta.checks declaration (rule-check-declarations.test.ts keeps the list exact and sorted)
  • packages/rules/tests/fixtures/rule-clean-run-empty.json: 6 page rules allowed to emit no check on a clean fixture
  • packages/rules/tests/fixtures/rule-clean-run-site-empty.json: 20 site rules allowed to emit no check on a clean fixture

Declaring 311 rules in one change is far over the reviewable size, so this is done in tranches: about 40 rules per PR, one category at a time where possible, each PR well under 1,500 changed lines. Each tranche declares the check names a rule really emits, links its problem checks to its clean check, and removes those rules from the baseline in the same PR.

Acceptance Criteria

  • rule-checks-undeclared.json is empty: every rule declares meta.checks
  • rule-clean-run-empty.json and rule-clean-run-site-empty.json are empty, or each remaining entry has a one-line reason next to it
  • Every tranche PR shrinks the baselines it touches, adds no new rule to any baseline, and stays under about 40 rules and 1,500 changed lines
  • The undeclared-name guard also covers runs that report problems (problem-path fixtures), not only clean runs of declared rules
  • No check name changes without a changelog.d/ entry
  • bun scripts/rule-checks.ts --check passes in docs/ after every tranche, and the generated rule docs list the new check names

nik

Split (2026-11-25)

Shipped: Three declaration tranches of #2218 on main: 91eef28 (39 rules, #2219), 16b6165 (38 rules: ax, core, url, #2268), 5d46d19 (42 rules: crawl, security, #2291). The undeclared baseline went from 311 to 192 (a11y 61, content 27, eeat 15, images 16, links 17, perf 31, schema 25). Groundwork from #1741 (0e080dd: meta.checks, the clean-run tests, and the 6-page and 20-site clean-run baselines) and the generated rule docs blocks (docs/scripts/rule-checks.ts) are on main. Not done: the clean-run baselines record no reasons; the site clean-run test does not await async rules or apply option defaults (15 of its 20 site entries do emit a skipped/info/pass check when awaited, and 3 links rules throw on missing option defaults); expectDeclaredChecks runs only on the clean fixtures and in 9 rule test files, so problem-path output is mostly unguarded.

Remaining work moved to:

Activity

  1. added
    enhancement
    size: L
    rules
    on Nov 21, 2026
  2. added theissue type on Nov 21, 2026
  3. added
    in-progress
    on Nov 24, 2026
  4. self-assigned this
    on Nov 24, 2026
  5. removed their assignment
    on Nov 25, 2026
  6. removed
    in-progress
    on Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementrulessize: L

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions