-
Notifications
You must be signed in to change notification settings - Fork 3
refactor(lint): replace typecheck with oxlint --type-check #200
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
Conversation
- Replace typecheck scripts with oxlint --type-check in lint and format - Remove dedicated typecheck, typecheck:root, typecheck:submodules scripts - Add lint:submodule and format:submodule for workspace linting/formatting - Update examples to use lint and format with oxlint directly - Simplify lefthook configuration: remove nested groups, add type-check to hook This consolidates type checking into oxlint, eliminating the need for separate tsgo --noEmit invocations. Introduces explicit submodule commands for workspace-level operations.
Add @typescript/native-preview to knip's ignoreDependencies list to prevent false positive unused dependency warnings. This package is required for TypeScript native preview features and is not directly imported in source code.
commit: |
The typecheck functionality is now integrated into the lint step via oxlint --type-check, so the dedicated typecheck step is no longer needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issues found across 4 files
There was a problem hiding this 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 type checking into oxlint by replacing the separate tsgo --noEmit type checking with oxlint --type-check, simplifying the linting infrastructure and reducing the number of commands needed.
- Integrates type checking directly into lint and format workflows using
oxlint --type-check - Removes three dedicated typecheck scripts (
typecheck,typecheck:root,typecheck:submodules) - Adds explicit workspace commands for submodule operations (
lint:submodule,format:submodule)
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| package.json | Adds --type-check flag to oxlint commands, removes typecheck scripts, adds submodule commands |
| lefthook.yaml | Simplifies pre-commit hooks by consolidating type checking into oxlint, changes execution from parallel to piped |
| knip.config.ts | Adds @typescript/native-preview to ignoreDependencies to prevent knip warnings |
| examples/package.json | Replaces typecheck script with lint and format scripts using oxlint with --type-check |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "type": "module", | ||
| "scripts": { | ||
| "typecheck": "tsgo --noEmit" | ||
| "lint": "oxlint --max-warnings=0 --type-aware --type-check", |
Copilot
AI
Dec 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The examples lint script only runs oxlint, but the root package lint includes both oxfmt check and oxlint. This creates an inconsistency in linting behavior between root and examples. Consider adding oxfmt check to the examples lint script:
"lint": "oxfmt --no-error-on-unmatched-pattern --check . && oxlint --max-warnings=0 --type-aware --type-check"Or if oxfmt is not needed in examples, document why the linting approach differs from the root package.
| "lint": "oxlint --max-warnings=0 --type-aware --type-check", | |
| "lint": "oxfmt --no-error-on-unmatched-pattern --check . && oxlint --max-warnings=0 --type-aware --type-check", |
7da0a69 to
85db2c1
Compare
Add knip dependency check to the push hook to catch unused dependencies before they are pushed to the repository.
85db2c1 to
f2338ea
Compare
Summary
Consolidate type checking into oxlint and simplify linting infrastructure by removing the separate
typecheckscript.tsgo --noEmitwithoxlint --type-checkin lint and format commandstypecheck,typecheck:root,typecheck:submodules)lint:submoduleandformat:submodulecommands for workspace operations@typescript/native-previewVerification
Test plan
pnpm run lintto verify root and submodule lintingpnpm run formatto verify root formattingpnpm run lint:submoduleto verify submodule lintingcd examples && pnpm run lintto verify examples lintingSummary by cubic
Consolidates TypeScript type checking into oxlint for simpler, faster linting and pre-commit checks. Removes separate typecheck scripts and adds workspace-friendly lint/format commands.
Refactors
Migration
Written for commit f2338ea. Summary will update automatically on new commits.