React Doctor
492 rules react-doctor@0.9.14
Complete effective rule inventory.
Rules
No enabled React Doctor rules match this search.
-
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 -
react-doctor/ink-no-repeated-renderCall Ink
render()once and update or rerender the returned instance.: error in React projects -
react-doctor/ink-prefer-use-animationUse Ink's shared
useAnimation()scheduler and automatic unmount cleanup.: warning in React projects -
react-doctor/ink-static-is-append-onlyPass
<Static>a collection whose existing entries never reorder or disappear.: warning in React projects -
react-doctor/ink-static-requires-keyPut a stable
keyon the root element returned by<Static>.: error in React projects -
react-doctor/ink-use-reactive-window-sizeUse Ink's
useWindowSize()so resize events trigger a render.: warning in React projects -
react-doctor/ink-use-string-width-for-cursorMeasure terminal columns with
string-widthbefore callingsetCursorPosition.: warning in React projects -
react-doctor/ink-use-suspend-terminalRun inherited-TTY child processes inside
useApp().suspendTerminal().: error in React projects -
react-doctor/ink-valid-aria-semanticsUse a role supported by Ink and do not label elements hidden from screen readers.
: error in React projects -
react-doctor/insecure-crypto-riskUse modern primitives,
crypto.randomBytes/ Web Crypto randomness, and timing-safe comparisons for signatures, digests, tokens, and auth material.: warning in React projects -
react-doctor/insecure-session-cookieSet auth/session cookies server-side with
httpOnly: true,secure: true, andsameSite. Cookies set viadocument.cookieor withhttpOnly: falseare readable by any XSS payload and can be stolen.: warning in React projects -
react-doctor/interactive-supports-focusAdd keyboard focus support so users can reach interactive elements without a pointer.
: warning in React projects -
react-doctor/jotai-derived-atom-returns-fresh-objectSplit it into one derived atom per field (each compares cleanly with Object.is), or wrap with
selectAtom(source, fn, shallow)from jotai/utils if you really need one object.: warning in React projects -
react-doctor/jotai-select-atom-in-render-bodyLift
selectAtom(base, fn)to module scope, or wrap it:const atom = useMemo(() => selectAtom(base, fn), [deps]). Calling it during render makes a new atom every time and re-subscribes forever.: error in React projects -
react-doctor/jotai-tq-use-raw-query-atomDerive the field you read:
const dataAtom = atom((get) => get(queryAtom).data). Subscribing to the whole query atom re-renders on every refetch, focus, or no-op cache hit.: warning in React projects -
react-doctor/js-async-reduce-without-awaited-accAwait the accumulator first:
const acc = await previous; ...; return acc;. Seed it withPromise.resolve(initial)so the first run also gets a Promise: warning in React projects -
react-doctor/jsx-keyAdd a stable
keyprop so React can keep list items matched to the right data when the list changes.: error in React projects