Skip to content

rules(content): article-toc rule file exists but is never registered, so it never runs and has no doc page #321

Closed

Description

@nc9

packages/rules/src/content/article-toc.ts exports articleTocRule (id content/article-toc) but nothing imports it: it is absent from the content category index and from the rule registry, so it never runs, is not counted, and has no page under docs/rules/content/ (noticed while rewriting the rule docs in #315). Either it should be registered and documented, or deleted.

Acceptance Criteria

  • Decision recorded here: register or delete.
  • If registered: it appears in the rule registry and category index, has a test, a doc page in the search-first template, and the rule count in docs matches.
  • If deleted: the file is gone and no reference remains.

Activity

  1. added
    rules
    P3
    size: XS
    on Sep 23, 2026
  2. nc9 commented on Oct 11, 2026

    @nc9
    ContributorAuthor

    Checked against current main (ad95fb2): STILL TRUE. packages/rules/src/content/article-toc.ts still exports articleTocRule, and packages/rules/src/content/index.ts still does not import it, so the rule never loads. docs/docs.json (around line 772) still redirects /rules/content/article-toc to /rules/content.

    New since filing: packages/rules/tests/article-toc.test.ts (from #339, ItemList JSON-LD inside an @graph) imports the module directly. So the dead rule now has a test that keeps passing, which makes it look maintained. Whichever way the decision goes, that test goes with it.

  3. nc9 commented on Oct 16, 2026

    @nc9
    ContributorAuthor

    Decision: delete.

    • The rule never ran in any release, so no report, score or user config depends on it.
    • What it recommends is weak advice: "mark a table of contents up with ItemList schema with fragment URLs". Google has no rich result for a table of contents, and in-page jump links come from the anchors themselves, not from ItemList. Registering it would add an info finding to every long article and change the rule count in the docs and the cloud catalog, for no search benefit.
    • The HTML TOC detection is a selector heuristic (.toc, #toc, nav[aria-label*=contents]) that would need its own false-positive work before shipping.

    The PR removes packages/rules/src/content/article-toc.ts and its test. Nothing else imports either. The deployed /rules/content/article-toc → /rules/content redirect (added on purpose in #477) stays, so an old link still lands somewhere. It is a URL, not a reference to the rule.

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

    P3chorerulessize: XS

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions