From cd9316f1d91e6593cf31a8dab3dea9d58102395f Mon Sep 17 00:00:00 2001 From: jonambas <jon@jonambas.com> Date: Wed, 10 Apr 2024 20:19:50 -0400 Subject: [PATCH] fix(codegen): add eslint-disable banner --- src/__tests__/codegen.test.ts | 3 ++- src/codegen.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/__tests__/codegen.test.ts b/src/__tests__/codegen.test.ts index 0f51436..8e07add 100644 --- a/src/__tests__/codegen.test.ts +++ b/src/__tests__/codegen.test.ts @@ -37,7 +37,8 @@ describe('codegen', () => { "file": "ct.mjs", }, { - "code": "type PluginCtMapType = { + "code": "/* eslint-disable */ + type PluginCtMapType = { 'foo.100': '#fff'; 'foo.200': {"base":"#000","lg":"#111"}; 'bar.100': 'red'; diff --git a/src/codegen.ts b/src/codegen.ts index e3c418a..c974e46 100644 --- a/src/codegen.ts +++ b/src/codegen.ts @@ -34,7 +34,7 @@ export const codegen = ( const ctDtsFile: ArtifactContent = { file: `ct.d.${dtsExt}`, - code: `type PluginCtMapType = {${serializeMapTypes(map)}}; + code: `/* eslint-disable */\ntype PluginCtMapType = {${serializeMapTypes(map)}}; export declare const ct: <T extends keyof PluginCtMapType>(alias: T) => PluginCtMapType[T];`, };