From d6b2f8e04e1e7013fffc4139cceac39f2f031f00 Mon Sep 17 00:00:00 2001 From: Noel Date: Thu, 16 Mar 2023 14:49:04 -0700 Subject: [PATCH] feat: add `prettier-ignore` & `eslint-ignore` in generated output --- src/codegen.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/codegen.rs b/src/codegen.rs index 135e539..f0cb596 100644 --- a/src/codegen.rs +++ b/src/codegen.rs @@ -100,7 +100,7 @@ pub fn generate_ts(parsed: &ParsedMessages) -> String { let code = output.code; const UTILITY_TYPES: &'static str = include_str!("../utilityTypes.ts"); - format!("{code}\n{UTILITY_TYPES}").trim().to_string() + format!("/* prettier-ignore */\n// eslint-ignore\n{code}\n{UTILITY_TYPES}").trim().to_string() } fn build_message_member(msg: &ParsedMessage) -> TsTypeElement {