From 70c53b19f7e7142f411278e4008e7942106d2b3d Mon Sep 17 00:00:00 2001 From: camc314 <18101008+camc314@users.noreply.github.com> Date: Mon, 30 Mar 2026 21:30:27 +0000 Subject: [PATCH] docs(linter): highlight that tsconfig is not respected in type aware linting (#20884) Related: https://github.com/oxc-project/tsgolint/issues/852 --- apps/oxlint/src/command/lint.rs | 6 +++++- tasks/website_linter/src/snapshots/cli.snap | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/oxlint/src/command/lint.rs b/apps/oxlint/src/command/lint.rs index c82612955e24d..ef96730f67360 100644 --- a/apps/oxlint/src/command/lint.rs +++ b/apps/oxlint/src/command/lint.rs @@ -127,7 +127,11 @@ pub struct BasicOptions { /// Oxlint automatically discovers the relevant `tsconfig.json` for each file. /// Use this only when your project uses a non-standard tsconfig name or location. /// - /// NOTE: Type checking and Type aware rules will still use the tsconfig discovered automatically, and will not be affected by this option. + /// ::: warning + /// Avoid using this this option. It can cause differences between import resolution, + /// and type-aware linting. Type aware linting **does not** respect this option, + /// and will always discover the appropriate `tsconfig.json` for each file automatically. + /// ::: #[bpaf(argument("./tsconfig.json"), hide_usage)] pub tsconfig: Option, diff --git a/tasks/website_linter/src/snapshots/cli.snap b/tasks/website_linter/src/snapshots/cli.snap index 21ca2dc97c293..174c40cafac62 100644 --- a/tasks/website_linter/src/snapshots/cli.snap +++ b/tasks/website_linter/src/snapshots/cli.snap @@ -22,7 +22,7 @@ search: false - **` --tsconfig`**=_`<./tsconfig.json>`_ — Override the TypeScript config used for import resolution. Oxlint automatically discovers the relevant `tsconfig.json` for each file. Use this only when your project uses a non-standard tsconfig name or location. - NOTE: Type checking and Type aware rules will still use the tsconfig discovered automatically, and will not be affected by this option. + ::: warning Avoid using this this option. It can cause differences between import resolution, and type-aware linting. Type aware linting **does not** respect this option, and will always discover the appropriate `tsconfig.json` for each file automatically. ::: - **` --init`** — Initialize oxlint configuration with default values