Skip to content

🏗️🔧:make the prose linting pipeline actually run - #1793

Open
DerekNonGeneric wants to merge 1 commit into
livefrom
fix/retext-pipeline
Open

🏗️🔧:make the prose linting pipeline actually run#1793
DerekNonGeneric wants to merge 1 commit into
livefrom
fix/retext-pipeline

Conversation

@DerekNonGeneric

Copy link
Copy Markdown
Member

The retext half of remark has never done anything. retext-repeated-words did not flag has has; retext-simplify did not flag utilize. remark-lint rules worked throughout, so the markdown linting looked healthy while the natural-language layer beneath it was inert.

The bug

Plugins were passed as module namespace objects rather than functions. remark-lint tolerates that; remark-retext does not — and it declined to attach rather than complaining. Forcing it surfaces the real failure:

TypeError: attacher.call is not a function
    at apply.remarkRetext (…/remark-retext/lib/index.js:88:35)

Every plugin in the pipeline is now unwrapped with .default.

Switching it on reported 3,183 messages

Which needed a pass before any of this could be enforced:

messages disposition
retext-spell 3034 removed — duplicates cspell
lorem ipsum posts 90 ignored — Latin filler
retext-simplify word swaps 26 ignored — wrong register for technical docs
retext-simplify wordiness 20 ignored — house style
retext-readability 8 threshold set for a professional audience
retext-passive 3 removed — house-style choice we are not making
retext-repeated-words 2 fixed in the docs

retext-spell was the big one, and it was redundant. cspell already runs in this same task, already passes, and reads the very same project-terms.txt — but it also carries software and lorem-ipsum dictionaries, which is why it knows npm and habitasse where retext-spell reports them as unknown. Keeping both would mean hand-maintaining every technical term twice. Removed, with dictionary-en and the strip-comments read of the word list that fed it.

The lorem ipsum posts are placeholder Latin, so the natural-language rules have nothing useful to say about them. They are in .remarkignore now, and remark is invoked with --silently-ignore because this task passes filenames explicitly and remark treats a named-but-ignored file as an error.

retext-simplify wanted at once for immediately, and flagged aggregate — a word from the project's own tagline. Those swaps are ignored, along with the wordiness the house style tolerates. Worth noting for future edits: ignore matches the phrase text, not the rule id the reporter prints, so multi-word entries keep their spaces ('there is', not 'there-is').

retext-readability is set for a professional audience. The strictest setting our prose clears is pinned by a Creative Commons attribution line — boilerplate, not something to rewrite.

The two repeated-word reports were real markup smells: **--bucket** bucket is required. reads the placeholder after a flag as a repeat. Marking placeholders as code says what they are and settles it.

It is tuned, not silenced

The point of tuning rather than disabling is that the pipeline still has to catch things. It does:

$ npx remark probe.md
3:15-3:22  warning Unexpected repeated `has`, remove one occurrence          retext-repeated-words
5:1-8:77   warning Unexpected hard to read sentence, according to 4 out of 7 retext-readability
6:54-6:60  warning Unexpected `retain`, use `keep` instead                   retext-simplify

verify.all passes, and format.all leaves the tree clean.

Note

Also drops a second registration of retext-syntax-urls, which cost nothing while the pipeline was inert.

Part of #254retext-spell, dictionary-en, retext-passive, and strip-comments (abandoned since 2019) all leave devDependencies as a consequence, rather than because they were unused.

List of any relevant issue numbers: #254

The retext half of remark has never done anything. `retext-repeated-
words` did not flag `has has`; `retext-simplify` did not flag
`utilize`. remark-lint rules worked throughout, so the markdown
linting looked healthy and the natural-language layer beneath it was
inert.

Plugins were being passed as module namespace objects rather than
functions. remark-lint tolerates that; remark-retext does not, and it
declined to attach rather than complaining. Forcing it surfaces the
real failure, `attacher.call is not a function`, so every plugin in
the pipeline is now unwrapped.

Switching it on reported 3183 messages, which needed a pass before any
of this could be enforced:

- retext-spell accounted for 3034 of them and duplicates cspell, which
  already runs in this task, already passes, and reads the very same
  project-terms.txt — except it also has software and lorem-ipsum
  dictionaries, which is why it knows `npm` and `habitasse` and
  retext-spell does not. Removed, along with dictionary-en and the
  strip-comments read of the word list that fed it.
- The ten lorem ipsum posts are Latin filler, so the natural-language
  rules have nothing to say about them. Ignored, with remark told to
  --silently-ignore, since this task passes filenames explicitly and
  remark errors on named files it has been told to skip.
- retext-simplify's word swaps mostly read worse in technical prose —
  it wanted `at once` for `immediately`, and flagged `aggregate`,
  which is a word from our own tagline. Those are ignored; wordiness
  the house style tolerates is ignored by phrase alongside them.
- retext-readability is set for a professional audience. The strictest
  setting our prose clears is pinned by a Creative Commons attribution
  line, which is boilerplate rather than something to rewrite.
- retext-passive is a house-style choice we are not making. Removed.

The two remaining repeated-word reports were `**--bucket** bucket`,
where the placeholder after a flag reads as a repeat. Marking those as
code says what they are and settles it.

Also drops a second registration of retext-syntax-urls, which cost
nothing while the pipeline was inert.

The pipeline still reports repeated words, hard sentences, and word
swaps outside the ignore list.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@netlify

netlify Bot commented Aug 10, 2026

Copy link
Copy Markdown

Deploy Preview for gh-pages-openinf ready!

Name Link
🔨 Latest commit eaec243
🔍 Latest deploy log https://app.netlify.com/projects/gh-pages-openinf/deploys/6a796a611fa6e60008a17e66
😎 Deploy Preview https://deploy-preview-1793--gh-pages-openinf.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

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