Skip to content

Commit 0179c86

Browse files
committed
refactor(napi/oxlint): reverse args of ExternalLinter::new (#12566)
Pure refactor. Reverse order of arguments to `ExternalLinter::new`, to match order of fields in `ExternalLinter` struct.
1 parent add164c commit 0179c86

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

crates/oxc_linter/src/external_linter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ pub struct ExternalLinter {
6161
}
6262

6363
impl ExternalLinter {
64-
pub fn new(run: ExternalLinterCb, load_plugin: ExternalLinterLoadPluginCb) -> Self {
64+
pub fn new(load_plugin: ExternalLinterLoadPluginCb, run: ExternalLinterCb) -> Self {
6565
Self { load_plugin, run }
6666
}
6767
}

napi/oxlint2/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,5 +161,5 @@ pub async fn lint(load_plugin: JsLoadPluginCb, run: JsRunCb) -> bool {
161161
let rust_load_plugin = wrap_load_plugin(load_plugin);
162162
let rust_run = wrap_run(run);
163163

164-
oxlint_lint(Some(ExternalLinter::new(rust_run, rust_load_plugin))).report() == ExitCode::SUCCESS
164+
oxlint_lint(Some(ExternalLinter::new(rust_load_plugin, rust_run))).report() == ExitCode::SUCCESS
165165
}

0 commit comments

Comments
 (0)