Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run pre-commit type check only for TypeScript #1597

Merged
merged 2 commits into from
Nov 19, 2024
Merged

Conversation

webfiltered
Copy link
Contributor

Pros:

  • Only runs type check if there is a .ts, .tsx or .vue file staged
  • Is otherwise the same as current npm typecheck (inc. tsc-strict)

Cons:

  • Changing other files, e.g. tsconfig.json without any .ts files staged, type checking will not run

@webfiltered
Copy link
Contributor Author

This one is just an option, because I already did the work on the other side. There's nothing relying on this - feel free to close!

Copy link
Member

@huchenlei huchenlei left a comment

Choose a reason for hiding this comment

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

LGTM with nits.

lint-staged.config.js Outdated Show resolved Hide resolved
lint-staged.config.js Outdated Show resolved Hide resolved
@huchenlei huchenlei merged commit 40245aa into main Nov 19, 2024
9 checks passed
@huchenlei huchenlei deleted the typecheck-filter branch November 19, 2024 02:58
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