Skip to content

botonic-cli: migrate eslint and prettier to biome#3164

Open
Iru89 wants to merge 4 commits intoreplace-eslint-and-prettier-for-biome-6from
replace-eslint-and-prettier-for-biome-7
Open

botonic-cli: migrate eslint and prettier to biome#3164
Iru89 wants to merge 4 commits intoreplace-eslint-and-prettier-for-biome-6from
replace-eslint-and-prettier-for-biome-7

Conversation

@Iru89
Copy link
Contributor

@Iru89 Iru89 commented Feb 6, 2026

Description

Migrates the @botonic/cli package from ESLint v9 + Prettier to Biome v2.3.13, continuing the monorepo-wide migration effort started in previous PRs.

This package was notable because it used ESLint v9 with oclif-specific configuration (eslint-config-oclif), its own local .eslintrc.json, and a separate .prettierrc.json extending @oclif/prettier-config. All of these have been replaced by the shared root biome.json configuration.

Changes

Configuration

  • Removed .eslintrc.json, .prettierrc.json, and tsconfig.eslint.json from packages/botonic-cli/
  • Updated package.json scripts:
    • lintbiome check --write src/ tests/
    • lint:check (new) → biome check src/ tests/
    • format (new) → biome format --write src/ tests/
    • posttest → now runs lint:check instead of lint
  • Removed ESLint devDependencies: eslint, @eslint/compat, eslint-config-oclif, eslint-config-prettier, @oclif/prettier-config

Pre-commit & Prettier

  • .pre-commit-config.yaml: Added botonic-cli to the Biome hook pattern; removed the dedicated ESLint hook for cli
  • .prettierignore: Added packages/botonic-cli/ to prevent Prettier from reformatting migrated code

Code changes (auto-fixed by Biome)

  • node: protocol imports: All Node.js built-in imports updated to use the node: protocol (e.g., 'path''node:path', 'fs''node:fs', 'child_process''node:child_process')
  • import type usage: Type-only imports converted to import type { ... } syntax
  • useBlockStatements: Inline if statements without braces wrapped in block statements
  • Unused imports removed: e.g., Flags import in new.ts
  • Import sorting: Imports reorganized according to Biome's organizeImports rules (node builtins first, then external packages, then local imports)
  • Template literal concatenation: String concatenation replaced with template literals where appropriate
  • Optional chaining: onClose && onClose()onClose?.()

Manual fixes

File Issue Fix
credentials-handler.ts (×2) noVoidTypeReturnreturn this.dumpJSON(...) in void functions Removed return keyword
file-system.ts noVoidTypeReturnreturn mkdirSync(path) in void function Removed return keyword
login.ts noUnusedVariablesflags destructured but unused Renamed to _flags
logout.ts noUnusedVariablesflags destructured but unused Renamed to _flags
file-system.test.ts noImplicitAnyLetlet tempDir without type Added : string type annotation
botonic-api-service.ts useIterableCallbackReturnforEach with implicit return Replaced with for...of loop
deploy.test.ts useIterableCallbackReturnforEach with implicit return Replaced with for...of loop
file-system.ts noTemplateCurlyInString${SUDO_USER} in regular string Added biome-ignore comment (intentional shell interpolation)
deploy.ts Biome changed Promise<void | undefined> to Promise<undefined | undefined> Restored to Promise<void | undefined> to fix TS error
bot-config.ts noStaticOnlyClass — Biome converted this.method() calls in static class Changed to explicit BotConfig.method() calls
botonic-api-service.test.ts noUnusedVariablesgetSpy unused Renamed to _getSpy

@chatgpt-codex-connector
Copy link

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@Iru89 Iru89 self-assigned this Feb 6, 2026
@Iru89 Iru89 requested review from asastre and vanbasten17 February 6, 2026 16:22
@Iru89 Iru89 changed the base branch from master-lts to replace-eslint-and-prettier-for-biome-6 February 6, 2026 16:22
@Iru89 Iru89 requested a review from Davidhidalgo February 6, 2026 16:22
@github-actions
Copy link

github-actions bot commented Feb 6, 2026

Test Results

42 tests   42 ✅  1m 6s ⏱️
 5 suites   0 💤
 1 files     0 ❌

Results for commit 6e52944.

♻️ This comment has been updated with latest results.

@Iru89 Iru89 changed the title Replace eslint and prettier for biome 7 botonic-cli: migrate eslint and prettier to biome Feb 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant