ci: catch typos with cspell, and fix the five it found - #8404
Merged
Merged
Conversation
The site had no spellchecker: vale runs proselint and Speciesism, neither of which checks spelling, so a misspelling only ever got caught by a reader. That is why refrence sat in the TypeScript guide for months while the PR fixing it waited on a CLA. Adds cspell with a word list covering the site's vocabulary, wires it into the lint script and the lint CI job, and fixes what it found: refrence, a Concatinating heading, nummber, testLolcalStorage and scollbar. The deliberate misspellings that teach something -- cosnole in the development guide, prefx in the loader options example, and webpack 1's real OccurenceOrderPlugin -- get a file-local cspell:ignore instead of a dictionary entry, so the same word elsewhere is still an error.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
This branch was successfully deployed
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.
Summary
Nothing on this site checks spelling.
lint:proseruns vale with proselint and Speciesism, and neither has a dictionary, so a misspelling is only ever caught by a reader who reports it. That is whyrefrencehas been sitting in the TypeScript guide since at least June: #8259 fixes exactly that word and has been blocked on an EasyCLA email mismatch through three requests. This adds the check webpack/webpack already runs, with a word list seeded from the site's own vocabulary, wired intolintand into thelintCI job. Refs #8259, Closes #8259 if you prefer to take it this way.What it found, all five fixed here:
refrenceguides/typescript.mdx— the #8259 wordConcatinatingconfiguration/extending-configurations.mdx, in a headingnummberapi/stats.mdxtestLolcalStoragesrc/utilities/test-local-storage.jsscollbarcypress/support/commands.jsThree misspellings are deliberate and stay:
cosnolein the development guide (it is the error the source-map section teaches you to read),prefxin the loader options example (it is the validation error being demonstrated), andOccurence, because webpack 1 really did shipOccurenceOrderPluginunder that spelling. Each gets acspell:ignorein its own file rather than a dictionary entry, so the same word anywhere else is still an error.Two notes for review:
Concatinatingheading changes its anchor to#concatenating-rules-and-plugins. Nothing in the repo links to the old one — the only hit is generated_content.json— but an external link to the misspelled anchor would break. Happy to drop that hunk if you would rather keep the URL.awesome-webpack.mdxis inignorePaths. It is a directory of third-party project and maintainer names and contributed 160 of the 311 unknown words on its own; checking it would mean a word list of mostly people's names. Contributor frontmatter is skipped by regex for the same reason.The run is clean: 368 files, 0 issues. Searching turned up no doubled words anywhere in
src/content, and no other misspellings. It did turn up British spellings in current docs (behaviour,customise,recognise,analysable,neighbour) which I left alone and added to the word list — they are a style choice rather than typos, two of them sit in headings with live anchors, and several more are inside quoted CLI output or blog posts. Worth a separate pass if you want the site standardised on American English.What kind of change does this PR introduce?
ci
Did you add tests for your changes?
No test files — the check itself is the test, and it runs in the
lintjob on every pull request.Does this PR introduce a breaking change?
No, with the anchor caveat noted above.
If relevant, what needs to be documented once your changes are merged or what have you already documented?
n/a — contributors adding a genuinely new word add it to
cspell.json, or use a file-localcspell:ignorewhen it is local to one page.Use of AI
AI was used. Claude Code ran cspell across the repository, triaged every unknown word by hand against its surrounding context to separate real typos from vocabulary, deliberate misspellings and third-party names, and wrote the configuration and fixes; I reviewed the word list and the fixes before pushing.
Generated by Claude Code