Skip to content

vp check --no-fmt --no-lint ignores typeAware inherited from lint.extends #2225

Description

@eai04191

Describe the bug

vp check does not recognize options.typeAware when it is inherited through lint.extends.

The reproduction defines:

  • options.typeAware: true in an imported base Oxlint configuration
  • options.typeCheck: true directly in vite.config.ts
  • lint.extends: [base] in vite.config.ts

Oxlint resolves the resulting configuration as:

{
  "typeAware": true,
  "typeCheck": true
}

Expected behavior

vp check --no-fmt --no-lint should recognize that type checking is enabled and run the type-check-only path.

Actual behavior

Vite+ exits with status 1 and reports:

error: No checks enabled

Running vp check --no-fmt does execute TypeScript diagnostics, but Vite+ reports them as Lint issues found rather than type errors. This suggests that Oxlint honors the inherited option while Vite+'s command orchestration does not recognize it.

Root cause

lint_config_type_check_enabled reads only the direct lint.options.typeAware and lint.options.typeCheck properties. It does not consider options inherited through lint.extends.

/// `typeCheck` requires `typeAware` as a prerequisite — oxlint's type-aware
/// analysis must be on for TypeScript diagnostics to surface.
pub(super) fn lint_config_type_check_enabled(lint_config: Option<&serde_json::Value>) -> bool {
let options = lint_config.and_then(|config| config.get("options"));
json_bool(options, "typeAware", false) && json_bool(options, "typeCheck", false)
}

execute_check uses that result to decide whether the type-check phase is enabled before invoking Oxlint.

let type_check_enabled = lint_config_type_check_enabled(resolved_vite_config.lint.as_ref());
let lint_enabled = !no_lint;
let run_lint_phase = lint_enabled || type_check_enabled;
if no_fmt && !run_lint_phase {
output::error("No checks enabled");
print_summary_line(
"Enable `lint.options.typeCheck` in vite.config.ts for type-check only, drop a `--no-fmt`/`--no-lint` flag, or re-enable `check.fmt`/`check.lint` in vite.config.ts.",
);
return Ok(ExitStatus(1));

Impact

Projects using reusable Oxlint configurations cannot use the documented type-check-only command without duplicating typeAware: true directly in vite.config.ts. Vite+ also misclassifies successful and failed checks when type checking is enabled through inheritance.

Suggested solution

Determine whether type checking is enabled from the fully resolved Oxlint configuration, or otherwise account for inherited options before deciding whether to run and how to label the type-check phase.

A regression test should cover typeAware inherited through lint.extends with typeCheck defined directly in the child configuration.

Reproduction

https://github.com/eai04191/vite-plus-extends-typecheck-reproduction

Steps to reproduce

  1. Clone and enter the reproduction repository:
  2. Install the locked dependencies:
  3. Confirm that Oxlint resolves both inherited options:
    pnpm inspect:oxlint
    The resolved configuration contains:
    "options": {
      "typeAware": true,
      "typeCheck": true
    }
  4. Reproduce the Vite+ behavior:
    pnpm reproduce
    The command exits with status 1 and reports No checks enabled.

System Info

❯ vp env current
VITE+ - The Unified Toolchain for the Web

Environment:
  Version  24.18.0
  Source   lts

Tool Paths:
  node  /Users/eai/.vite-plus/js_runtime/node/24.18.0/bin/node
  npm   /Users/eai/.vite-plus/js_runtime/node/24.18.0/bin/npm
  npx   /Users/eai/.vite-plus/js_runtime/node/24.18.0/bin/npx
❯ vp --version
VITE+ - The Unified Toolchain for the Web

vp v0.2.5

Local vite-plus:
  vite-plus  v0.2.5

Tools:
  vite             v8.1.4
  rolldown         v1.1.5
  vitest           v4.1.10
  oxfmt            v0.58.0
  oxlint           v1.73.0
  oxlint-tsgolint  v0.24.0
  tsdown           v0.22.7

Environment:
  Package manager  pnpm latest
  Node.js          v24.18.0

Used Package Manager

pnpm

Logs

❯ vp check --no-fmt --no-lint
error: No checks enabled

Enable `lint.options.typeCheck` in vite.config.ts for type-check only, drop a `--no-fmt`/`--no-lint` flag, or re-enable `check.fmt`/`check.lint` in vite.config.ts.
[ELIFECYCLE] Command failed with exit code 1.

Validations

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Fields

Priority

None yet

Effort

None yet

Target date

None yet

Start date

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions