Skip to content

Commit 2712b32

Browse files
committed
refactor(linter/plugins): rename --experimental-js-plugins to --js-plugins
1 parent f51240e commit 2712b32

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

apps/oxlint/src/command/lint.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ pub struct LintCommand {
5050
#[bpaf(switch, hide_usage)]
5151
pub type_aware: bool,
5252

53-
/// Enables JS plugins.
53+
/// Enables JS plugins (experimental).
5454
#[bpaf(switch, hide)]
55-
pub experimental_js_plugins: bool,
55+
pub js_plugins: bool,
5656

5757
#[bpaf(external)]
5858
pub inline_config_options: InlineConfigOptions,

apps/oxlint/src/run.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ fn lint_impl(load_plugin: JsLoadPluginCb, lint_file: JsLintFileCb) -> CliRunResu
8989

9090
command.handle_threads();
9191

92-
let external_linter = if command.experimental_js_plugins {
92+
let external_linter = if command.js_plugins {
9393
// JS plugins are only supported on 64-bit little-endian platforms at present
9494
#[cfg(all(target_pointer_width = "64", target_endian = "little"))]
9595
{

apps/oxlint/test/__snapshots__/e2e.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ exports[`oxlint CLI > should report an error if a a rule is not found within a c
496496
exports[`oxlint CLI > should report an error if a custom plugin in config but JS plugins are not enabled 1`] = `
497497
"Failed to parse configuration file.
498498
499-
x \`plugins\` config contains './test_plugin'. JS plugins are not supported without \`--experimental-js-plugins\` CLI option
499+
x \`plugins\` config contains './test_plugin'. JS plugins are not supported without \`--js-plugins\` CLI option
500500
"
501501
`;
502502

apps/oxlint/test/e2e.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ async function runOxlintWithoutPlugins(cwd: string, args: string[] = []) {
1717
}
1818

1919
async function runOxlint(cwd: string, args: string[] = []) {
20-
return await runOxlintWithoutPlugins(cwd, ['--experimental-js-plugins', ...args]);
20+
return await runOxlintWithoutPlugins(cwd, ['--js-plugins', ...args]);
2121
}
2222

2323
function normalizeOutput(output: string): string {

crates/oxc_linter/src/config/config_builder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@ impl Display for ConfigBuilderError {
605605
ConfigBuilderError::NoExternalLinterConfigured { plugin_specifier } => {
606606
write!(
607607
f,
608-
"`plugins` config contains '{plugin_specifier}'. JS plugins are not supported without `--experimental-js-plugins` CLI option",
608+
"`plugins` config contains '{plugin_specifier}'. JS plugins are not supported without `--js-plugins` CLI option",
609609
)?;
610610
Ok(())
611611
}

npm/oxlint/bin/oxlint

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// Even if runtime supports require(ESM), can't use `require` here, because `dist/cli.js`
55
// uses top-level `await`.
66
//
7-
// `dist/cli.js` uses require(ESM) internally, but only on path where `--experimental-js-plugins`
7+
// `dist/cli.js` uses require(ESM) internally, but only on path where `--js-plugins`
88
// CLI option is used. So we still support runtimes without require(ESM) for users who aren't
99
// using experimental options.
1010
import("../dist/cli.js").catch(onError);

0 commit comments

Comments
 (0)