You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Idea]: Enforce American spelling with a spell checker #35
I'm only going to call it out this once for the purpose of the review, but it's going to ultimately be easier if we follow the same consistency rules as core does.
Fair ask, and a signal that catching these by hand doesn't scale. Nothing in CI checks spelling today, so it lands on whoever reviews.
What's still out there
Fixed in #19 (validation framework). Still outstanding, 8 instances across 5 files:
All in comments and docs — no API names, so it's low risk whenever we get to it.
The catch: it needs an allowlist on day one
Two legitimate strings look like British spellings and must not be "corrected":
phpstan analyse (composer.json:25) — PHPStan's actual CLI command. Changing it breaks composer phpstan.
aria-labelledby (src/media-view-config/index.ts:155,445) — a real ARIA attribute.
Any tool we pick needs both allowlisted before it's turned on, or it'll "fix" the build and an accessibility attribute.
Options
cspell — npm-native, fits alongside our existing wp-scripts lint steps, has a WordPress dictionary and per-word inline ignores. Config is a bit verbose.
typos — much faster, near-zero false positives, single binary with a GitHub Action. Targets typos rather than dialect, so it may not flag colour/behaviour by default and would need a custom word list to do what we want.
cspell is probably the better fit given we want dialect enforcement, not just typo detection.
Activity