Skip to content

chore: switch to Rslint for linting#113

Merged
chenjiahan merged 1 commit intomainfrom
use_rslint_0328
Mar 28, 2026
Merged

chore: switch to Rslint for linting#113
chenjiahan merged 1 commit intomainfrom
use_rslint_0328

Conversation

@chenjiahan
Copy link
Copy Markdown
Member

@chenjiahan chenjiahan commented Mar 28, 2026

Copilot AI review requested due to automatic review settings March 28, 2026 01:38
@chenjiahan chenjiahan merged commit 14a7874 into main Mar 28, 2026
6 checks passed
@chenjiahan chenjiahan deleted the use_rslint_0328 branch March 28, 2026 01:40
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

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"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

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"

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 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"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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 👍 / 👎.

Copy link
Copy Markdown
Contributor

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

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.ts and update package.json scripts/hooks to use rslint (+ prettier in 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
Copy link

Copilot AI Mar 28, 2026

Choose a reason for hiding this comment

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

.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.

Suggested change
pnpm-lock.yaml
pnpm-lock.yaml
# Build artifacts
dist/
# Test output directories
coverage/
test-results/

Copilot uses AI. Check for mistakes.
@@ -1,18 +1,3 @@
{
"search.useIgnoreFiles": true,
Copy link

Copilot AI Mar 28, 2026

Choose a reason for hiding this comment

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

.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).

Suggested change
"search.useIgnoreFiles": true,
"search.useIgnoreFiles": true

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