react-doctor 0.0.35 → 0.0.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1050,6 +1050,21 @@ const createOxlintConfig = ({ pluginPath, framework, hasReactCompiler, customRul
1050
1050
  "react-doctor/query-no-query-in-effect": "warn",
1051
1051
  "react-doctor/query-mutation-missing-invalidation": "warn",
1052
1052
  "react-doctor/query-no-usequery-for-mutation": "warn",
1053
+ "react-doctor/no-inline-bounce-easing": "warn",
1054
+ "react-doctor/no-z-index-9999": "warn",
1055
+ "react-doctor/no-inline-exhaustive-style": "warn",
1056
+ "react-doctor/no-side-tab-border": "warn",
1057
+ "react-doctor/no-pure-black-background": "warn",
1058
+ "react-doctor/no-gradient-text": "warn",
1059
+ "react-doctor/no-dark-mode-glow": "warn",
1060
+ "react-doctor/no-justified-text": "warn",
1061
+ "react-doctor/no-tiny-text": "warn",
1062
+ "react-doctor/no-wide-letter-spacing": "warn",
1063
+ "react-doctor/no-gray-on-colored-background": "warn",
1064
+ "react-doctor/no-layout-transition-inline": "warn",
1065
+ "react-doctor/no-disabled-zoom": "error",
1066
+ "react-doctor/no-outline-none": "warn",
1067
+ "react-doctor/no-long-transition-duration": "warn",
1053
1068
  "react-doctor/async-parallel": "warn",
1054
1069
  ...framework === "nextjs" ? NEXTJS_RULES : {},
1055
1070
  ...framework === "expo" || framework === "react-native" ? REACT_NATIVE_RULES : {},
@@ -1171,6 +1186,21 @@ const RULE_CATEGORY_MAP = {
1171
1186
  "react-doctor/query-no-query-in-effect": "TanStack Query",
1172
1187
  "react-doctor/query-mutation-missing-invalidation": "TanStack Query",
1173
1188
  "react-doctor/query-no-usequery-for-mutation": "TanStack Query",
1189
+ "react-doctor/no-inline-bounce-easing": "Performance",
1190
+ "react-doctor/no-z-index-9999": "Architecture",
1191
+ "react-doctor/no-inline-exhaustive-style": "Architecture",
1192
+ "react-doctor/no-side-tab-border": "Architecture",
1193
+ "react-doctor/no-pure-black-background": "Architecture",
1194
+ "react-doctor/no-gradient-text": "Architecture",
1195
+ "react-doctor/no-dark-mode-glow": "Architecture",
1196
+ "react-doctor/no-justified-text": "Accessibility",
1197
+ "react-doctor/no-tiny-text": "Accessibility",
1198
+ "react-doctor/no-wide-letter-spacing": "Architecture",
1199
+ "react-doctor/no-gray-on-colored-background": "Accessibility",
1200
+ "react-doctor/no-layout-transition-inline": "Performance",
1201
+ "react-doctor/no-disabled-zoom": "Accessibility",
1202
+ "react-doctor/no-outline-none": "Accessibility",
1203
+ "react-doctor/no-long-transition-duration": "Performance",
1174
1204
  "react-doctor/js-flatmap-filter": "Performance",
1175
1205
  "react-doctor/async-parallel": "Performance",
1176
1206
  "react-doctor/rn-no-raw-text": "React Native",
@@ -1229,6 +1259,21 @@ const RULE_HELP_MAP = {
1229
1259
  "prefer-dynamic-import": "Use `const Component = dynamic(() => import('library'), { ssr: false })` from next/dynamic or React.lazy()",
1230
1260
  "use-lazy-motion": "Use `import { LazyMotion, m } from \"framer-motion\"` with `domAnimation` features — saves ~30kb",
1231
1261
  "no-undeferred-third-party": "Use `next/script` with `strategy=\"lazyOnload\"` or add the `defer` attribute",
1262
+ "no-inline-bounce-easing": "Use `cubic-bezier(0.16, 1, 0.3, 1)` (ease-out-expo) for natural deceleration — objects in the real world don't bounce",
1263
+ "no-z-index-9999": "Define a z-index scale in your design tokens (e.g. dropdown: 10, modal: 20, toast: 30). Create a new stacking context with `isolation: isolate` instead of escalating values",
1264
+ "no-inline-exhaustive-style": "Move styles to a CSS class, CSS module, Tailwind utilities, or a styled component — inline objects with many properties hurt readability and create new references every render",
1265
+ "no-side-tab-border": "Use a subtler accent (box-shadow inset, background gradient, or border-bottom) instead of a thick one-sided border",
1266
+ "no-pure-black-background": "Tint the background slightly toward your brand hue — e.g. `#0a0a0f` or Tailwind's `bg-gray-950`. Pure black looks harsh on modern displays",
1267
+ "no-gradient-text": "Use solid text colors for readability. If you need emphasis, use font weight, size, or a distinct color instead of gradients",
1268
+ "no-dark-mode-glow": "Use a subtle `box-shadow` with neutral colors for depth, or `border` with low opacity. Colored glows on dark backgrounds are the default AI-generated aesthetic",
1269
+ "no-justified-text": "Use `text-align: left` for body text, or add `hyphens: auto` and `overflow-wrap: break-word` if you must justify",
1270
+ "no-tiny-text": "Use at least 12px for body content, 16px is ideal. Small text is hard to read, especially on high-DPI mobile screens",
1271
+ "no-wide-letter-spacing": "Reserve wide tracking (letter-spacing > 0.05em) for short uppercase labels, navigation items, and buttons — not body text",
1272
+ "no-gray-on-colored-background": "Use a darker shade of the background color for text, or white/near-white for contrast. Gray text on colored backgrounds looks washed out",
1273
+ "no-layout-transition-inline": "Use `transform` and `opacity` for transitions — they run on the compositor thread. For height animations, use `grid-template-rows: 0fr → 1fr`",
1274
+ "no-disabled-zoom": "Remove `user-scalable=no` and `maximum-scale` from the viewport meta tag. If your layout breaks at 200% zoom, fix the layout — don't punish users with disabilities",
1275
+ "no-outline-none": "Use `:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px }` to show focus only for keyboard users while hiding it for mouse clicks",
1276
+ "no-long-transition-duration": "Keep UI transitions under 1s — 100-150ms for instant feedback, 200-300ms for state changes, 300-500ms for layout changes. Use longer durations only for page-load hero animations",
1232
1277
  "no-array-index-as-key": "Use a stable unique identifier: `key={item.id}` or `key={item.slug}` — index keys break on reorder/filter",
1233
1278
  "rendering-conditional-render": "Change to `{items.length > 0 && <List />}` or use a ternary: `{items.length ? <List /> : null}`",
1234
1279
  "no-prevent-default": "Use `<form action={serverAction}>` (works without JS) or `<button>` instead of `<a>` with preventDefault",