From 450791ddc2a5a9b4f477d9fb52da65776db1b145 Mon Sep 17 00:00:00 2001 From: Boshen Date: Sat, 6 Jan 2024 23:56:31 +0800 Subject: [PATCH] refactor(linter): rename *_partial_loader files (#1916) --- crates/oxc_language_server/src/linter.rs | 5 +---- .../partial_loader/{astro_partial_loader.rs => astro.rs} | 0 crates/oxc_linter/src/partial_loader/mod.rs | 6 +++--- .../src/partial_loader/{vue_partial_loader.rs => vue.rs} | 0 4 files changed, 4 insertions(+), 7 deletions(-) rename crates/oxc_linter/src/partial_loader/{astro_partial_loader.rs => astro.rs} (100%) rename crates/oxc_linter/src/partial_loader/{vue_partial_loader.rs => vue.rs} (100%) diff --git a/crates/oxc_language_server/src/linter.rs b/crates/oxc_language_server/src/linter.rs index 39d06ca38..59298f9cc 100644 --- a/crates/oxc_language_server/src/linter.rs +++ b/crates/oxc_language_server/src/linter.rs @@ -15,10 +15,7 @@ use miette::NamedSource; use oxc_allocator::Allocator; use oxc_diagnostics::{miette, Error, Severity}; use oxc_linter::{ - partial_loader::{ - vue_partial_loader::VuePartialLoader, JavaScriptSource, PartialLoader, - LINT_PARTIAL_LOADER_EXT, - }, + partial_loader::{JavaScriptSource, PartialLoader, LINT_PARTIAL_LOADER_EXT}, LintContext, LintSettings, Linter, }; use oxc_linter_plugin::{make_relative_path_parts, LinterPlugin}; diff --git a/crates/oxc_linter/src/partial_loader/astro_partial_loader.rs b/crates/oxc_linter/src/partial_loader/astro.rs similarity index 100% rename from crates/oxc_linter/src/partial_loader/astro_partial_loader.rs rename to crates/oxc_linter/src/partial_loader/astro.rs diff --git a/crates/oxc_linter/src/partial_loader/mod.rs b/crates/oxc_linter/src/partial_loader/mod.rs index 2c705cbc8..ff57579df 100644 --- a/crates/oxc_linter/src/partial_loader/mod.rs +++ b/crates/oxc_linter/src/partial_loader/mod.rs @@ -1,9 +1,9 @@ -pub mod astro_partial_loader; -pub mod vue_partial_loader; +mod astro; +mod vue; use oxc_span::SourceType; -use self::{astro_partial_loader::AstroPartialLoader, vue_partial_loader::VuePartialLoader}; +pub use self::{astro::AstroPartialLoader, vue::VuePartialLoader}; pub const LINT_PARTIAL_LOADER_EXT: &[&str] = &["vue", "astro"]; diff --git a/crates/oxc_linter/src/partial_loader/vue_partial_loader.rs b/crates/oxc_linter/src/partial_loader/vue.rs similarity index 100% rename from crates/oxc_linter/src/partial_loader/vue_partial_loader.rs rename to crates/oxc_linter/src/partial_loader/vue.rs