Skip to content

chore: replace biome with prettier and rslint#424

Closed
chenjiahan wants to merge 1 commit intomainfrom
chenjiahan/chore-rslint-prettier
Closed

chore: replace biome with prettier and rslint#424
chenjiahan wants to merge 1 commit intomainfrom
chenjiahan/chore-rslint-prettier

Conversation

@chenjiahan
Copy link
Copy Markdown
Member

Summary

  • Replace the root Biome setup with Prettier, Rslint, and simple-git-hooks.
  • Update the root lint scripts, editor recommendations, and example files that still used Biome-specific directives.

Related Links

  • None

Copilot AI review requested due to automatic review settings April 13, 2026 03:18
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 root formatting/linting and git-hook setup away from Biome and onto Prettier, Rslint, and simple-git-hooks.

Changes:

  • Add Prettier configuration (.prettierrc, .prettierignore) and a new rslint.config.ts.
  • Update root tooling scripts and hooks in package.json (including replacing Husky with simple-git-hooks).
  • Remove Biome config and clean up some Biome-specific ignore directives and editor recommendations.

Reviewed changes

Copilot reviewed 11 out of 14 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
rstest/rspack-adapter/tests/rstest.setup.ts Removes a Biome-specific ignore directive.
rspack/worker/chat-worker.js Removes a Biome-specific ignore directive around switch fallthrough.
rslint.config.ts Introduces root Rslint configuration and ignore patterns.
rsbuild/vue-vant/components.d.ts Removes a Biome-specific ignore directive in a generated declaration file.
rsbuild/vue-vant/auto-imports.d.ts Removes a Biome-specific ignore directive in a generated declaration file.
package.json Replaces Biome/Husky setup with Prettier, Rslint, lint-staged updates, and simple-git-hooks wiring.
biome.json Removes the root Biome configuration file.
AGENTS.md Updates contributor/agent guidance to reflect Prettier + Rslint and adjusts formatting.
.vscode/settings.json Switches default formatter from Biome to Prettier extension.
.vscode/extensions.json Updates extension recommendations from Biome to Prettier.
.prettierrc Adds root Prettier settings matching prior formatting intent.
.prettierignore Adds ignore rules for common generated/build output.
.husky/pre-commit Removes Husky pre-commit hook script.

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

Comment on lines +14 to +15
"lint": "rslint && prettier -c .prettierrc .vscode/extensions.json .vscode/settings.json AGENTS.md package.json pnpm-lock.yaml rslint.config.ts",
"lint:write": "prettier -w .prettierrc .vscode/extensions.json .vscode/settings.json AGENTS.md package.json pnpm-lock.yaml rslint.config.ts",
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.

The lint script only runs Prettier in check mode against a small, explicit list of root files, so formatting regressions in the actual example sources (e.g. rspack/, rsbuild/, etc.) won’t be caught by pnpm run lint. Consider changing this to a repo-wide Prettier check (e.g. run Prettier against the workspace globs or . with .prettierignore) so the replacement of Biome’s formatter is enforced consistently.

Suggested change
"lint": "rslint && prettier -c .prettierrc .vscode/extensions.json .vscode/settings.json AGENTS.md package.json pnpm-lock.yaml rslint.config.ts",
"lint:write": "prettier -w .prettierrc .vscode/extensions.json .vscode/settings.json AGENTS.md package.json pnpm-lock.yaml rslint.config.ts",
"lint": "rslint && prettier -c .",
"lint:write": "prettier -w .",

Copilot uses AI. Check for mistakes.
Comment on lines 72 to 76
## Coding Conventions

- Formatting and linting: `Biome` is used (see `biome.json`).
- Formatting and linting: `Prettier` and `Rslint` are used (see `.prettierrc` and `rslint.config.ts`).
- Default JS/TS quote style is single quotes.
- Line width is 100.
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.

The PR description says the remaining Biome-specific directives were updated, but there are still // biome-ignore directives present in other tracked files (e.g. rsbuild/vue-auto-import/auto-imports.d.ts, rsbuild/vue-element-plus/auto-imports.d.ts, rsbuild/vue-element-plus/components.d.ts). Either update/remove those directives as well or clarify in the description that only a subset was migrated in this PR.

Copilot uses AI. Check for mistakes.
@chenjiahan chenjiahan closed this Apr 13, 2026
@chenjiahan chenjiahan deleted the chenjiahan/chore-rslint-prettier branch April 13, 2026 03:30
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