Skip to content

Commit

Permalink
ci(core): fix node-dev Build.ts linting (#4418)
Browse files Browse the repository at this point in the history
* fix(core): fix linting node-dev Build.ts linting

* fix: use jsonParse helper for parsing of tsconfig

* 🏷️ Change output type for jsonParse
  • Loading branch information
OlegIvaniv authored Oct 24, 2022
1 parent 1a37f00 commit cdec0f1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/node-dev/src/Build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 '.';

Expand All @@ -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 = [];
Expand Down

0 comments on commit cdec0f1

Please sign in to comment.