From b2ace047b02f31e5c05614ef64f96c0dc8098f3d Mon Sep 17 00:00:00 2001 From: overlookmotel Date: Mon, 10 Jun 2024 12:26:23 +0100 Subject: [PATCH] refactor(transformer): flatten file structure for React transform --- crates/oxc_transformer/src/react/{jsx => }/diagnostics.rs | 0 .../src/react/{display_name/mod.rs => display_name.rs} | 0 crates/oxc_transformer/src/react/{jsx/mod.rs => jsx.rs} | 3 +-- .../oxc_transformer/src/react/{jsx_self/mod.rs => jsx_self.rs} | 0 .../src/react/{jsx_source/mod.rs => jsx_source.rs} | 0 crates/oxc_transformer/src/react/mod.rs | 1 + 6 files changed, 2 insertions(+), 2 deletions(-) rename crates/oxc_transformer/src/react/{jsx => }/diagnostics.rs (100%) rename crates/oxc_transformer/src/react/{display_name/mod.rs => display_name.rs} (100%) rename crates/oxc_transformer/src/react/{jsx/mod.rs => jsx.rs} (99%) rename crates/oxc_transformer/src/react/{jsx_self/mod.rs => jsx_self.rs} (100%) rename crates/oxc_transformer/src/react/{jsx_source/mod.rs => jsx_source.rs} (100%) diff --git a/crates/oxc_transformer/src/react/jsx/diagnostics.rs b/crates/oxc_transformer/src/react/diagnostics.rs similarity index 100% rename from crates/oxc_transformer/src/react/jsx/diagnostics.rs rename to crates/oxc_transformer/src/react/diagnostics.rs diff --git a/crates/oxc_transformer/src/react/display_name/mod.rs b/crates/oxc_transformer/src/react/display_name.rs similarity index 100% rename from crates/oxc_transformer/src/react/display_name/mod.rs rename to crates/oxc_transformer/src/react/display_name.rs diff --git a/crates/oxc_transformer/src/react/jsx/mod.rs b/crates/oxc_transformer/src/react/jsx.rs similarity index 99% rename from crates/oxc_transformer/src/react/jsx/mod.rs rename to crates/oxc_transformer/src/react/jsx.rs index 46a02711acefd6..3938f891940a80 100644 --- a/crates/oxc_transformer/src/react/jsx/mod.rs +++ b/crates/oxc_transformer/src/react/jsx.rs @@ -1,5 +1,3 @@ -mod diagnostics; - use std::{cell::Cell, rc::Rc}; use oxc_allocator::Vec; @@ -18,6 +16,7 @@ use crate::{ helpers::module_imports::NamedImport, }; +use super::diagnostics; use super::utils::get_line_column; pub use super::{ jsx_self::ReactJsxSelf, diff --git a/crates/oxc_transformer/src/react/jsx_self/mod.rs b/crates/oxc_transformer/src/react/jsx_self.rs similarity index 100% rename from crates/oxc_transformer/src/react/jsx_self/mod.rs rename to crates/oxc_transformer/src/react/jsx_self.rs diff --git a/crates/oxc_transformer/src/react/jsx_source/mod.rs b/crates/oxc_transformer/src/react/jsx_source.rs similarity index 100% rename from crates/oxc_transformer/src/react/jsx_source/mod.rs rename to crates/oxc_transformer/src/react/jsx_source.rs diff --git a/crates/oxc_transformer/src/react/mod.rs b/crates/oxc_transformer/src/react/mod.rs index 4df990f1ac4fa2..0beacfc67fdce9 100644 --- a/crates/oxc_transformer/src/react/mod.rs +++ b/crates/oxc_transformer/src/react/mod.rs @@ -1,3 +1,4 @@ +mod diagnostics; mod display_name; mod jsx; mod jsx_self;