Skip to content

test(rules): pin content/hidden-text keeping code text in its length threshold (repo#1639) - #2264

Merged
nc9 merged 1 commit into
mainfrom
boat/code-blocks-keyword-stuffing-1639
Nov 22, 2026
Merged

nc9 merged 1 commit into
mainfrom
boat/code-blocks-keyword-stuffing-1639

Conversation

@nc9

@nc9 nc9 commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

Closes the remaining work on private issue repo#1639 (reading-level was fixed in #1931; keyword-stuffing already skips code via getRenderedProseTextWhere and is pinned by the test in that PR).

hidden-text assessment: the rule measures how much indexable text a hidden element carries. A hidden <pre>/<code> is still text a crawler indexes, and hiding it is what the rule reports, so excluding code would create false negatives and no distortion exists to fix. Rule left unchanged; this PR only adds a test pinning that (hidden prose, <pre>, <code> warn; <script> passes).

Test review: (1) fails if hidden-text switched to getProseTextExcludingCode (the pre/code cases would pass); (2) not a copy of an existing test; (3) no security values.

Gates (packages/rules): format:check, lint, typecheck clean; CI rules step bun run scripts/test-suites.ts --run rules: 12683 pass, 0 fail. make validate not needed (no docs, no new rule, no counts).

Agent skill change: not needed.

@nc9
nc9 marked this pull request as ready for review November 22, 2026 21:38
@nc9
nc9 merged commit fdef0ef into main Nov 22, 2026
10 checks passed
@nc9
nc9 deleted the boat/code-blocks-keyword-stuffing-1639 branch November 22, 2026 21:59
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.

1 participant