Skip to content

refactor: replace lint/fmt with unified vp check#665

Merged
fengmk2 merged 4 commits intonode-modules:masterfrom
fengmk2:refactor/vp-check
Feb 28, 2026
Merged

refactor: replace lint/fmt with unified vp check#665
fengmk2 merged 4 commits intonode-modules:masterfrom
fengmk2:refactor/vp-check

Conversation

@fengmk2
Copy link
Member

@fengmk2 fengmk2 commented Feb 28, 2026

Replace separate lint, fmt, fmtcheck scripts with unified vp check command.

Changes

  • Replace lint, fmt, fmtcheck scripts with check and check:fix
  • Update CI workflow to use vp run check instead of separate lint/fmt steps
  • Remove redundant lint step from test job (already covered in typecheck job)
  • Simplify lint-staged config to use vp check --fix

Ref: voidzero-dev/setup-vp@9937ebf

Summary by CodeRabbit

  • Chores
    • Consolidated code-quality commands: removed separate lint/format scripts and introduced unified check and check:fix scripts.
    • CI pipeline updated to run the new check flow instead of previous lint steps.
    • Test run now performs the centralized check before executing tests.
    • Pre-commit/pre-push tooling updated to use the unified check (auto-fix) command.

- Replace separate lint, fmt, fmtcheck scripts with check and check:fix
- Update CI workflow to use 'vp run check' instead of separate lint/fmt steps
- Remove redundant lint step from test job (already covered in typecheck job)
- Simplify lint-staged config to use 'vp check --fix'
Copilot AI review requested due to automatic review settings February 28, 2026 09:18
@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refactors the project's code quality enforcement by replacing disparate lint, fmt, and fmtcheck npm scripts with a unified vp check command. This change simplifies the package.json scripts, streamlines the development workflow, and ensures consistent code style and quality checks across the project, including in the test script and lint-staged hooks.

Highlights

  • Script Consolidation: Consolidated lint, fmt, and fmtcheck npm scripts into new check and check:fix commands using vp check.
  • Test Workflow Update: Modified the test script to utilize the new check:fix command for pre-test code quality enforcement.
  • Lint-Staged Simplification: Streamlined the lint-staged configuration to use a single vp check --fix command, replacing separate lint and fmt calls.
Changelog
  • package.json
    • Removed lint, fmt, and fmtcheck scripts.
    • Updated the test script to use vp run check:fix.
    • Added new check and check:fix scripts.
    • Simplified the lint-staged configuration.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/nodejs.yml
Activity
  • No activity has been recorded for this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai
Copy link

coderabbitai bot commented Feb 28, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7d7ba11 and 2fd80e3.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (1)
  • package.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • package.json

📝 Walkthrough

Walkthrough

Replaced separate lint/format steps and scripts with a unified "check" flow: CI workflow .github/workflows/nodejs.yml now runs vp run check in typecheck; package.json removes lint, fmt, fmtcheck, adds check and check:fix, updates test, prepare, and lint-staged to use vp check commands.

Changes

Cohort / File(s) Summary
CI Workflow
.github/workflows/nodejs.yml
Removed "Run lint" and "Run format check" steps; replaced with a single "Check" step invoking vp run check in the typecheck job.
Package scripts & tooling
package.json
Deleted lint, fmt, fmtcheck scripts; added check and check:fix; changed test to run vp run check before tests; updated prepare to run check and check:fix; replaced lint-staged array with "vp check --fix".

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 Once many scripts hopped in a line,
Now one check per commit and it's fine.
I nibble the diff with a twitchy nose,
vp check hums softly as onward it goes. 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'refactor: replace lint/fmt with unified vp check' clearly and accurately describes the main change: consolidating separate lint/format scripts into a single vp check command.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 28, 2026

Open in StackBlitz

npm i https://pkg.pr.new/node-modules/urllib@665

commit: 867e183

Copy link

@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 refactors the linting and formatting scripts by replacing lint, fmt, and fmtcheck with a unified vp check command. The changes in package.json simplify the scripts and the lint-staged configuration. The overall change improves maintainability. I have one suggestion to improve the test script by removing side effects.

@codecov
Copy link

codecov bot commented Feb 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.77%. Comparing base (0db1f95) to head (2fd80e3).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #665   +/-   ##
=======================================
  Coverage   92.77%   92.77%           
=======================================
  Files          10       10           
  Lines         747      747           
  Branches      233      233           
=======================================
  Hits          693      693           
  Misses         51       51           
  Partials        3        3           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link

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 consolidates formatting and linting into a single vp check entrypoint and updates local scripts + CI to use it, reducing duplicated steps while keeping code quality checks in the pipeline.

Changes:

  • Replace lint / fmt / fmtcheck scripts with check and check:fix.
  • Update CI workflow to run vp run check (and remove separate lint/format-check steps).
  • Simplify lint-staged to run vp check --fix.

Reviewed changes

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

File Description
package.json Removes old lint/fmt scripts, adds check/check:fix, updates test and lint-staged to use vp check.
.github/workflows/nodejs.yml Switches CI from separate lint/format steps to a single vp run check, and removes redundant linting from the test matrix job.

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

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@package.json`:
- Line 61: The package.json "test" script currently runs "vp run check:fix"
which mutates files; change it so tests do not auto-fix—update the "test" script
(the value for the "test" npm script) to remove "vp run check:fix" and either
run a non-mutating lint/check command (e.g., "vp run check") or only run "vp
test run --reporter=dot"; if you still want an auto-fix step, move "vp run
check:fix" into a separate script (e.g., "fix" or a CI-only job) so "test"
remains deterministic and fails on style violations.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0db1f95 and 7d7ba11.

📒 Files selected for processing (2)
  • .github/workflows/nodejs.yml
  • package.json

@socket-security
Copy link

socket-security bot commented Feb 28, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​voidzero-dev/​vite-plus-test@​0.0.0-e32b32e5.20260224-0706 ⏵ 0.0.0-g61d318d2.20260227-093977 +61007699 +1100
Updatedvite-plus@​0.0.0-e32b32e5.20260224-0706 ⏵ 0.0.0-g61d318d2.20260227-093980 +1100100 +199 +1100 +10

View full report

Copilot AI review requested due to automatic review settings February 28, 2026 09:24
@fengmk2 fengmk2 merged commit c92321a into node-modules:master Feb 28, 2026
19 checks passed
Copy link

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

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

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

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

Comment on lines 112 to +117
vite-plus:
specifier: latest
version: 0.0.0-e32b32e5.20260224-0706(@arethetypeswrong/core@0.18.2)(@types/node@22.19.11)(typescript@5.9.3)(yaml@2.8.2)
version: 0.0.0-g61d318d2.20260227-0939(@arethetypeswrong/core@0.18.2)(@types/node@22.19.11)(typescript@5.9.3)(yaml@2.8.2)
vitest:
specifier: npm:@voidzero-dev/vite-plus-test@latest
version: '@voidzero-dev/vite-plus-test@0.0.0-e32b32e5.20260224-0706(@arethetypeswrong/core@0.18.2)(@types/node@22.19.11)(typescript@5.9.3)(yaml@2.8.2)'
version: '@voidzero-dev/vite-plus-test@0.0.0-g61d318d2.20260227-0939(@arethetypeswrong/core@0.18.2)(@types/node@22.19.11)(typescript@5.9.3)(yaml@2.8.2)'
Copy link

Copilot AI Feb 28, 2026

Choose a reason for hiding this comment

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

pnpm-lock.yaml now contains two versions of @voidzero-dev/vite-plus-test (0.0.0-e32… is still used for the vitest override / @vitest/coverage-v8, while 0.0.0-g61… is pulled in by the updated vite-plus). This version split can cause subtle incompatibilities between the vp toolchain and the vitest/coverage packages, and also increases install size. Consider aligning everything onto the same @voidzero-dev/vite-plus-test version (e.g., re-run pnpm update/install so the vitest override resolves to the same g61… build, or pin the override to the matching version).

Copilot uses AI. Check for mistakes.
Comment on lines 47 to 71
@@ -61,15 +58,17 @@
"test-tsc:cjs": "cd test/fixtures/ts && rm -rf node_modules && npm link ../../.. && vp run build",
"test-tsc:cjs:es2021": "cd test/fixtures/ts-cjs-es2021 && rm -rf node_modules && npm link ../../.. && vp run build",
"test-tsc:esm": "cd test/fixtures/ts-esm && rm -rf node_modules && npm link ../../.. && vp run build",
"test": "vp run lint -- --fix && vp test run --reporter=dot",
"test": "vp run check && vp test run --reporter=dot",
"bench": "vp test bench",
"test-keepalive": "cross-env TEST_KEEPALIVE_COUNT=50 vp test run --reporter=dot --test-timeout 180000 keep-alive-header.test.ts",
"test-node16": "node examples/httpclient.cjs && node examples/search_github.cjs && node examples/timing.cjs",
"cov": "vp test run --reporter=dot --coverage",
"ci": "vp run cov && vp run prepublishOnly && npm pack && attw --pack",
"clean": "rm -rf dist && tsc -b --clean",
"prepublishOnly": "vp run build",
"prepare": "husky"
"prepare": "husky",
"check": "vp check",
"check:fix": "vp check --fix"
Copy link

Copilot AI Feb 28, 2026

Choose a reason for hiding this comment

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

This PR removes the lint/fmt scripts and replaces them with check/check:fix, but repo docs still reference the old commands (e.g. CLAUDE.md mentions pnpm run lint and pnpm run fmt). Update the documentation to reflect the new script names so contributors don’t follow broken instructions.

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