Skip to content

Add codespell support with configuration and fixes#21737

Open
yarikoptic wants to merge 4 commits intovitejs:mainfrom
yarikoptic:enh-codespell
Open

Add codespell support with configuration and fixes#21737
yarikoptic wants to merge 4 commits intovitejs:mainfrom
yarikoptic:enh-codespell

Conversation

@yarikoptic
Copy link
Copy Markdown

Add codespell configuration and fix existing typos.

More about codespell: https://github.com/codespell-project/codespell

I personally introduced it to dozens if not hundreds of projects already and so far only positive feedback.

CI workflow has permissions set only to read so also should be safe.

Changes

Configuration & Infrastructure

  • Added .codespellrc configuration with comprehensive skip patterns
  • Created GitHub Actions workflow to check spelling on push and PRs
  • Configured to skip: .git*, *.svg, *-lock.yaml, *.css, .npm, .cache

False Positive Handling

  • Regex: Ignores URLs (https?://\S+) and camelCase/PascalCase identifiers (afterAll, isTs, thirdParty, etc.)
  • Word list: additionals (variable name in html.ts), indentity (intentional in CHANGELOG entry describing a prior typo fix)

Typo Fixes (8 fixes across 7 files)

  • udpate -> update (2 CHANGELOGs)
  • stablize -> stabilize (CHANGELOG)
  • ambigious -> ambiguous (CHANGELOG)
  • useable -> usable (CHANGELOG)
  • pre-emptively -> preemptively (comment in rolldown.dts.config.ts)
  • re-uses -> reuses (comment in fullBundleEnvironment.ts)
  • didnt -> didn't (test message in js-sourcemap.spec.ts)

All changes are in comments, CHANGELOGs, or test strings - no functional behavior changes.

Historical Context

This project has had 184 prior commits fixing typos manually, demonstrating the value of automated spell-checking.

Testing

Codespell passes with zero errors after all fixes.


Generated with Claude Code and love to typos free code.

yarikoptic and others added 4 commits March 2, 2026 08:23
- Skip .npm and .cache directories (local caches)
- Ignore URLs (to protect links like browsersl.ist)
- Ignore camelCase/PascalCase identifiers (afterAll, isTs, thirdParty)
- Add 'additionals' to ignore-words-list (variable name in html.ts)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Typos fixed:
- udpate -> update (CHANGELOGs)
- stablize -> stabilize (CHANGELOG)
- ambigious -> ambiguous (CHANGELOG)
- useable -> usable (CHANGELOG)
- pre-emptively -> preemptively (rolldown.dts.config.ts comment)
- re-uses -> reuses (fullBundleEnvironment.ts comment)
- didnt -> didn't (js-sourcemap.spec.ts test message)

Updated codespell config:
- Added indentity to ignore-words-list (intentional in CHANGELOG
  entry describing a prior typo fix)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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