Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions apps/oxlint/src/command/lint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,11 @@ pub struct BasicOptions {
#[bpaf(long, short, argument("./.oxlintrc.json"))]
pub config: Option<PathBuf>,

/// 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<PathBuf>,

Expand Down Expand Up @@ -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,

Expand Down
6 changes: 4 additions & 2 deletions tasks/website_linter/src/snapshots/cli.snap
Original file line number Diff line number Diff line change
Expand Up @@ -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>`_ &mdash;
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`** &mdash;
Initialize oxlint configuration with default values

Expand Down Expand Up @@ -60,7 +62,7 @@ Arguments:
- **` --disable-typescript-plugin`** &mdash;
Disable TypeScript plugin, which is turned on by default
- **` --import-plugin`** &mdash;
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`** &mdash;
Enable react plugin, which is turned off by default
- **` --jsdoc-plugin`** &mdash;
Expand Down
11 changes: 5 additions & 6 deletions tasks/website_linter/src/snapshots/cli_terminal.snap
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
Loading