ci(core): fix node-dev Build.ts linting (#4418)

* fix(core): fix linting node-dev Build.ts linting

* fix: use jsonParse helper for parsing of tsconfig

* 🏷️ Change output type for jsonParse
This commit is contained in:
OlegIvaniv 2022-10-24 11:21:27 +02:00 committed by GitHub
parent 1a37f0003f
commit cdec0f1d88
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6,6 +6,7 @@ import { copyFile, mkdir, readFile, writeFile } from 'fs/promises';
import { join, dirname, resolve as resolvePath } from 'path';
import { file as tmpFile } from 'tmp-promise';
import { jsonParse } from 'n8n-workflow';
import { UserSettings } from 'n8n-core';
import { IBuildOptions } from '.';
@ -22,7 +23,7 @@ export async function createCustomTsconfig() {
// Read the tsconfig file
const tsConfigString = await readFile(tsconfigPath, { encoding: 'utf8' });
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const tsConfig = JSON.parse(tsConfigString);
const tsConfig = jsonParse<{ include: string[] }>(tsConfigString);
// Set absolute include paths
const newIncludeFiles = [];