Skip to content

chore: migrate from biome to prettier and rslint#37

Merged
chenjiahan merged 2 commits into
mainfrom
chenjiahan/chore-migrate-biome-to-prettier-rslint
Apr 13, 2026
Merged

chore: migrate from biome to prettier and rslint#37
chenjiahan merged 2 commits into
mainfrom
chenjiahan/chore-migrate-biome-to-prettier-rslint

Conversation

@chenjiahan
Copy link
Copy Markdown
Member

Summary

This PR migrates the repository from Biome to Prettier and Rslint, updates the editor and pre-commit workflow to use the new tools, and upgrades @rslint/core to 0.4.1.

Testing

  • pnpm lint
  • pnpm test

Related Links

  • None

@chenjiahan chenjiahan marked this pull request as ready for review April 13, 2026 03:44
Copilot AI review requested due to automatic review settings April 13, 2026 03:44
@chenjiahan chenjiahan merged commit 3c4a3cb into main Apr 13, 2026
5 checks passed
@chenjiahan chenjiahan deleted the chenjiahan/chore-migrate-biome-to-prettier-rslint branch April 13, 2026 03:44
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates the repo’s formatting/linting toolchain from Biome to Prettier + Rslint, updating editor recommendations and repository tooling accordingly.

Changes:

  • Replace Biome with prettier and @rslint/core, including a new rslint.config.ts and Prettier config/ignore files.
  • Update package.json scripts and pre-commit hook to use the new lint/format commands.
  • Apply quote/formatting updates across documentation and GitHub workflow YAML.

Reviewed changes

Copilot reviewed 10 out of 12 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
rslint.config.ts Adds Rslint configuration (TS recommended preset).
package.json Switches scripts from Biome to rslint + prettier; changes pre-commit behavior.
pnpm-lock.yaml Removes Biome/nano-staged; adds @rslint/core and Prettier (and transitive deps).
biome.json Removes Biome configuration.
.prettierrc Adds Prettier config (single quotes).
.prettierignore Ignores build artifacts and lockfile from Prettier runs.
.vscode/settings.json Sets Prettier as the default formatter.
.vscode/extensions.json Recommends Rslint + Prettier VS Code extensions.
README.md Updates code snippets to single quotes.
.github/workflows/test.yml Formatting-only YAML quote update.
.github/workflows/release.yml Formatting-only YAML quote update.
.github/renovate.json Adds Renovate configuration.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (1)

.github/workflows/test.yml:39

  • The migration updates pnpm lint, but CI currently only runs tests. To prevent formatting/lint regressions and to validate the new toolchain on PRs, consider adding a pnpm run lint step in this workflow (or a dedicated lint job).
          cache: 'pnpm'

      - name: Install Dependencies
        run: pnpm install && npx playwright install

      - name: Run Test
        run: pnpm run test

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread package.json
Comment on lines 26 to 28
"simple-git-hooks": {
"pre-commit": "npx nano-staged"
},
"nano-staged": {
"*.{js,jsx,ts,tsx,mjs,cjs}": [
"biome check --write --no-errors-on-unmatched"
]
"pre-commit": "pnpm run lint:write"
},
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pre-commit now runs pnpm run lint:write, which formats/lints the entire repo (not just staged files). This can be slow and can modify unstaged working-tree changes without re-staging them, leading to confusing commits. Consider switching back to a staged-files workflow (e.g., lint-staged/nano-staged equivalent) or compute the staged file list and pass it to rslint/prettier, then re-stage modified files.

Copilot uses AI. Check for mistakes.
Comment thread package.json
"@rsbuild/core": "^1.7.5",
"@rslib/core": "^0.21.0",
"@rslint/core": "0.4.1",
"@types/node": "^24.12.2",
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rslint.config.ts is TypeScript, but @rslint/core declares jiti as a (optional) peer dependency for config loading. Since jiti is not declared in devDependencies, this setup can break if jiti stops being present transitively. Either add jiti explicitly or switch the config to a JS file to avoid the TS runtime requirement.

Suggested change
"@types/node": "^24.12.2",
"@types/node": "^24.12.2",
"jiti": "^2.4.2",

Copilot uses AI. Check for mistakes.
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.

2 participants