From dc49c98c3cdb43ddc2a8ea49bbff005624d16cfb Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 29 Aug 2022 16:00:08 -0500 Subject: [PATCH] fix(config): Ignore thead for jsx/tsx Fixes #545 --- src/config.rs | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/config.rs b/src/config.rs index 6a41b9e..0dc3ff2 100644 --- a/src/config.rs +++ b/src/config.rs @@ -193,6 +193,34 @@ impl TypeEngineConfig { ..Default::default() }, }); + patterns + .entry("js".into()) + .or_insert_with(|| GlobEngineConfig { + extend_glob: Vec::new(), + engine: EngineConfig { + dict: Some(DictConfig { + extend_identifiers: maplit::hashmap! { + "thead".into() => "thead".into(), + }, + ..Default::default() + }), + ..Default::default() + }, + }); + patterns + .entry("ts".into()) + .or_insert_with(|| GlobEngineConfig { + extend_glob: Vec::new(), + engine: EngineConfig { + dict: Some(DictConfig { + extend_identifiers: maplit::hashmap! { + "thead".into() => "thead".into(), + }, + ..Default::default() + }), + ..Default::default() + }, + }); patterns .entry("html".into()) .or_insert_with(|| GlobEngineConfig {