Skip to content

Feat linter formatter choice#2196

Open
ER-28 wants to merge 2 commits into
brocoders:mainfrom
ER-28:feat-linter-formatter-choice
Open

Feat linter formatter choice#2196
ER-28 wants to merge 2 commits into
brocoders:mainfrom
ER-28:feat-linter-formatter-choice

Conversation

@ER-28

@ER-28 ER-28 commented Jun 17, 2026

Copy link
Copy Markdown

Summary

Add a new prompt to the interactive install script (npm run app:config) that lets users choose between ESLint & Prettier (default) or Biome.js as their linter and formatter.

Changes

New interactive prompt

Which linter and formatter do you want to use?
  > ESLint & Prettier (default)
  > Biome

When Biome is selected, the script:

  • Creates biome.json with:
    • Recommended rules enabled
    • Single quotes, trailing commas (mirrors existing Prettier config)
    • noUnusedVariables: error (mirrors existing ESLint rule)
    • noExplicitAny: off, noNonNullAssertion: off (mirrors existing ESLint overrides)
    • useImportType: off — critical for NestJS decorator metadata reflection
  • Removes eslint.config.mjs and .prettierrc
  • Removes devDependencies: eslint, prettier, @typescript-eslint/*, eslint-config-prettier, eslint-plugin-prettier, @eslint/*, globals
  • Adds @biomejs/biome devDependency
  • Updates lintbiome check --write src/ test/ .install-scripts/
  • Updates formatbiome format --write src/ test/ .install-scripts/
  • Updates .husky/pre-commitnpx biome check ... instead of npm run lint
  • Removes --fix from post-generate scripts (biome uses --write)

Why

Biome is significantly faster than ESLint + Prettier (10-100x), has a single configuration file, and handles both linting and formatting. This gives users the choice without breaking existing workflows.

ER28 added 2 commits June 17, 2026 16:29
Add a new prompt to the interactive setup (npm run app:config) letting
users choose between ESLint & Prettier (default) or Biome.js.

When Biome is selected:
- Creates biome.json with recommended rules matching the project's
  existing ESLint/Prettier config (single quotes, trailing commas,
  noUnusedVariables as error, noExplicitAny off)
- Removes eslint.config.mjs, .prettierrc, and all ESLint/Prettier
  devDependencies from package.json
- Adds @biomejs/biome devDependency
- Updates lint script to use 'biome check --write'
- Updates format script to use 'biome format --write'
- Updates husky pre-commit to use 'npx biome check'
- Removes '--fix' from post-generate scripts (biome uses --write)
Biome's useImportType enforces import type for type-only imports, which
breaks NestJS decorator metadata reflection. Classes like @Injectable(),
@controller(), etc. must be imported as value imports for the runtime
metadata to work correctly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant