Skip to content

[P3] Restore lint gates repo-wide (extend the fields/core baseline cleanup from #2709) #2713

Description

@os-zhuang

Why

Several package lints are (or were) red at baseline on main — pre-existing errors that were never blocking, so the per-package lint gate silently could not catch new violations of the same class (e.g. a fresh react-hooks/rules-of-hooks bug would land green). #2709 restored @object-ui/fields and @object-ui/core to 0 errors; this issue extends that sweep to the rest of the workspace so every package's lint gate actually protects it again.

Concretely, @object-ui/core had been red long enough that a genuine hooks-order bug in ImageField (a useCallback after an early return) shipped unnoticed — exactly the kind of thing the gate exists to stop.

Scope

  • Survey each package: pnpm --filter <pkg> lint (or pnpm -r lint) and record the error count + rule breakdown per package. Attach the list here as the work-plan.
  • Fix the baseline errors (not warnings) package-by-package, smallest first. Prefer real fixes; use a scoped // eslint-disable-next-line <rule> with a justifying comment only where the code is deliberately correct (as done in feat(fields): select+multiple → multi-value chip picker; restore fields/core lint gates #2709 for the intentional no-control-regex filename range and the ES2020-lib preserve-caught-error).
  • Each package as its own small PR (or a few grouped by owner) to keep review + parallel-agent conflict surface small — do not bundle into one mega-diff.
  • Do not change lint config/rules to make errors disappear — fix the code. Rule changes, if ever warranted, are a separate deliberate decision.

Non-goals

  • Warnings (no-explicit-any, react-refresh/only-export-components, etc.) — out of scope; errors only.
  • Behavior changes — these are mechanical/lint-only fixes.

Acceptance

  • pnpm -r lint is clean (0 errors) across the workspace, or each remaining red package has a tracked reason.
  • No lint config was loosened to get there.

Refs

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions