Skip to content

Forbid disable comments on React effect rules - #291

Merged
oxwen11 merged 2 commits into
vibest-dev:mainfrom
oxwen11:feat/no-restricted-disable
Aug 29, 2026
Merged

oxwen11 merged 2 commits into
vibest-dev:mainfrom
oxwen11:feat/no-restricted-disable

Conversation

@oxwen11

@oxwen11 oxwen11 commented Aug 29, 2026

Copy link
Copy Markdown
Member

Summary

vibest/no-restricted-disable forbids eslint-disable / oxlint-disable comments that silence:

  • any react-you-might-not-need-an-effect/* rule
  • react/exhaustive-deps / react-hooks/exhaustive-deps
  • a blanket eslint-disable / oxlint-disable (those turn the same rules off)

.agents/rules/frontend-state.md now requires rewriting the effect or the store instead of silencing the diagnostic.

Existing suppressions are rewritten:

  • useChatInputController owns the editor through useSyncExternalStore (subscribe constructs, unsubscribe disposes)
  • useCollapsedBinding (sidebar and chat columns) uses useLayoutEffect + useCallback so no-event-handler and exhaustive-deps no longer fire

Harness selector, per-agent tool UI, and SessionRef.harnessAgentId are unchanged.

Inspired by oxwen11/pie#78. Reimplemented on vibest's .mjs oxlint plugin (plugin name vibest) rather than copying pie's oxlint package.

Skipped

  • pie's TypeScript oxlint package / RuleTester harness — vibest lints via root oxlint and tools/oxlint/*.mjs
  • pie branding, Pi-only harness / registry removal
  • Motion sidebar drawer from pie#72 — pie-only chrome, not this behavior

Test plan

  • oxlint --deny-warnings on touched files
  • vitest on tools/oxlint/no-restricted-disable.test.mjs (5 tests)
  • turbo run test --filter=@vibest/app — 202 passed
  • Live oxlint on a snippet with a forbidden disable reports vibest/no-restricted-disable
  • react-doctor --scope changed — 100 / 100
  • turbo run typecheck --filter=@vibest/app — same pre-existing OutgoingMessage.delivery error as on main (chat-update.test.ts:421)

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.
@oxwen11
oxwen11 merged commit e090fb6 into vibest-dev:main Aug 29, 2026
2 checks passed
@oxwen11
oxwen11 deleted the feat/no-restricted-disable branch August 29, 2026 16:29
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.

2 participants