# `react-doctor/no-scale-from-zero`

Review scale-to-zero entrances and exits; ordinary product UI usually reads more smoothly from a small nonzero scale plus opacity

- **Status:** Active
- **Category:** Design
- **Assessment:** Creative-direction review
- **Required evidence:** source code, rendered UI, product intent
- **Default configuration:** Enabled
- **Default severity:** warn
- **Scope:** All supported frameworks
- **Active when:** always
- **Requirements:** react
- **Tags:** test-noise
- **Priority:** 9 (P3)
- **Source:** oxlint-plugin-react-doctor
- **Rule set:** oxlint-plugin-react-doctor 0.9.3 (prompt schema 2)

## Validation prompt

Review the reported pattern in context before deciding whether an edit is warranted.

There are two detector branches. The Motion branch requires a proven framer-motion or motion/react JSX element and an authoritative initial or exit object whose effective scale is the literal number 0. The CSS/Tailwind branch resolves an effective scale(0) or individual scale: 0 together with a positive-duration transition that covers transform, scale, or all, including supported variant and important-precedence handling. This is an opt-in visual-quality heuristic, not a performance or correctness failure. Suppress an intentional point-origin, playful illustration, game, loader, or established brand motion after checking the rendered context and reduced-motion state.

## Evidence boundary

The diagnostic proves only that the detector's modeled source pattern matched. It does not prove runtime impact, product intent, rendered failure, or that one remediation is correct.

Establish the environment, explicit repository policy, relevant exceptions, and required rendered or runtime evidence before deciding the occurrence. This page’s Assessment and Required evidence fields define the review contract.

Default severity is registry metadata. Use the occurrence's JSON severity after repository configuration when ordering real findings.

Record one outcome:

- **Confirmed failure:** The required evidence establishes the violation.
- **Rejected:** A documented exception or false-positive predicate applies.
- **Needs evidence:** Named evidence can still be collected.
- **Unavailable:** Required evidence cannot be collected in this run.
- **Waived with evidence:** An authorized, scoped exception applies to an established failure.
- **Observation:** The review records an optional tradeoff without claiming a defect.

A waiver records its scope, authority, evidence, and review or expiry condition. It is not a pass or false positive.

## Fix prompt

Treat this as review guidance, not a required correction. Preserve an intentional choice when the brief, design system, and rendered evidence support it.

Change only the offending zero scale to the project's existing small reveal value, commonly 0.9-0.97, and preserve every unrelated initial, animate, exit, transform, variant, timing, and exit-direction value. Add an opacity fade only when opacity is not already owned by CSS, Motion, or another animation. For Tailwind, replace only the effective scale-0 utility or inline value and keep the same variant and transition scope. Do not overwrite whole Motion objects with a canned initial/animate/exit trio. Verify transform origin, interruption, and reduced-motion behavior in the rendered component. See https://motion.dev/docs/react-animation#enter-animations

## Repository-wide copy prompt

Use this only for a repository-wide pass after validating each occurrence. For one occurrence, use the occurrence-level guidance above.

````text
Review every confirmed `react-doctor/no-scale-from-zero` diagnostic in the current repository.

Revise only when evidence supports the candidate adjustment.
- Change only the offending zero scale to the project's existing small reveal value, commonly 0.9-0.97, and preserve every unrelated initial, animate, exit, transform, variant, timing, and exit-direction value. Add an opacity fade only when opacity is not already owned by CSS, Motion, or another animation. For Tailwind, replace only the effective scale-0 utility or inline value and keep the same variant and transition scope. Do not overwrite whole Motion objects with a canned initial/animate/exit trio. Verify transform origin, interruption, and reduced-motion behavior in the rendered component. See https://motion.dev/docs/react-animation#enter-animations.

Validation before editing:
There are two detector branches. The Motion branch requires a proven framer-motion or motion/react JSX element and an authoritative initial or exit object whose effective scale is the literal number 0. The CSS/Tailwind branch resolves an effective scale(0) or individual scale: 0 together with a positive-duration transition that covers transform, scale, or all, including supported variant and important-precedence handling. This is an opt-in visual-quality heuristic, not a performance or correctness failure. Suppress an intentional point-origin, playful illustration, game, loader, or established brand motion after checking the rendered context and reduced-motion state.

Constraints:
- If revising, make the smallest change that addresses the observed tradeoff.
- Preserve behavior and interfaces unrelated to this diagnostic.
- Reuse existing project components, utilities, and conventions.
- Do not introduce render-phase side effects, render-phase state updates, or Hooks rule violations.
- This rule is explicitly classified as creative-direction review. The design tag alone never determines proof class.
- Inspect the product brief, rendered context, and existing design system before editing.
- Keep an intentional pattern that is consistent with the project, and report why it stays.
- Verify accessibility and performance claims with rendered or runtime evidence.
- Use existing brand assets, product facts, content, and design tokens.
- Do not invent claims, customer data, typefaces, artwork, or a new visual direction.
- Adapt identifiers and framework details instead of copying blindly.
- Do not change code only to silence this heuristic.

Assessment:
- Record detector evidence, applicability facts, assumptions, missing evidence, and the rule class for this occurrence.
- Return one outcome: Confirmed failure, Rejected, Needs evidence, Unavailable, Waived with evidence, or Observation.
- A waiver records the established failure, scope, authority, evidence, and review or expiry condition. It is not a pass or false positive.

Verification:
- Run focused tests for the changed behavior.
- Re-read the changed code and inspect the affected rendered state at relevant viewport, theme, input, and motion settings.
- If rendered verification is unavailable, report that limitation instead of claiming the design is fixed.
- If revised, rerun React Doctor and report whether the diagnostic remains. If kept, cite the brief, design-system, or rendered evidence.
- Report the files changed and any checks you could not run.
````
