From 160e423dce9900f7f7c6bce7f6845229d5732f8b Mon Sep 17 00:00:00 2001 From: connorshea <2977353+connorshea@users.noreply.github.com> Date: Tue, 3 Mar 2026 09:43:38 +0000 Subject: [PATCH] docs(linter): Add a note that the typeAware and typeCheck options require oxlint-tsgolint (#19940) Just making sure that that is clear for users. --- apps/oxlint/src-js/package/config.generated.ts | 4 ++++ crates/oxc_linter/src/config/oxlintrc.rs | 4 ++++ npm/oxlint/configuration_schema.json | 8 ++++---- tasks/website_linter/src/snapshots/schema_json.snap | 8 ++++---- tasks/website_linter/src/snapshots/schema_markdown.snap | 4 ++++ 5 files changed, 20 insertions(+), 8 deletions(-) diff --git a/apps/oxlint/src-js/package/config.generated.ts b/apps/oxlint/src-js/package/config.generated.ts index d10e0cfb1b95d..5aa853389539d 100644 --- a/apps/oxlint/src-js/package/config.generated.ts +++ b/apps/oxlint/src-js/package/config.generated.ts @@ -328,12 +328,16 @@ export interface OxlintOptions { * Enable rules that require type information. * * Equivalent to passing `--type-aware` on the CLI. + * + * Note that this requires the `oxlint-tsgolint` package to be installed. */ typeAware?: boolean | null; /** * Enable experimental type checking (includes TypeScript compiler diagnostics). * * Equivalent to passing `--type-check` on the CLI. + * + * Note that this requires the `oxlint-tsgolint` package to be installed. */ typeCheck?: boolean | null; } diff --git a/crates/oxc_linter/src/config/oxlintrc.rs b/crates/oxc_linter/src/config/oxlintrc.rs index ec84d6b6408d9..4b4fce21c28f3 100644 --- a/crates/oxc_linter/src/config/oxlintrc.rs +++ b/crates/oxc_linter/src/config/oxlintrc.rs @@ -29,11 +29,15 @@ pub struct OxlintOptions { /// Enable rules that require type information. /// /// Equivalent to passing `--type-aware` on the CLI. + /// + /// Note that this requires the `oxlint-tsgolint` package to be installed. #[serde(skip_serializing_if = "Option::is_none")] pub type_aware: Option, /// Enable experimental type checking (includes TypeScript compiler diagnostics). /// /// Equivalent to passing `--type-check` on the CLI. + /// + /// Note that this requires the `oxlint-tsgolint` package to be installed. #[serde(skip_serializing_if = "Option::is_none")] pub type_check: Option, /// Ensure warnings produce a non-zero exit code. diff --git a/npm/oxlint/configuration_schema.json b/npm/oxlint/configuration_schema.json index dc05e556c3b64..8fcc91583c519 100644 --- a/npm/oxlint/configuration_schema.json +++ b/npm/oxlint/configuration_schema.json @@ -513,20 +513,20 @@ "markdownDescription": "Specify a warning threshold. Exits with an error status if warnings exceed this value.\n\nEquivalent to passing `--max-warnings` on the CLI." }, "typeAware": { - "description": "Enable rules that require type information.\n\nEquivalent to passing `--type-aware` on the CLI.", + "description": "Enable rules that require type information.\n\nEquivalent to passing `--type-aware` on the CLI.\n\nNote that this requires the `oxlint-tsgolint` package to be installed.", "type": [ "boolean", "null" ], - "markdownDescription": "Enable rules that require type information.\n\nEquivalent to passing `--type-aware` on the CLI." + "markdownDescription": "Enable rules that require type information.\n\nEquivalent to passing `--type-aware` on the CLI.\n\nNote that this requires the `oxlint-tsgolint` package to be installed." }, "typeCheck": { - "description": "Enable experimental type checking (includes TypeScript compiler diagnostics).\n\nEquivalent to passing `--type-check` on the CLI.", + "description": "Enable experimental type checking (includes TypeScript compiler diagnostics).\n\nEquivalent to passing `--type-check` on the CLI.\n\nNote that this requires the `oxlint-tsgolint` package to be installed.", "type": [ "boolean", "null" ], - "markdownDescription": "Enable experimental type checking (includes TypeScript compiler diagnostics).\n\nEquivalent to passing `--type-check` on the CLI." + "markdownDescription": "Enable experimental type checking (includes TypeScript compiler diagnostics).\n\nEquivalent to passing `--type-check` on the CLI.\n\nNote that this requires the `oxlint-tsgolint` package to be installed." } }, "additionalProperties": false, diff --git a/tasks/website_linter/src/snapshots/schema_json.snap b/tasks/website_linter/src/snapshots/schema_json.snap index 1d11aafce5785..949acb1437e85 100644 --- a/tasks/website_linter/src/snapshots/schema_json.snap +++ b/tasks/website_linter/src/snapshots/schema_json.snap @@ -517,20 +517,20 @@ expression: json "markdownDescription": "Specify a warning threshold. Exits with an error status if warnings exceed this value.\n\nEquivalent to passing `--max-warnings` on the CLI." }, "typeAware": { - "description": "Enable rules that require type information.\n\nEquivalent to passing `--type-aware` on the CLI.", + "description": "Enable rules that require type information.\n\nEquivalent to passing `--type-aware` on the CLI.\n\nNote that this requires the `oxlint-tsgolint` package to be installed.", "type": [ "boolean", "null" ], - "markdownDescription": "Enable rules that require type information.\n\nEquivalent to passing `--type-aware` on the CLI." + "markdownDescription": "Enable rules that require type information.\n\nEquivalent to passing `--type-aware` on the CLI.\n\nNote that this requires the `oxlint-tsgolint` package to be installed." }, "typeCheck": { - "description": "Enable experimental type checking (includes TypeScript compiler diagnostics).\n\nEquivalent to passing `--type-check` on the CLI.", + "description": "Enable experimental type checking (includes TypeScript compiler diagnostics).\n\nEquivalent to passing `--type-check` on the CLI.\n\nNote that this requires the `oxlint-tsgolint` package to be installed.", "type": [ "boolean", "null" ], - "markdownDescription": "Enable experimental type checking (includes TypeScript compiler diagnostics).\n\nEquivalent to passing `--type-check` on the CLI." + "markdownDescription": "Enable experimental type checking (includes TypeScript compiler diagnostics).\n\nEquivalent to passing `--type-check` on the CLI.\n\nNote that this requires the `oxlint-tsgolint` package to be installed." } }, "additionalProperties": false, diff --git a/tasks/website_linter/src/snapshots/schema_markdown.snap b/tasks/website_linter/src/snapshots/schema_markdown.snap index 412389d5474b6..ad6d345a5fda7 100644 --- a/tasks/website_linter/src/snapshots/schema_markdown.snap +++ b/tasks/website_linter/src/snapshots/schema_markdown.snap @@ -333,6 +333,8 @@ Enable rules that require type information. Equivalent to passing `--type-aware` on the CLI. +Note that this requires the `oxlint-tsgolint` package to be installed. + ### options.typeCheck @@ -343,6 +345,8 @@ Enable experimental type checking (includes TypeScript compiler diagnostics). Equivalent to passing `--type-check` on the CLI. +Note that this requires the `oxlint-tsgolint` package to be installed. + ## overrides