mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 12:21:58 +00:00
chore(cli): move import_plugin into enable_plugins (#1158)
This commit is contained in:
parent
7c8342d6be
commit
c7598b22ff
2 changed files with 5 additions and 6 deletions
|
|
@ -66,6 +66,10 @@ pub struct MiscOptions {
|
|||
/// Enable Plugins
|
||||
#[derive(Debug, Clone, Bpaf)]
|
||||
pub struct EnablePlugins {
|
||||
/// Enable the experimental import plugin and detect ESM problems
|
||||
#[bpaf(switch, hide_usage)]
|
||||
pub import_plugin: bool,
|
||||
|
||||
/// Enable the Jest plugin and detect test problems
|
||||
#[bpaf(switch, hide_usage)]
|
||||
pub jest_plugin: bool,
|
||||
|
|
@ -80,10 +84,6 @@ pub struct LintOptions {
|
|||
#[bpaf(external(lint_filter), map(LintFilter::into_tuple), many)]
|
||||
pub filter: Vec<(AllowWarnDeny, String)>,
|
||||
|
||||
/// Use the experimental import plugin and detect ESM problems
|
||||
#[bpaf(switch, hide_usage)]
|
||||
pub import_plugin: bool,
|
||||
|
||||
#[bpaf(external)]
|
||||
pub enable_plugins: EnablePlugins,
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@ impl Runner for LintRunner {
|
|||
let CliLintOptions {
|
||||
paths,
|
||||
filter,
|
||||
import_plugin,
|
||||
warning_options,
|
||||
ignore_options,
|
||||
fix_options,
|
||||
|
|
@ -58,7 +57,7 @@ impl Runner for LintRunner {
|
|||
.with_filter(filter)
|
||||
.with_fix(fix_options.fix)
|
||||
.with_timing(misc_options.timing)
|
||||
.with_import_plugin(import_plugin)
|
||||
.with_import_plugin(enable_plugins.import_plugin)
|
||||
.with_jest_plugin(enable_plugins.jest_plugin)
|
||||
.with_jsx_a11y_plugin(enable_plugins.jsx_a11y_plugin);
|
||||
let lint_service = LintService::new(cwd, &paths, lint_options);
|
||||
|
|
|
|||
Loading…
Reference in a new issue