You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(check): redefine --no-lint for type-check-only workflow (#1444)
## Summary
Redefines `vp check --no-lint` so it runs Oxlint's `--type-check-only`
path when
`lint.options.typeCheck` is enabled in `vite.config.ts`, and makes
`vp check --no-fmt --no-lint` the natural type-check-only invocation.
Replaces the abandoned PR #1417 approach (sidecar `.mjs` +
`--no-type-check`
CLI flag), which conflicts with upstream PR #1378 handing config
resolution
back to oxlint/oxfmt.
Related: closes#1275 for the lint-rule-noise-free type-error triage
workflow.
## Behavior matrix
| Command | Behavior |
| ----------------------------------------------- |
------------------------------------------------ |
| `vp check --no-lint` (typeCheck=true) | Runs `--type-check-only`; lint
rules suppressed |
| `vp check --no-lint` (typeCheck=false/missing) | Skips lint phase
entirely (existing behavior) |
| `vp check --no-fmt --no-lint` (typeCheck=true) | Type-check only |
| `vp check --no-fmt --no-lint` (typeCheck=false) | `error: No checks
enabled` with remediation hint |
| `vp check --fix --no-lint` (typeCheck=true) | fmt `--fix` + read-only
type-check diagnostics |
`--no-type-check` CLI flag is **not** introduced — deferred to a
follow-up once
oxlint exposes a symmetric OFF-direction flag for type-check.
## Key design notes
- **typeAware prerequisite.** Type-check only runs when both
`lint.options.typeAware` and `lint.options.typeCheck` are true, matching
the
`--type-check` / `--type-aware` flag dependency in
`rfcs/check-command.md`
("If `--no-type-aware` is set, `--type-check` is also implicitly
disabled").
- **`--fix --no-lint` on a typeCheck-enabled project** runs fmt `--fix`
and
then type-check as read-only diagnostics. On type error, fmt's
completion
pass line is still surfaced so lint-staged / pre-commit flows can tell
the
working tree was mutated before the failure (previously swallowed).
- **No sidecar.** Config resolution is left to oxlint/oxfmt per PR
#1378.
Copy file name to clipboardExpand all lines: packages/cli/snap-tests/check-fix-lint-error-not-swallowed/snap.txt
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -10,3 +10,4 @@ error: Lint issues found
10
10
help: Avoid eval(). For JSON parsing use JSON.parse(); for dynamic property access use bracket notation (obj[key]); for other cases refactor to avoid evaluating strings as code.
11
11
12
12
Found 1 error and 0 warnings in 1 file (<variable>ms, <variable> threads)
13
+
pass: Formatting completed for checked files (<variable>ms)
0 commit comments