From 379dd5ffdb29ad3f9280b0801e1ab3a135fb5fd5 Mon Sep 17 00:00:00 2001 From: Steven Prybylynskyi Date: Mon, 14 Oct 2024 22:06:22 +0200 Subject: [PATCH] refactor: update getTSConfigCompilerOptions to exclude 'allowJs' from returned compiler options (fixes issue in mfd-core) --- biome.jsonc | 3 ++- src/compileTypes/helpers/getTSConfigCompilerOptions.ts | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/biome.jsonc b/biome.jsonc index ed53544..cacca48 100644 --- a/biome.jsonc +++ b/biome.jsonc @@ -6,7 +6,8 @@ }, "formatter": { "indentStyle": "space", - "lineWidth": 100 + "lineWidth": 100, + "ignore": ["**/*.json"] }, "javascript": { "formatter": { diff --git a/src/compileTypes/helpers/getTSConfigCompilerOptions.ts b/src/compileTypes/helpers/getTSConfigCompilerOptions.ts index 3bad96b..1ebbd91 100644 --- a/src/compileTypes/helpers/getTSConfigCompilerOptions.ts +++ b/src/compileTypes/helpers/getTSConfigCompilerOptions.ts @@ -32,5 +32,7 @@ export function getTSConfigCompilerOptions( return parsedConfig.options; } - return require(tsconfigPath).compilerOptions; + const { allowJs, ...compilerOptions } = require(tsconfigPath); + + return compilerOptions; }