chore: build improvements and lint-staged type checking#10
Merged
Conversation
Add exclude pattern for test files to prevent them from being included in the production bundle. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add rimraf to clean the dist directory before each build, ensuring stale files from previous builds don't persist. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Run tsc --noEmit when TypeScript files are staged to catch type errors before they're committed. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Thank you for these improvements to the build pipeline and pre-commit checks. This update cleans the output directory before builds, excludes test files, and adds type-checking for staged files, which will help catch errors earlier and keep the build output clean. There are a couple of potential considerations regarding the type-checking implementation for individually staged files and a new dependency's Node.js version compatibility.
Documents the minimum Node.js version for contributors, addressing feedback from PR #9 review. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
frankieyan
commented
Jan 31, 2026
| "lint-staged": { | ||
| "*.{js,ts,mjs,mts,tsx,json,md}": "biome check --write --no-errors-on-unmatched" | ||
| "*.{js,ts,mjs,mts,tsx,json,md}": "biome check --write --no-errors-on-unmatched", | ||
| "*.{ts,mts,tsx}": "tsc --noEmit" |
Member
Author
There was a problem hiding this comment.
This ended up causing tsc to ignore tsconfig.json. Will be fixed in a follow up
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR improves the build pipeline by cleaning the dist folder before each build and excluding test files from the output. Also adds type checking to the pre-commit hook so type errors are caught before changes are committed.
Extracted from #8.
Test plan
npm run buildand verify the dist folder is cleared before new files are writtennpx lint-staged— it should fail with the type errornpx lint-staged— it should pass