React Doctor
492 rules react-doctor@0.9.14
Complete effective rule inventory.
Rules
No enabled React Doctor rules match this search.
-
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 -
react-doctor/jsx-no-comment-textnodesWrap JSX comments in
{/* … */}so users do not see comment text rendered as children.: warning in React projects -
react-doctor/jsx-no-constructed-context-valuesWrap the context value in
useMemoor move it outside the component so consumers do not redraw every render.: warning in React projects -
react-doctor/jsx-no-duplicate-propsRemove or rename one of the duplicate props so the later value does not silently override the earlier one.
: error in React projects -
react-doctor/jsx-no-jsx-as-propMove the JSX outside the component or wrap it in
useMemoso memoized children do not redraw every render.: warning in React projects -
react-doctor/jsx-no-new-array-as-propWrap the array in
useMemoor move it outside the component so memoized children do not redraw every render.: warning in React projects -
react-doctor/jsx-no-new-function-as-propWrap the callback in
useCallbackor move it outside the component so memoized children do not redraw every render.: warning in React projects -
react-doctor/jsx-no-new-object-as-propWrap the object in
useMemoor move it outside the component so memoized children do not redraw every render.: warning in React projects -
react-doctor/jsx-no-script-urlUse real event handlers instead of
javascript:URLs so injected URL text cannot execute as code.: error in React projects -
react-doctor/jsx-no-target-blankAdd
rel="noreferrer"(or"noopener") when usingtarget="_blank".: warning in React projects -
react-doctor/jsx-no-undefImport the component or fix the typo so React can resolve the JSX identifier at runtime.
: error in React projects -
react-doctor/jsx-numeric-and-leaked-renderIn
{items.length && <List/>}React renders a literal0when the count is 0. Compare explicitly (items.length > 0 && <List/>) or use a ternary (items.length ? <List/> : null).: warning in React projects -
react-doctor/jsx-props-no-spread-multiSpread each value at most once so later props cannot silently override earlier props from the same object.
: warning in React projects -
react-doctor/jwt-insecure-verificationNever accept the
nonealgorithm; it disables signature verification and lets any forged token through. Pin the real algorithm(s) explicitly (jwt.verify(token, key, { algorithms: ['RS256'] })).: error in React projects -
react-doctor/key-lifecycle-riskRemove private keys from source, rotate exposed credentials, prefer short-lived deploy credentials, and document revocation/expiry for release keys.
: error in React projects -
react-doctor/label-has-associated-controlTie every label to a control with
htmlFor, or by nesting the input.: warning in React projects -
react-doctor/langUse a valid language code like
enoren-USso screen readers choose the right pronunciation rules.: warning in React projects