Repository navigation
fix(rules): placeholder-text reads the title; mojibake reads rendered prose #215 #216 - #885
Merged
Merged
Conversation
… prose #215 #216 content/placeholder-text adds a placeholder-title check: [object X] anywhere fails, undefined/null/NaN as a whole segment warns, unless the page's h1 or a <code> names that word. content/mojibake switches to getRenderedProseText. Canonical golden counts unchanged. Signed-off-by: Nik Cubrilovic <[email protected]>
nc9
force-pushed
the
fix/215-216-title-and-mojibake-prose
branch
from
October 17, 2026 00:46
474641d to
bcad6fa
Compare
nc9
marked this pull request as ready for review
October 17, 2026 00:46
|
Review of PR 885: title check in No high or critical findings.
The docs and changelog entries match the implemented behaviour. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #215
Closes #216
Two content-rule follow-ups from #214, in one PR because they touch the same prose helpers and docs.
#215: the title
Ownership decision:
content/placeholder-textowns this, because it already has the stringified-value logic and its docs-page guards.core/meta-titlejudges presence and length only. Both docs pages say so.The rule adds a
placeholder-titlecheck, emitted only when there is a finding. A pass row on every page would dilute the body check's score on the pages that have one.[object X]anywhere in the title: fail, the same as the body family.undefined,nullorNaNas a whole separator-delimited segment (|,-,–,—,·,•,»,›,/,::, at either end too): warn, the same as the body family.<h1>or a<code>element is exactly that word, so MDN'sundefined - JavaScript | MDNis not reported. Each value is judged on its own, soundefined | null | Acmeon the MDN page still reportsnull.<h1>is alsoundefinedis reported by the existing body check, which is the same rule, so the title never adds a second rule.#216: mojibake reads rendered prose
content/mojibakeswitches fromgetProseTextExcludingCodetogetRenderedProseText, the helper placeholder-text uses. That excludes<template>and code-editor/highlighter containers and puts a break at every block boundary. Ordinary prose reports exactly as before.The canonical golden counts did not move: the synthetic site has no template, editor markup or mojibake, and every title is real copy. A comment in
streaming-rules-canonical-golden.test.tsrecords that.Acceptance criteria
#215
<title>with a standaloneundefined/null/NaN/[object Object]is reported by exactly one ruleundefined - JavaScript | MDNis not reported#216
<template>or a code-editor container (cm-editor,monaco-editor,hljs,language-*)mojibake.mdxlists the same exclusions as the codeSkill: no change needed.
Tests:
placeholder-text.test.ts,mojibake.test.ts,content-no-dom-mutation.test.ts112/112 pass. Canonical golden passes. Also typecheck (rules), oxlint on changed files (the two remaining warnings are on an existing line), andtangly check --strict. Codex review took 2 rounds; it found P2 edge separators and P3 per-value exemption, both fixed.