biome_js_formatter 0.0.1

Biome's JavaScript formatter
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::prelude::*;

use biome_formatter::FormatResult;
use biome_js_syntax::JsxText;

#[derive(Debug, Clone, Default)]
pub struct FormatJsxText;

impl FormatNodeRule<JsxText> for FormatJsxText {
    fn fmt_fields(&self, node: &JsxText, f: &mut JsFormatter) -> FormatResult<()> {
        // Formatting a [JsxText] on its own isn't supported. Format as verbatim. A text should always be formatted
        // through its [JsxChildList]
        format_verbatim_node(node.syntax()).fmt(f)
    }
}