Skip to content

Align Ultracite rule scope with PDPP authority boundaries #43

Description

@tnunamak

Problem

The modernization work made existing Biome exceptions visible and checked. There are still too many because some Ultracite rules are poor global rules for this repository. They either disagree with TypeScript, cannot be fixed automatically, or require a design decision at each call site.

This issue is about choosing better rule scope. It is not a request to rewrite thousands of lines just to satisfy a linter.

What We Know

  • useTopLevelRegex has about 900 exceptions. Biome does not provide an automatic fix and does not recommend this rule for every codebase. Hoisting a regex can change startup cost or shared state.
  • noUnnecessaryConditions has about 775 exceptions. It relies on Biome's type model, while TypeScript is the type authority here.
  • noUnresolvedImports has about 100 exceptions. TypeScript already owns import resolution for this TypeScript codebase.
  • Rules such as useAwait, noAwaitInLoops, noJsxPropsBind, and complexity rules need context. They should not be mass-fixed mechanically.

Plan

  1. Decide whether each high-volume rule belongs everywhere, only in some packages, or nowhere in PDPP.
  2. Once a rule's scope is decided, remove only the exceptions made unnecessary by that decision with an AST/scripted change.
  3. Keep correctness rules and the exclusions for generated files, provider captures, and package boundaries.
  4. Keep pnpm biome:selection, pnpm biome:policy, and pnpm retained-js-mjs:check so new exceptions and retained JavaScript cannot appear silently.

Done When

  • Every changed rule has a short, documented reason for its scope.
  • Any removed exceptions come from the policy change, not an unsafe bulk rewrite.
  • Biome and focused package checks pass.
  • The exception ledger gets smaller where a rule no longer applies.

Assisted-by: AI

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions