Repository navigation
Forbid disable comments on React effect rules - #291
Merged
Merged
Conversation
Add vibest/no-restricted-disable so eslint/oxlint-disable cannot silence react-you-might-not-need-an-effect or react/exhaustive-deps. Rewrite the chat input controller as a useSyncExternalStore and the shell panel sync as a layout effect so the existing suppressions can go.
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
vibest/no-restricted-disableforbidseslint-disable/oxlint-disablecomments that silence:react-you-might-not-need-an-effect/*rulereact/exhaustive-deps/react-hooks/exhaustive-depseslint-disable/oxlint-disable(those turn the same rules off).agents/rules/frontend-state.mdnow requires rewriting the effect or the store instead of silencing the diagnostic.Existing suppressions are rewritten:
useChatInputControllerowns the editor throughuseSyncExternalStore(subscribe constructs, unsubscribe disposes)useCollapsedBinding(sidebar and chat columns) usesuseLayoutEffect+useCallbacksono-event-handlerandexhaustive-depsno longer fireHarness selector, per-agent tool UI, and
SessionRef.harnessAgentIdare unchanged.Inspired by oxwen11/pie#78. Reimplemented on vibest's
.mjsoxlint plugin (pluginnamevibest) rather than copying pie's oxlint package.Skipped
tools/oxlint/*.mjsTest plan
oxlint --deny-warningson touched filestools/oxlint/no-restricted-disable.test.mjs(5 tests)turbo run test --filter=@vibest/app— 202 passedvibest/no-restricted-disable--scope changed— 100 / 100turbo run typecheck --filter=@vibest/app— same pre-existingOutgoingMessage.deliveryerror as onmain(chat-update.test.ts:421)