Repository navigation
Description
Description
After certain changes, a large number of type errors and lint errors can appear in the codebase at once.
- When adding
noUncheckedIndexedAccesstotsconfig.json - When doing a bulk find-and-replace across the codebase
In these situations, it's more efficient to fix type errors first. Type errors can cause lint errors, so fixing them may resolve lint errors automatically. By fixing type errors first and lint errors second, you can reduce the overall amount of work.
Suggested solution
To support this workflow, I'd like a vp typecheck command — a command that runs only type checking, without format or lint.
Alternative
One workaround is to use vp exec tsgo. While this works, having a dedicated command would be more approachable for beginners.
Additional context
There is already a vp lint command. By default it runs only lint, but setting lint.options.typeCheck to true also runs type checking alongside lint. So the current behavior is:
- When
lint.options.typeCheckistrue:vp check: runs format, lint, and type checkvp format: runs format onlyvp lint: runs lint and type checkvp typecheck: runs type check only
- When
lint.options.typeCheckisfalse:vp check: runs format, lint, and type checkvp format: runs format onlyvp lint: runs lint onlyvp typecheck: runs type check only
Since vp format runs only format and vp typecheck would run only type check, users would naturally expect vp lint to run only lint as well. Having vp lint run more than just lint when lint.options.typeCheck: true feels inconsistent and unintuitive.
Here are some possible ways to address this, though each comes with trade-offs:
- Deprecate the
lint.options.typeCheckoption and makevp lintalways run lint only. However, this would be a breaking change for existing users. - Add a
--type-checkflag tovp lintso users can opt in to type checking via the command line. However, the interaction withlint.options.typeCheck: falsemay be confusing.
I'd love to hear if there are better ideas for solving this.
Validations
- Read the Contributing Guidelines.
- Confirm this request is for Vite+ itself and not for Vite, Vitest, tsdown, Rolldown, or Oxc.
- Check that there isn't already an issue requesting the same feature.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Start date
Target date
Effort
Activity
mizdra commentedon Apr 2, 2026
Thinking about this further, there are some open questions:
vp typecheckcheck?tsconfig.json?vp lintruns type checking only on the files targeted by lint.tsconfig.jsonpath be configurable?vp typecheck --project tsconfig.typecheck.json.--project, or a config option liketypeCheck.options.projectinvite.config.ts?These questions suggest that a full
vp typecheckcommand could be a fairly large undertaking.Stepping back to why I wanted
vp typecheckin the first place: my real pain point is that lint errors are mixed together in the output ofvp lint. If there were a way to suppress lint errors fromvp lintoutput, that would already satisfy my needs. So a simpler solution might be to just add a--type-check-onlyflag tovp lint.fengmk2 commentedon Apr 2, 2026
Consider adding a
--type-onlyoption tovp checkhttps://viteplus.dev/guide/check? cc @cpojer what do you think?cpojer commentedon Apr 2, 2026
I agree that a flag is better. I think
--type-check-onlyis the most descriptive for this specific use case.jong-kyung commentedon Apr 3, 2026
@fengmk2 Hi! I would like to work on this issue. Could you assign it to me?
kazupon commentedon Apr 3, 2026
I think that, in that case, shouldn’t we add
--fmt-onlyand--lint-onlytoo? 🤔If only
--type-checkis available, people tend to assume that there are standalone options like these, and they often end up wanting them.fengmk2 commentedon Apr 3, 2026
I suddenly remembered that oxlint doesn't have the "type check only" feature, right? @camc314
cpojer commentedon Apr 3, 2026
Since we already have
--no-fmtand--no-lint, it might be better not to add any*-onlyflags. Instead, maybe we could find a good name for type checks but no lints, or redefine--no-lintto keep running type checks, and require--no-type-checkto disable lint and type-check. Thenvp check --no-lintwould work for this use case.13 remaining items
fengmk2 commentedon Apr 15, 2026
@jong-kyung Yes, so we can take this opportunity to expand the complete functional description of the
vp checkcommand, which includes 3 core functions: format, lint, and type check. All are enabled by default, and can be individually disabled through these 3 flag parameters.Resulting behavior
vp checkvp check --no-lintvp check --no-type-checkvp check --no-lint --no-type-checkvp check --no-fmtRationale
--no-fmt/--no-lintconventions.vp check --no-lintnaturally expresses the "type-check only" use case that motivated the issue.jong-kyung commentedon Apr 15, 2026
@fengmk2 Thanks! I've closed #1387 and will rework it along the proposed direction.
feat(check): redefine --no-lint for type-check-only workflow (voidzer…
alexgagnon commentedon Jul 22, 2026
If I may add a use case to support this work, I'm trying to have a PostToolUse hook that runs
vp checkon any supported file that's been touched by an agent. I believe that if I have typeCheck: true in my lint config, and if my tsconfig.json doesn't setisolatedDeclarationsto true, then depending on what's cached, it might be re-running the whole type check per file edit (this is from my limited understanding, and which may or may not be wanted). The --no-type-check might help with this?liangmiQwQ commentedon Oct 29, 2026
@KTrain5169 proposed to reconsider a separate
vp typecheck(alias:vp tc) command.#2735 already showed the current approach has limitation when users wanna run typecheck separately, not bound with
vp checkandvp lint.Regarding the previously discussed configuration and project boundary issues, I don't think things will actually be that complex,
vp typecheckshould be based directly onoxlint --type-check-only, rather than underlyingtsgoortsc.Context: https://discord.com/channels/1475973262193459293/1479410337223802951/1565356869017673852
cc @fengmk2 and @cpojer
voidzero-bot commentedon Oct 29, 2026
vp check --no-lint(whenlint.options.typeCheckis enabled) or by runningvp exec tsgo, so the current impact is mitigated.This issue is a feature request for a dedicated type-check command surface rather than a reproducible bug. Current
mainalready has partial support for the underlying workflow:vp check --no-lintskips lint rules while still running type checks (gated bylint.options.typeCheck), andvp lint --type-checkenables type checking inside the lint command. The remaining gap is whether Vite+ exposes this as a first-classvp typecheckcommand or via independently toggleable flags onvp check.I wasn't able to find a fix for this issue, but I identified some areas that may be relevant. The relevant command routing appears to live in the TypeScript/Rust CLI layer for
vp checkandvp lint, and the final design depends on whether Oxlint's--type-check-onlyflag should be surfaced directly asvp typecheckor folded intovp check --no-lint/--no-type-checksemantics. A human maintainer should decide between those product directions.Full Triage Report
Triage Report: Issue #1275
Issue Summary
Title: Add
vp typecheckcommandReporter: @mizdra
Type: Feature request / enhancement
The reporter requests a dedicated
vp typecheckcommand (or equivalent mechanism) that runs only TypeScript type checking without formatting or linting. The motivation is a workflow where fixing type errors first can also resolve downstream lint errors, so being able to run type checks in isolation is more efficient after large refactors such as enablingnoUncheckedIndexedAccessor bulk find-and-replace.The discussion evolved through several alternatives:
vp typecheckcommand.--type-check-onlyflag onvp lintorvp check.--no-fmt/--no-lintflags and treating type checking as a first-class concern invp check.A maintainer (@fengmk2) ultimately proposed redefining
vp check --no-lintto skip lint rules while still running type checks (when type checking is enabled), and adding--no-type-checkto disable type checks. Later comments suggested reconsidering a standalonevp typecheckcommand based onoxlint --type-check-only.Current Checkout Behavior
vp checkalready supports--no-fmtand--no-lint, with help text stating that--no-lintskips lint rules but type-check still runs whenlint.options.typeCheckis true.vp lintalready supports a--type-checkflag to enable experimental type checking.vp typecheckcommand.Reproduction Attempt
This is a feature request rather than a bug report. No incorrect runtime behavior was reported to reproduce. The current
vp check --no-lintbehavior partially addresses the original motivation (running type checks without lint), but it is gated bylint.options.typeCheckrather than being an independently toggleable concern, and a dedicatedvp typecheckcommand does not exist.Result
Skipped:
not-actionableThe issue is a feature request / discussion about command design, not a Vite+ bug report. Per the triage instructions, feature requests are skipped as
not-actionablefor automated bug reproduction.Environment
vpv1.4.0This report was made by an LLM. The analysis may be wrong, and the potential fix might not work, but is intended as a starting point for exploring the issue.
fengmk2 commentedon Oct 30, 2026
A separate
typechecksubcommand will not be added for now. You can currently configure it viascripts.typecheckand run the custom command withvpr typecheck.cholwell commentedon Dec 2, 2026
It feels slightly at odds with Vite+’s goal of being a unified toolchain that type-checking requires lint configuration or a custom script, rather than having a dedicated command. Is that something that might be reconsidered?
cpojer commentedon Dec 2, 2026
You got it wrong. Type checking and linting are exactly the same thing. vp check is all you need.