Skip to content

chore(rules): delete the never-registered content/article-toc rule #321 - #873

Merged
nc9 merged 1 commit into
mainfrom
chore/321-delete-article-toc
Oct 17, 2026
Merged

nc9 merged 1 commit into
mainfrom
chore/321-delete-article-toc

Conversation

@nc9

@nc9 nc9 commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Closes #321.

What changes

content/article-toc was never imported into the content category index or the rule registry, so it never loaded: it never ran, had no docs page and was not counted. Its test (added in #339) kept a dead rule looking maintained. The decision, recorded on #321, is to delete it rather than register it. Its advice (ItemList schema for a table of contents) has no search benefit, and registering would add a finding to every long article and change the rule counts.

  • Removed: packages/rules/src/content/article-toc.ts and packages/rules/tests/article-toc.test.ts.
  • Kept: the deployed /rules/content/article-toc → /rules/content redirect in docs/_redirects and docs/docs.json, so old links still land somewhere.
  • No other file references the rule.

Tests

  • tsgo is clean for rules, and test-suites.ts --check passes.
  • No behaviour changes: the rule never ran.

Docs and skill

  • CHANGELOG entry under Unreleased, Removed.
  • The squirrelscan agent skill needs no change.

@nc9
nc9 force-pushed the chore/321-delete-article-toc branch 3 times, most recently from 3f9af1c to e90b447 Compare October 16, 2026 14:00
The rule file was never imported into the content index or the
registry, so it never ran, had no docs page and was not counted; its
test kept a dead rule looking maintained. Deleted with its test. The
deployed /rules/content/article-toc redirect stays so old links work.

Signed-off-by: Nik Cubrilovic <[email protected]>
@nc9
nc9 force-pushed the chore/321-delete-article-toc branch from e90b447 to 2c1cd80 Compare October 17, 2026 15:12
@nc9
nc9 marked this pull request as ready for review October 17, 2026 15:12
@claude

claude Bot commented Oct 17, 2026

Copy link
Copy Markdown

Reviewed the diff. No blocking findings.

I grepped the tree. The only remaining article-toc references are the CHANGELOG entries and the docs/docs.json and docs/_redirects redirects. flattenJsonLdNodes is still used elsewhere, so removing the rule leaves no orphaned helper.

  • (nit) CHANGELOG.md:422 still says content/article-toc finds a TOC ItemList inside @graph. The new Removed entry explains it, so this is fine as history. Consider noting in the new entry that the earlier fix never shipped, to avoid confusing readers.

Test coverage: the deleted test covered only dead code, so nothing is lost. I did not run CI. I only checked references with grep.

@nc9
nc9 merged commit 8a69e75 into main Oct 17, 2026
16 checks passed
@nc9
nc9 deleted the chore/321-delete-article-toc branch October 17, 2026 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant