Skip to content

Commit 89f2a69

Browse files
committed
refactor(linter): TODO comment (#12146)
1 parent f99959c commit 89f2a69

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

crates/oxc_linter/src/config/config_builder.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -411,17 +411,18 @@ impl ConfigStoreBuilder {
411411
resolver: &Resolver,
412412
) -> Result<(), ConfigBuilderError> {
413413
use crate::PluginLoadResult;
414+
414415
let resolved = resolver.resolve(oxlintrc_dir_path, plugin_name).map_err(|e| {
415416
ConfigBuilderError::PluginLoadFailed {
416417
plugin_name: plugin_name.into(),
417418
error: e.to_string(),
418419
}
419420
})?;
421+
// TODO: We should support paths which are not valid UTF-8. How?
422+
let plugin_path = resolved.full_path().to_str().unwrap().to_string();
420423

421424
let result = tokio::task::block_in_place(move || {
422-
tokio::runtime::Handle::current().block_on((external_linter.load_plugin)(
423-
resolved.full_path().to_str().unwrap().to_string(),
424-
))
425+
tokio::runtime::Handle::current().block_on((external_linter.load_plugin)(plugin_path))
425426
})
426427
.map_err(|e| ConfigBuilderError::PluginLoadFailed {
427428
plugin_name: plugin_name.into(),

0 commit comments

Comments
 (0)