diff --git a/apps/oxlint/src/command/lint.rs b/apps/oxlint/src/command/lint.rs index 40a4b7a90d1d2..c82612955e24d 100644 --- a/apps/oxlint/src/command/lint.rs +++ b/apps/oxlint/src/command/lint.rs @@ -123,8 +123,11 @@ pub struct BasicOptions { #[bpaf(long, short, argument("./.oxlintrc.json"))] pub config: Option, - /// TypeScript `tsconfig.json` path for reading path alias and project references for import plugin. - /// If not provided, will look for `tsconfig.json` in the current working directory. + /// 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. #[bpaf(argument("./tsconfig.json"), hide_usage)] pub tsconfig: Option, @@ -291,8 +294,6 @@ pub struct EnablePlugins { pub typescript_plugin: OverrideToggle, /// Enable import plugin and detect ESM problems. - /// It should be used with the `--tsconfig` flag if your project has a - /// tsconfig with a name other than `tsconfig.json`. #[bpaf(flag(OverrideToggle::Enable, OverrideToggle::NotSet), hide_usage)] pub import_plugin: OverrideToggle, diff --git a/tasks/website_linter/src/snapshots/cli.snap b/tasks/website_linter/src/snapshots/cli.snap index 1847c368a3615..21ca2dc97c293 100644 --- a/tasks/website_linter/src/snapshots/cli.snap +++ b/tasks/website_linter/src/snapshots/cli.snap @@ -20,7 +20,9 @@ search: false If not provided, Oxlint will look for a `.oxlintrc.json`, `.oxlintrc.jsonc`, or `oxlint.config.ts` file in the current working directory. - **` --tsconfig`**=_`<./tsconfig.json>`_ — - TypeScript `tsconfig.json` path for reading path alias and project references for import plugin. If not provided, will look for `tsconfig.json` in the current working directory. + 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. - **` --init`** — Initialize oxlint configuration with default values @@ -60,7 +62,7 @@ Arguments: - **` --disable-typescript-plugin`** — Disable TypeScript plugin, which is turned on by default - **` --import-plugin`** — - Enable import plugin and detect ESM problems. It should be used with the `--tsconfig` flag if your project has a tsconfig with a name other than `tsconfig.json`. + Enable import plugin and detect ESM problems. - **` --react-plugin`** — Enable react plugin, which is turned off by default - **` --jsdoc-plugin`** — diff --git a/tasks/website_linter/src/snapshots/cli_terminal.snap b/tasks/website_linter/src/snapshots/cli_terminal.snap index 1e20f72daf306..c298c099dad07 100644 --- a/tasks/website_linter/src/snapshots/cli_terminal.snap +++ b/tasks/website_linter/src/snapshots/cli_terminal.snap @@ -11,9 +11,10 @@ Basic Configuration running via Node.js * you can use comments in configuration files. * tries to be compatible with ESLint v8's format - --tsconfig=<./tsconfig.json> TypeScript `tsconfig.json` path for reading path alias and - project references for import plugin. If not provided, will look for - `tsconfig.json` in the current working directory. + --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. --init Initialize oxlint configuration with default values Allowing / Denying Multiple Lints @@ -37,9 +38,7 @@ Enable/Disable Plugins --disable-unicorn-plugin Disable unicorn plugin, which is turned on by default --disable-oxc-plugin Disable oxc unique rules, which is turned on by default --disable-typescript-plugin Disable TypeScript plugin, which is turned on by default - --import-plugin Enable import plugin and detect ESM problems. It should be used with - the `--tsconfig` flag if your project has a tsconfig with a name other - than `tsconfig.json`. + --import-plugin Enable import plugin and detect ESM problems. --react-plugin Enable react plugin, which is turned off by default --jsdoc-plugin Enable jsdoc plugin and detect JSDoc problems --jest-plugin Enable the Jest plugin and detect test problems