Repository navigation
chore(lint): enable Oxlint suspicious and perf rules - #1132
Closed
tembo[bot] wants to merge 2 commits into
Closed
tembo[bot] wants to merge 2 commits into
tembo[bot] wants to merge 2 commits into
Conversation
Co-authored-by: tembo[bot] <208362400+tembo-io[bot]@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…o tembo/lint-rules Co-authored-by: Cody <81981+stipsan@users.noreply.github.com>
Contributor
Author
|
@cursor[bot] Your organization has no available credits to process this request. Please purchase additional credits at app.tembo.io/settings/billing to continue. |
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
Turns on more of Oxlint for the site, so
vp checkcatches more bugs and accessibility problems. Stacked on #1131. GitHub retargets this PR when #1131 merges.Changes
vite.config.tslint config:correctness,suspiciousandperfcategories are errors. Enabling whole categories means rules that future Vite+/Oxlint releases add to them apply automatically.import,promise,react(including the hooks rules) andjsx-a11y, plus the defaults, which have to be listed again oncepluginsis set.typescript/switch-exhaustiveness-check,react/rules-of-hooksandreact/exhaustive-deps.react/react-in-jsx-scopeis off, because the automatic JSX runtime (jsx: react-jsx) doesn't need React in scope.import/no-unassigned-importallows*.css, so stylesheet imports for their side effects are fine.useCallbackisn't worth it.ascasts with real types. Ref callbacks now storeHTMLElement | null(React passesnullon unmount, so the cast was never true). The Boundary example narrows the<select>value against its option list instead of casting. The behavior state inExampleIfNeededgets a union type in place ofas any.as HTMLElementbeforeStyler().leftparameter that shadowed an outer variable.astro.config.mjsnow has a single return path.Validation
vp checkpasses with no warnings or errors,vp run typecheck(astro check) reports 0 errors and 0 warnings, andvp exec knippasses.no-shadow(suspicious),no-accumulating-spread(perf), import, promise,jsx-a11y/alt-text, both React hooks rules, andswitch-exhaustiveness-check. Each one failed as an error.vp run buildmatches the base branch except theExampleBoundarychunk (the<select>narrowing andinstanceof Elementref) and that chunk's hash inindex.html.