diff options
author | Pig Fang <g-plane@hotmail.com> | 2024-08-28 21:48:14 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-28 09:48:14 -0400 |
commit | f6c537f898da8d149e024a97347c43fa2e249331 (patch) | |
tree | 46a5ed189a8affb594eefdb0f2f3d100ed0994c2 /cli/tools/fmt.rs | |
parent | 3394c4df751229b6ce2349e84dccdee26faecb67 (diff) |
fix(fmt): fix incorrect quotes in components (#25249)
Unlike in dprint, `single_quote` option is shared between all
formatters, so we shouldn't change this option when formatting
attributes in components. This PR fixes this.
This problem doesn't affect formatting HTML.
Diffstat (limited to 'cli/tools/fmt.rs')
-rw-r--r-- | cli/tools/fmt.rs | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/cli/tools/fmt.rs b/cli/tools/fmt.rs index 2d06aafca..97f3b3215 100644 --- a/cli/tools/fmt.rs +++ b/cli/tools/fmt.rs @@ -403,15 +403,6 @@ pub fn format_html( let mut typescript_config = get_resolved_typescript_config(fmt_options); typescript_config.line_width = hints.print_width as u32; - if hints.attr { - typescript_config.quote_style = if let Some(true) = - fmt_options.single_quote - { - dprint_plugin_typescript::configuration::QuoteStyle::AlwaysDouble - } else { - dprint_plugin_typescript::configuration::QuoteStyle::AlwaysSingle - }; - } dprint_plugin_typescript::format_text( &path, text.to_string(), |