botonic-cli: migrate eslint and prettier to biome#3164
Open
Iru89 wants to merge 4 commits intoreplace-eslint-and-prettier-for-biome-6from
Open
botonic-cli: migrate eslint and prettier to biome#3164Iru89 wants to merge 4 commits intoreplace-eslint-and-prettier-for-biome-6from
Iru89 wants to merge 4 commits intoreplace-eslint-and-prettier-for-biome-6from
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Test Results42 tests 42 ✅ 1m 6s ⏱️ Results for commit 6e52944. ♻️ This comment has been updated with latest results. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Migrates the
@botonic/clipackage 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.jsonextending@oclif/prettier-config. All of these have been replaced by the shared rootbiome.jsonconfiguration.Changes
Configuration
.eslintrc.json,.prettierrc.json, andtsconfig.eslint.jsonfrompackages/botonic-cli/package.jsonscripts:lint→biome check --write src/ tests/lint:check(new) →biome check src/ tests/format(new) →biome format --write src/ tests/posttest→ now runslint:checkinstead oflinteslint,@eslint/compat,eslint-config-oclif,eslint-config-prettier,@oclif/prettier-configPre-commit & Prettier
.pre-commit-config.yaml: Addedbotonic-clito the Biome hook pattern; removed the dedicated ESLint hook for cli.prettierignore: Addedpackages/botonic-cli/to prevent Prettier from reformatting migrated codeCode changes (auto-fixed by Biome)
node:protocol imports: All Node.js built-in imports updated to use thenode:protocol (e.g.,'path'→'node:path','fs'→'node:fs','child_process'→'node:child_process')import typeusage: Type-only imports converted toimport type { ... }syntaxuseBlockStatements: Inlineifstatements without braces wrapped in block statementsFlagsimport innew.tsorganizeImportsrules (node builtins first, then external packages, then local imports)onClose && onClose()→onClose?.()Manual fixes
credentials-handler.ts(×2)noVoidTypeReturn—return this.dumpJSON(...)in void functionsreturnkeywordfile-system.tsnoVoidTypeReturn—return mkdirSync(path)in void functionreturnkeywordlogin.tsnoUnusedVariables—flagsdestructured but unused_flagslogout.tsnoUnusedVariables—flagsdestructured but unused_flagsfile-system.test.tsnoImplicitAnyLet—let tempDirwithout type: stringtype annotationbotonic-api-service.tsuseIterableCallbackReturn—forEachwith implicit returnfor...ofloopdeploy.test.tsuseIterableCallbackReturn—forEachwith implicit returnfor...ofloopfile-system.tsnoTemplateCurlyInString—${SUDO_USER}in regular stringbiome-ignorecomment (intentional shell interpolation)deploy.tsPromise<void | undefined>toPromise<undefined | undefined>Promise<void | undefined>to fix TS errorbot-config.tsnoStaticOnlyClass— Biome convertedthis.method()calls in static classBotConfig.method()callsbotonic-api-service.test.tsnoUnusedVariables—getSpyunused_getSpy