From a799225471af0e4d3364b930926641516761aa3a Mon Sep 17 00:00:00 2001 From: overlookmotel <557937+overlookmotel@users.noreply.github.com> Date: Mon, 10 Jun 2024 12:59:41 +0000 Subject: [PATCH] refactor(transformer): flatten file structure for React transform (#3604) Purely moving files around to flatten folder structure. No substantive changes to the content of the files themselves. --- 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 46a02711acefd..3938f891940a8 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 4df990f1ac4fa..0beacfc67fdce 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;