Skip to content

chore: introduce linter/formatter (Biome or ESLint) #415

Description

@luojiyin1987

Context

The project has 14k+ AST nodes across 838 files with no automated code-style enforcement. Root devDependencies contains only typescript + @types/node. No ESLint, Prettier, or Biome is configured. All formatting and linting is manual.

Problem

  • No consistent code style across contributors
  • No automated enforcement of conventions (e.g. no console.log in production, consistent import ordering)
  • PR reviews waste time on style nits
  • CI pipeline (planned in chore: setup CI/CD pipeline with quality gates #414) has no lint gate to plug into

Proposal

Choose and configure one of:

Option A: Biome (recommended)

  • Single binary, fast, covers both lint + format
  • Built-in TypeScript/React rules
  • Migration tool for ESLint configs

Option B: ESLint + Prettier

  • Industry standard, larger plugin ecosystem
  • More configuration overhead, slower

Implementation steps

  1. Team decides on tool (Biome vs ESLint)
  2. Add to root devDependencies
  3. Configure ruleset (start with recommended, tune iteratively)
  4. Add lint and format scripts to root package.json
  5. Auto-fix existing violations in a dedicated PR
  6. Add lint gate to CI (chore: setup CI/CD pipeline with quality gates #414)

Acceptance criteria

References

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