Repository navigation
chore(lint)!: adopt cloudflare oxlint preset - #154
Merged
Merged
Conversation
Replace custom rules and vendored plugins with the Cloudflare preset and fix its findings across the workspace. Validate web JSON responses against route schemas and strengthen runtime typing at server boundaries. BREAKING CHANGE: event_payload text pages now report encoding "utf8" instead of "utf-8". Binary pages remain "base64".
|
React Doctor found 1 new issue in 1 file · 1 warning · score 90 / 100 (Great) · 0 fixed · vs Reviewed by React Doctor for commit |
| const loadPele = (): Promise<typeof Pele> => import(PELE); | ||
| type Pele = { mountAsync: typeof mountAsync }; | ||
|
|
||
| const loadPele = (): Promise<Pele> => import(PELE); |
There was a problem hiding this comment.
React Doctor · react-doctor/no-dynamic-import-path (warning)
This can stay in the main bundle because the bundler cannot code-split a dynamic import path. Use a plain string path instead.
Fix → Use a plain string path: import('./feature/heavy.js') so the bundler can split this into its own chunk.
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
Adopt
@cloudflare/oxlint-config0.1.0, upgrade Oxlint and its type-aware backend, and remove the custom rules, Effect plugin, and vendored anti-slop implementation. Fix the preset's findings across the server, web app, landing site, and development tools without adding rule overrides or suppressions; retain the existing file exclusions.The migration also replaces unsafe boundary assertions with validation and narrower types. The web API client now takes runtime route names and validates JSON responses against the contract for their HTTP status; UI fixtures now supply contract-valid bodies and statuses.
Why
Use a maintained shared preset instead of maintaining project-specific lint plugins. Keep the preset enabled and resolve its findings rather than adopting it with disabled rules.
Evidence
bun run check: passes, including formatting, server/web type checks, OpenAPI drift, and 1,272 passing tests; 118 environment-dependent tests skipped (16.73 seconds in the pre-push run).Risk and rollback
Reversibility: Reversible by reverting this commit; no database migration.
Blast radius: Workspace-wide TypeScript/React lint migration (549 files), server runtime boundaries, browser API handling, landing-site animations, and development scripts.
event_payloadtext pages now reportencoding: "utf8"rather than"utf-8", as explicitly selected for this migration. Binary pages remain"base64"; no HTTP endpoint or stored record carries this value.