Skip to content

Commit

Permalink
chore: add more cases
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinhagemeister committed Feb 21, 2025
1 parent 72746b6 commit 4f0e71e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/rules/jsx_curly_braces.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pub struct JSXCurlyBraces;

const CODE: &str = "jsx-curly-braces";

const IGNORE_CHARS: Lazy<Regex> = Lazy::new(|| Regex::new(r"[{}>]").unwrap());
const IGNORE_CHARS: Lazy<Regex> = Lazy::new(|| Regex::new(r"[{}<>]").unwrap());

impl LintRule for JSXCurlyBraces {
fn tags(&self) -> Tags {
Expand Down Expand Up @@ -183,9 +183,14 @@ mod tests {
foo{" "}
<span />
</div>"#,
r#"<div>foo{"<"}</div>"#,
r#"<div>foo{">"}</div>"#,
r#"<div>foo{"}"}</div>"#,
r#"<div>foo{"{"}</div>"#,
r#"<div>foo{"foo <"}</div>"#,
r#"<div>foo{"foo >"}</div>"#,
r#"<div>foo{"foo }"}</div>"#,
r#"<div>foo{"foo {"}</div>"#,
};
}

Expand Down

0 comments on commit 4f0e71e

Please sign in to comment.