Skip to content

Commit c92321a

Browse files
authored
chore: replace lint/fmt with unified vp check (#665)
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 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Consolidated code quality checks into unified commands. * Streamlined CI/CD pipeline validation process. * Updated pre-commit hooks to use centralized code checking. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 0db1f95 commit c92321a

3 files changed

Lines changed: 76 additions & 86 deletions

File tree

.github/workflows/nodejs.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,15 @@ jobs:
2424
cache: true
2525
run-install: true
2626

27-
- name: Run lint
28-
run: vp run lint
27+
- name: Check
28+
run: vp run check
2929

3030
- name: Check dedupe
3131
run: vp dedupe --check
3232

3333
- name: Run typecheck
3434
run: vp run typecheck
3535

36-
- name: Run format check
37-
run: vp run fmtcheck
38-
3936
- name: Run build check
4037
run: vp run build
4138

@@ -67,9 +64,6 @@ jobs:
6764
cache: true
6865
run-install: true
6966

70-
- name: Run lint
71-
run: vp run lint
72-
7367
- name: Run tests
7468
run: vp run ci
7569

package.json

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,7 @@
4545
"tag": "latest"
4646
},
4747
"scripts": {
48-
"lint": "vp lint src test --type-aware --type-check",
4948
"typecheck": "tsc --noEmit && tsgo --noEmit",
50-
"fmt": "vp fmt",
51-
"fmtcheck": "vp fmt --check",
5249
"prebuild": "vp run clean",
5350
"build": "vp run build:ts && vp run build:version",
5451
"build:ts": "tsc --version && tshy && tshy-after",
@@ -61,15 +58,17 @@
6158
"test-tsc:cjs": "cd test/fixtures/ts && rm -rf node_modules && npm link ../../.. && vp run build",
6259
"test-tsc:cjs:es2021": "cd test/fixtures/ts-cjs-es2021 && rm -rf node_modules && npm link ../../.. && vp run build",
6360
"test-tsc:esm": "cd test/fixtures/ts-esm && rm -rf node_modules && npm link ../../.. && vp run build",
64-
"test": "vp run lint -- --fix && vp test run --reporter=dot",
61+
"test": "vp run check && vp test run --reporter=dot",
6562
"bench": "vp test bench",
6663
"test-keepalive": "cross-env TEST_KEEPALIVE_COUNT=50 vp test run --reporter=dot --test-timeout 180000 keep-alive-header.test.ts",
6764
"test-node16": "node examples/httpclient.cjs && node examples/search_github.cjs && node examples/timing.cjs",
6865
"cov": "vp test run --reporter=dot --coverage",
6966
"ci": "vp run cov && vp run prepublishOnly && npm pack && attw --pack",
7067
"clean": "rm -rf dist && tsc -b --clean",
7168
"prepublishOnly": "vp run build",
72-
"prepare": "husky"
69+
"prepare": "husky",
70+
"check": "vp check",
71+
"check:fix": "vp check --fix"
7372
},
7473
"dependencies": {
7574
"form-data": "^4.0.5",
@@ -114,10 +113,7 @@
114113
"vitest": "npm:@voidzero-dev/vite-plus-test@latest"
115114
},
116115
"lint-staged": {
117-
"*": [
118-
"vp run lint --fix",
119-
"vp fmt --no-error-on-unmatched-pattern"
120-
]
116+
"*": "vp check --fix"
121117
},
122118
"tshy": {
123119
"exports": {

pnpm-lock.yaml

Lines changed: 69 additions & 69 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)