diff --git a/package.json b/package.json index 71d2fdf..7d7e43e 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,10 @@ { "name": "@magik_io/lint_golem", "description": "A really magik lint golem", - "version": "1.3.0", + "version": "1.4.0", "engines": { - "node": "v21.7.1", - "npm": "10.5.0" + "node": "v21.*.*", + "npm": "10.*.*" }, "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/src/index.ts b/src/index.ts index 2665066..3e90029 100644 --- a/src/index.ts +++ b/src/index.ts @@ -241,15 +241,12 @@ export class LintGolem { ); } - public static async init(config: LintGolemOptions, verbose = false) { + public static async init(config: Omit & { tsconfigPaths?: Array }, verbose = false) { const tsconfigPaths = await glob([ `tsconfig.json`, `*.tsconfig.json`, ...(config.tsconfigPaths ?? []), - ], { - cwd: config.rootDir, - ignore: config.ignoreGlobs - }); + ], { cwd: config.rootDir, ignore: config.ignoreGlobs }); if (tsconfigPaths.length === 0) throw new Error('No tsconfig.json found', { cause: 'Missing projectRoot / glob failure' }); if (verbose) console.info('Found tsconfigPaths:', tsconfigPaths.join(', \n')); return new LintGolem({ ...config, tsconfigPaths });