Skip to content

React Doctor

492 rules react-doctor@0.9.14

Complete effective rule inventory.

Docs

Rules

32 rules on this page · 492 total

  • react-doctor/remotion-deterministic-randomness

    Use Remotion's seeded random(seed) helper so the same frame produces the same value in every render tab.

    : error in React projects
    No autofix
  • react-doctor/remotion-no-css-animation

    Drive the property from useCurrentFrame() with interpolate() so every rendered frame is deterministic.

    : error in React projects
    No autofix
  • react-doctor/remotion-no-css-transition

    Drive the property from useCurrentFrame() with interpolate() so every rendered frame is deterministic.

    : error in React projects
    No autofix
  • react-doctor/remotion-no-css-url-assets

    Render the asset with Img inside an AbsoluteFill, or preload the same source with a hidden Img when a CSS mask is required.

    : error in React projects
    No autofix
  • react-doctor/remotion-no-module-scope-delay-render

    Create the handle once inside the component. Use useDelayRender() on Remotion 4.0.342 or newer, or lazy useState(() => delayRender()) on earlier versions.

    : error in React projects
    No autofix
  • react-doctor/remotion-no-native-media-elements

    Use Remotion's media components so rendering waits for assets and seeks media to the requested frame.

    : error in React projects
    No autofix
  • react-doctor/remotion-no-next-image

    Use Img from remotion, which delays rendering until the image is loaded.

    : error in React projects
    No autofix
  • react-doctor/remotion-stable-delay-render-handle

    Prefer useDelayRender(), or initialize delayRender() once with useState(() => delayRender()).

    : error in React projects
    No autofix
  • react-doctor/rendering-conditional-render

    Use {items.length > 0 && <List />}, or a ternary like {items.length ? <List /> : null}.

    : warning in React projects
    No autofix
  • react-doctor/rendering-hydration-mismatch-time

    Move time or random values into useEffect+useState so they only run in the browser, or add suppressHydrationWarning to the parent if it's intentional

    : warning in React projects
    No autofix
  • react-doctor/repository-secret-file

    Remove committed env files, service-account credentials, npm auth tokens, and webhook URLs; rotate exposed values and keep only redacted examples in source.

    : error in React projects
    No autofix
  • react-doctor/request-body-mass-assignment

    Assign explicit, allowlisted fields (or validate with a strict schema and no .passthrough()) instead of spreading/merging request input. Otherwise the client can set ownership, role, or price columns (mass assignment) or pollute the prototype.

    : warning in React projects
    No autofix
  • react-doctor/require-render-return

    Return JSX or null from render so the component intentionally shows something or nothing.

    : error in React projects
    No autofix
  • react-doctor/rn-bottom-sheet-no-ignored-scroll-prop

    Remove scrollEventThrottle, decelerationRate, and onScrollBeginDrag from BottomSheetScrollView because the component ignores them.

    : warning in React Native projects
    No autofix
  • react-doctor/rn-bottom-sheet-no-state-in-on-animate

    Avoid starting React renders from onAnimate. Use animatedIndex or animatedPosition for animation-coupled UI, or onChange for committed index state.

    : warning in React Native projects
    No autofix
  • react-doctor/rn-bottom-sheet-use-integrated-scrollable

    Use @gorhom/bottom-sheet's integrated BottomSheetScrollView, BottomSheetFlatList, BottomSheetSectionList, or BottomSheetVirtualizedList so gestures coordinate with the sheet.

    : warning in React Native projects
    No autofix
  • react-doctor/rn-detox-missing-await

    Prepend await to Detox actions, waitFor(...) chains, and expect(element(...)) assertions. They return promises tied to Detox's synchronization, so a missing await runs steps out of order.

    : warning in React Native projects
    No autofix
  • react-doctor/rn-no-deep-imports

    Import the symbol from react-native (the package root) instead of the deprecated react-native/Libraries/... subpath, which RFC 0894 removes on upgrade.

    : warning in React Native projects
    No autofix
  • react-doctor/rn-no-falsy-and-render

    When the number is 0, this shows a bare 0 as text, which crashes on RN. Use {value > 0 && <X />}, {Boolean(value) && <X />}, or {value ? <X /> : null}.

    : error in React Native projects
    No autofix
  • react-doctor/rn-no-image-children

    React Native's <Image> can't render children. Use <ImageBackground> (same source/style props) to layer content over an image.

    : error in React Native projects
    No autofix
  • react-doctor/rn-reanimated-4-no-legacy-spring-thresholds

    Replace Reanimated 3 rest thresholds with Reanimated 4's energyThreshold spring option.

    : warning in React Native projects
    No autofix
  • react-doctor/rn-reanimated-4-no-removed-api

    Migrate removed Reanimated APIs to their Reanimated 4 or Gesture API replacements before upgrading.

    : warning in React Native projects
    No autofix
  • react-doctor/rn-reanimated-4-use-worklets-scheduler

    Import the corresponding scheduler from react-native-worklets when migrating to Reanimated 4.

    : warning in React Native projects
    No autofix
  • react-doctor/role-button-requires-complete-keyboard-activation

    Use a native button, or make a custom role button activate with both Enter and Space.

    : warning in React projects
    No autofix
  • react-doctor/role-has-required-aria-props

    Add every required aria-* attribute so assistive tech can expose the role's state correctly.

    : error in React projects
    No autofix
  • react-doctor/role-supports-aria-props

    Only use aria-* attributes that the element's role supports.

    : warning in React projects
    No autofix
  • react-doctor/scope

    Remove scope from this element or move it to the related <th> cell.

    : warning in React projects
    No autofix
  • react-doctor/secret-in-fallback

    Remove the literal fallback and fail closed (throw when the variable is unset). The hardcoded value is a committed secret, and the ??/|| default makes the app run with it in any environment that forgot to set the var.

    : error in React projects
    No autofix
  • react-doctor/server-auth-actions

    Check auth before changing server state or invoking billable services because exported server actions can be called directly by unauthenticated clients.

    : error in React projects
    No autofix
  • react-doctor/server-fetch-without-revalidate

    Pass { next: { revalidate: <seconds> } } (or cache: "no-store") so old data doesn't stick around.

    : warning in React projects
    No autofix
  • react-doctor/server-no-mutable-module-state

    Keep per-request data inside the action, or in headers, cookies, or React.cache. Module-scope let/var is shared by every request.

    : error in React projects
    No autofix
  • react-doctor/shadcn-command-item-state-variant-requires-value

    Style command items with the value-aware variants data-[selected=true]: and data-[disabled=true]:, because cmdk renders both attributes on every item as "true" or "false".

    : warning in React projects
    No autofix