Skip to content

fix(staged): Include additional supported config types from lint-staged#1263

Merged
fengmk2 merged 4 commits intovoidzero-dev:mainfrom
porada:fix/staged-types
Apr 2, 2026
Merged

fix(staged): Include additional supported config types from lint-staged#1263
fengmk2 merged 4 commits intovoidzero-dev:mainfrom
porada:fix/staged-types

Conversation

@porada
Copy link
Copy Markdown
Contributor

@porada porada commented Apr 1, 2026

This PR carries over additional supported config types from lint-staged to vp staged.

The Reason

vite-plus@0.1.15 broke type checks in my projects (example). Turns out it was because I was using lint-staged commands that didn’t match the original staged config type. For some reason, these weren’t flagged before the update (the commands worked and keep working fine at runtime).

I can confirm this fixes the type issues for me locally, but I’d appreciate guidance on adding more thorough tests for these changes.

@netlify
Copy link
Copy Markdown

netlify bot commented Apr 1, 2026

Deploy Preview for viteplus-preview canceled.

Name Link
🔨 Latest commit c9b4be9
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/69cdfde2ec51e8000873c929

@porada porada changed the title fix(staged): Include supported config types from lint-staged fix(staged): Include additional supported config types from lint-staged Apr 1, 2026
@fengmk2
Copy link
Copy Markdown
Member

fengmk2 commented Apr 2, 2026

@porada Thank you very much for the feedback and fix. I'll take over this PR. I want to avoid custom type definitions for lint-staged, so I'll try to directly export lint-staged's type definitions to achieve this.

@fengmk2
Copy link
Copy Markdown
Member

fengmk2 commented Apr 2, 2026

I found the issue. Currently, vite-plus's dependencies are not in a complete bundled mode, so for now we can only copy the code once. We still need a dependency build refactoring task #744.
@porada I will continue to improve based on your fix, and will merge it after adding tests. Thank you.

@fengmk2 fengmk2 self-requested a review April 2, 2026 03:13
@fengmk2 fengmk2 self-assigned this Apr 2, 2026
fengmk2 added 2 commits April 2, 2026 11:16
Copy type definitions from lint-staged@16.4.0 instead of maintaining
a custom type that diverged from upstream. Key fixes:
- Mixed arrays of strings and functions now accepted
- Top-level GenerateTask function supported as config value

Closes #1263
@fengmk2 fengmk2 merged commit 09372d9 into voidzero-dev:main Apr 2, 2026
32 checks passed
@porada
Copy link
Copy Markdown
Contributor Author

porada commented Apr 2, 2026

Thanks for getting this across the finish line!

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