Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions crates/oxc_formatter/src/utils/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
pub mod array;
pub mod assignment_like;
pub mod call_expression;
pub mod conditional;
Expand All @@ -6,6 +7,7 @@ pub mod format_node_without_trailing_comments;
pub mod jsx;
pub mod member_chain;
pub mod object;
pub mod statement_body;
pub mod string_utils;
pub mod suppressed;
pub mod typecast;
Expand Down
3 changes: 1 addition & 2 deletions crates/oxc_formatter/src/write/array_element_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@ use crate::{
Buffer, Comments, Format, FormatResult, Formatter, GroupId, prelude::*,
separated::FormatSeparatedIter,
},
utils::array::write_array_node,
write,
};

use super::utils::array::write_array_node;

pub struct ArrayElementList<'a, 'b> {
elements: &'b AstNode<'a, Vec<'a, ArrayExpressionElement<'a>>>,
group_id: Option<GroupId>,
Expand Down
6 changes: 4 additions & 2 deletions crates/oxc_formatter/src/write/array_pattern.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ use crate::{
Format, FormatResult,
ast_nodes::{AstNode, AstNodes},
formatter::{Formatter, prelude::*, trivia::format_dangling_comments},
utils::format_node_without_trailing_comments::FormatNodeWithoutTrailingComments,
utils::{
array::write_array_node,
format_node_without_trailing_comments::FormatNodeWithoutTrailingComments,
},
write,
write::utils::array::write_array_node,
};

use super::FormatWrite;
Expand Down
7 changes: 2 additions & 5 deletions crates/oxc_formatter/src/write/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ mod try_statement;
mod tuple_type;
mod type_parameters;
mod union_type;
mod utils;
mod variable_declaration;

pub use arrow_function_expression::{
Expand Down Expand Up @@ -64,13 +63,15 @@ use crate::{
options::{FormatTrailingCommas, QuoteProperties, Semicolons, TrailingSeparator},
parentheses::NeedsParentheses,
utils::{
array::write_array_node,
assignment_like::AssignmentLike,
call_expression::{contains_a_test_pattern, is_test_call_expression, is_test_each_pattern},
conditional::ConditionalLike,
expression::ExpressionLeftSide,
format_node_without_trailing_comments::FormatNodeWithoutTrailingComments,
member_chain::MemberChain,
object::format_property_key,
statement_body::FormatStatementBody,
string_utils::{FormatLiteralStringToken, StringLiteralParentKind},
suppressed::FormatSuppressedNode,
},
Expand All @@ -89,10 +90,6 @@ use self::{
return_or_throw_statement::FormatAdjacentArgument,
semicolon::OptionalSemicolon,
type_parameters::{FormatTSTypeParameters, FormatTSTypeParametersOptions},
utils::{
array::{TrailingSeparatorMode, write_array_node},
statement_body::FormatStatementBody,
},
};

pub trait FormatWrite<'ast, T = ()> {
Expand Down
3 changes: 2 additions & 1 deletion crates/oxc_formatter/src/write/switch_statement.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ use crate::{
prelude::*,
trivia::{DanglingIndentMode, FormatDanglingComments, FormatTrailingComments},
},
utils::statement_body::FormatStatementBody,
write,
write::{semicolon::OptionalSemicolon, utils::statement_body::FormatStatementBody},
write::semicolon::OptionalSemicolon,
};

use super::FormatWrite;
Expand Down
2 changes: 0 additions & 2 deletions crates/oxc_formatter/src/write/utils/mod.rs

This file was deleted.

Loading