React Doctor
492 rules react-doctor@0.9.18
Complete effective rule inventory.
Rules
No enabled React Doctor rules match this search.
-
react-doctor/effect-listener-cleanup-reference-mismatchRemoval APIs match by reference identity, so the second inline function passed to the remove call can never equal the one you added; hoist the handler into a single named const (or useCallback) and pass that same reference to both the add and remove calls.
: error in React projects -
react-doctor/effect-observer-needs-disconnectReturn a cleanup function that calls
observer.disconnect()(orobserver.unobserve(node)) so the observer stops firing callbacks against detached nodes after unmount instead of leaking on every mount.: error in React projects -
react-doctor/effect-raf-loop-needs-cancelStore the frame id and return a cleanup that calls
cancelAnimationFrame(id)so self-scheduling work cannot continue after unmount.: warning in React projects -
react-doctor/expo-no-non-inlined-envRead env vars with static dotted access (
process.env.EXPO_PUBLIC_NAME). Computed access and destructuring aren't inlined by babel-preset-expo and resolve toundefinedat runtime.: warning in React Native projects -
react-doctor/firebase-client-owned-authz-fieldDerive authority fields on the server or enforce them in Firebase/Supabase rules; never trust client-provided owner, org, or role values.
: error in React projects -
react-doctor/firebase-permissive-rulesBind every read/write to
request.auth.uid, immutable ownership, and tenant membership instead of treating sign-in as authorization.: error in React projects -
react-doctor/forbid-dom-propsConfigure blocked DOM props so plain HTML tags stay on the agreed DOM API surface.
: warning in React projects -
react-doctor/forbid-elementsConfigure blocked elements so code stays on the approved UI primitives.
: warning in React projects -
react-doctor/forward-ref-uses-refAccept the
refparameter or dropforwardRefso parents are not promised a ref that never reaches the node.: warning in React projects -
react-doctor/git-provider-url-injection-riskValidate owner, repo, org, and branch identifiers against strict slugs and build URLs with URL/path encoders instead of raw interpolation.
: warning in React projects -
react-doctor/heading-has-contentPut readable text in every heading.
: warning in React projects -
react-doctor/html-has-langSet
<html lang="…">so screen readers know the page language.: warning in React projects -
react-doctor/html-label-has-single-controlAssociate each label with one native control; use fieldset and legend to name a group of controls.
: warning in React projects -
react-doctor/html-no-invalid-paragraph-childSwap the
<p>for a<div>, or move the child outside the paragraph.: warning in React projects -
react-doctor/html-no-invalid-table-nestingPut each table element in its required parent:
<thead>/<tbody>/<tfoot>directly inside<table>,<tr>inside a row group,<td>/<th>inside<tr>. Browsers quietly fix broken table markup, so write it to spec.: warning in React projects -
react-doctor/html-no-nested-formKeep forms separate, or make the inner action a button associated with the outer form. HTML does not permit form descendants inside a form.
: warning in React projects -
react-doctor/html-no-nested-interactiveMove the inner control beside its interactive ancestor so each action has independent semantics and focus behavior.
: warning in React projects -
react-doctor/iframe-has-titleAdd a descriptive
titleso screen reader users know what the embedded frame contains.: warning in React projects -
react-doctor/iframe-missing-sandboxAdd
sandbox=""or a curated value so embedded pages cannot get full access to your site by default.: warning in React projects -
react-doctor/img-redundant-altDo not put 'image' or 'photo' in alt text. Describe what is shown.
: warning in React projects -
react-doctor/import-metadata-execution-riskParse imported metadata as data with strict schemas; do not evaluate EXIF, manifests, presets, dropped files, or archives.
: error in React projects -
react-doctor/ink-ctrl-c-handler-requires-exit-optionPass
{exitOnCtrlC: false}torender()before handling Ctrl-C withuseInput.: error in React projects -
react-doctor/ink-no-bare-process-exitUse Ink's
useApp().exit()so Ink restores terminal state.: error in React projects -
react-doctor/ink-no-direct-raw-modeMove
useStdin().setRawMode()to an effect and restore it in cleanup.: error in React projects -
react-doctor/ink-no-dom-host-elementsUse Ink primitives such as
<Box>and<Text>instead of DOM host elements.: error in React projects -
react-doctor/ink-no-dom-routerUse React Router's memory router APIs in Ink applications.
: error in React projects -
react-doctor/ink-no-focus-in-renderMove focus-manager calls to an effect or input handler.
: error in React projects -
react-doctor/ink-no-layout-inside-textMove Ink layout components outside
<Text>and<Transform>boundaries.: error in React projects -
react-doctor/ink-no-live-hooks-in-render-to-stringKeep input subscriptions out of components used only by
renderToString().: error in React projects -
react-doctor/ink-no-measure-element-in-renderMeasure Ink elements in a layout effect, effect, callback ref, or event handler.
: error in React projects -
react-doctor/ink-no-multiple-staticCombine unconditional output in one render root into a single
<Static>.: warning in React projects -
react-doctor/ink-no-raw-textWrap terminal text in Ink's
<Text>component.: error in React projects