Skip to content

Commit 70c53b1

Browse files
committed
docs(linter): highlight that tsconfig is not respected in type aware linting (oxc-project#20884)
Related: oxc-project/tsgolint#852
1 parent 98510d2 commit 70c53b1

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

apps/oxlint/src/command/lint.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,11 @@ pub struct BasicOptions {
127127
/// Oxlint automatically discovers the relevant `tsconfig.json` for each file.
128128
/// Use this only when your project uses a non-standard tsconfig name or location.
129129
///
130-
/// NOTE: Type checking and Type aware rules will still use the tsconfig discovered automatically, and will not be affected by this option.
130+
/// ::: warning
131+
/// Avoid using this this option. It can cause differences between import resolution,
132+
/// and type-aware linting. Type aware linting **does not** respect this option,
133+
/// and will always discover the appropriate `tsconfig.json` for each file automatically.
134+
/// :::
131135
#[bpaf(argument("./tsconfig.json"), hide_usage)]
132136
pub tsconfig: Option<PathBuf>,
133137

tasks/website_linter/src/snapshots/cli.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ search: false
2222
- **` --tsconfig`**=_`<./tsconfig.json>`_ &mdash;
2323
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.
2424

25-
NOTE: Type checking and Type aware rules will still use the tsconfig discovered automatically, and will not be affected by this option.
25+
::: 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. :::
2626
- **` --init`** &mdash;
2727
Initialize oxlint configuration with default values
2828

0 commit comments

Comments
 (0)