Skip to content

Commit f6424dd

Browse files
committed
fix(linter): reflect react plugin is disabled by default in cli (#11397)
1 parent 25ecbfe commit f6424dd

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

apps/oxlint/src/command/lint.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -203,14 +203,6 @@ pub struct OutputOptions {
203203
#[expect(clippy::struct_field_names)]
204204
#[derive(Debug, Default, Clone, Bpaf)]
205205
pub struct EnablePlugins {
206-
/// Disable react plugin, which is turned on by default
207-
#[bpaf(
208-
long("disable-react-plugin"),
209-
flag(OverrideToggle::Disable, OverrideToggle::NotSet),
210-
hide_usage
211-
)]
212-
pub react_plugin: OverrideToggle,
213-
214206
/// Disable unicorn plugin, which is turned on by default
215207
#[bpaf(
216208
long("disable-unicorn-plugin"),
@@ -240,6 +232,10 @@ pub struct EnablePlugins {
240232
#[bpaf(flag(OverrideToggle::Enable, OverrideToggle::NotSet), hide_usage)]
241233
pub import_plugin: OverrideToggle,
242234

235+
/// Enable react plugin, which is turned off by default
236+
#[bpaf(flag(OverrideToggle::Enable, OverrideToggle::NotSet), hide_usage)]
237+
pub react_plugin: OverrideToggle,
238+
243239
/// Enable the experimental jsdoc plugin and detect JSDoc problems
244240
#[bpaf(flag(OverrideToggle::Enable, OverrideToggle::NotSet), hide_usage)]
245241
pub jsdoc_plugin: OverrideToggle,

tasks/website/src/linter/snapshots/cli.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@ Arguments:
4545

4646

4747
## Enable Plugins
48-
- **` --disable-react-plugin`** —
49-
Disable react plugin, which is turned on by default
5048
- **` --disable-unicorn-plugin`** —
5149
Disable unicorn plugin, which is turned on by default
5250
- **` --disable-oxc-plugin`** —
@@ -55,6 +53,8 @@ Arguments:
5553
Disable TypeScript plugin, which is turned on by default
5654
- **` --import-plugin`** —
5755
Enable the experimental import plugin and detect ESM problems. It is recommended to use along side with the `--tsconfig` option.
56+
- **` --react-plugin`** —
57+
Enable react plugin, which is turned off by default
5858
- **` --jsdoc-plugin`** —
5959
Enable the experimental jsdoc plugin and detect JSDoc problems
6060
- **` --jest-plugin`** —

tasks/website/src/linter/snapshots/cli_terminal.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ Allowing / Denying Multiple Lints
2929
-D, --deny=NAME Deny the rule or category (emit an error)
3030

3131
Enable Plugins
32-
--disable-react-plugin Disable react plugin, which is turned on by default
3332
--disable-unicorn-plugin Disable unicorn plugin, which is turned on by default
3433
--disable-oxc-plugin Disable oxc unique rules, which is turned on by default
3534
--disable-typescript-plugin Disable TypeScript plugin, which is turned on by default
3635
--import-plugin Enable the experimental import plugin and detect ESM problems. It is
3736
recommended to use along side with the `--tsconfig` option.
37+
--react-plugin Enable react plugin, which is turned off by default
3838
--jsdoc-plugin Enable the experimental jsdoc plugin and detect JSDoc problems
3939
--jest-plugin Enable the Jest plugin and detect test problems
4040
--vitest-plugin Enable the Vitest plugin and detect test problems

0 commit comments

Comments
 (0)