Conversation
There was a problem hiding this comment.
Code Review
This pull request migrates the project's linting and formatting from Biome to RSLint and Prettier. The changes include removing the Biome configuration file, updating VS Code settings and extension recommendations, and modifying the package.json scripts and dependencies. A configuration issue was identified in the nano-staged setup where the combined command would cause rslint to run on the entire project instead of targeting only the staged files.
| "nano-staged": { | ||
| "*.{js,jsx,ts,tsx,mjs,cjs}": [ | ||
| "biome check --write --no-errors-on-unmatched" | ||
| "rslint && prettier --write" |
There was a problem hiding this comment.
The current nano-staged command will cause rslint to run on the entire project for every commit, instead of only on the staged files. This is because nano-staged appends filenames to the end of the whole command string, so rslint doesn't receive them.
To fix this and improve efficiency, list rslint and prettier as separate commands in the array. This ensures each tool runs only on the relevant staged files.
"rslint",
"prettier --write"There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 059c4115bd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "nano-staged": { | ||
| "*.{js,jsx,ts,tsx,mjs,cjs}": [ | ||
| "biome check --write --no-errors-on-unmatched" | ||
| "rslint && prettier --write" |
There was a problem hiding this comment.
Split nano-staged tasks instead of chaining with &&
Use separate nano-staged entries here rather than a single "rslint && prettier --write" string. nano-staged tokenizes each command and executes it directly (no shell), so this value is treated as running rslint with literal arguments like && and prettier, which causes the pre-commit hook (npx nano-staged) to fail for staged JS/TS files instead of running both tools.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Pull request overview
Switches the repository’s linting setup from Biome to Rslint, and introduces Prettier for formatting (including editor recommendations), aligning local tooling with the new lint/format workflow.
Changes:
- Add
rslint.config.tsand updatepackage.jsonscripts/hooks to userslint(+prettierin pre-commit). - Remove Biome configuration and editor integration.
- Add Prettier configuration (
.prettierrc,.prettierignore) and dependency updates (lockfile).
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| rslint.config.ts | Adds Rslint configuration (TypeScript recommended rules + dist ignore). |
| package.json | Replaces Biome scripts with rslint and runs Prettier in nano-staged; updates devDependencies. |
| pnpm-lock.yaml | Removes Biome packages; adds @rslint/core and prettier. |
| biome.json | Removes Biome config from repo root. |
| .vscode/settings.json | Removes Biome formatter settings (but currently results in invalid JSON). |
| .vscode/extensions.json | Recommends Rslint + Prettier VS Code extensions instead of Biome. |
| .prettierrc | Adds Prettier config (single quotes). |
| .prettierignore | Adds Prettier ignore entry for the lockfile. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -0,0 +1 @@ | |||
| pnpm-lock.yaml | |||
There was a problem hiding this comment.
.prettierignore currently ignores only pnpm-lock.yaml. Since dist/ and test output directories are generated (and already ignored by git / rslint), consider adding them here too so prettier --write . won’t reformat build artifacts by accident.
| pnpm-lock.yaml | |
| pnpm-lock.yaml | |
| # Build artifacts | |
| dist/ | |
| # Test output directories | |
| coverage/ | |
| test-results/ |
| @@ -1,18 +1,3 @@ | |||
| { | |||
| "search.useIgnoreFiles": true, | |||
There was a problem hiding this comment.
.vscode/settings.json is invalid JSON after removing the formatter settings because line 2 now ends with a trailing comma. VS Code won’t be able to parse this file; remove the trailing comma (or add another property).
| "search.useIgnoreFiles": true, | |
| "search.useIgnoreFiles": true |
https://github.com/web-infra-dev/rslint