fix(nx-plugin): support root tsconfig.json in nx-plugin-checks eslint rule

This commit is contained in:
Leosvel Pérez Espinosa 2024-03-08 12:31:54 +01:00 committed by Miroslav Jonaš
parent e19f33bb27
commit 4850bdb6aa

View File

@ -11,9 +11,9 @@ import { findProject, getSourceFilePath } from '../utils/runtime-lint-utils';
import { existsSync } from 'fs';
import { registerTsProject } from '@nx/js/src/internal';
import * as path from 'path';
import { join } from 'path';
import { readProjectGraph } from '../utils/project-graph-utils';
import { valid } from 'semver';
import { getRootTsConfigPath } from '@nx/js';
type Options = [
{
@ -147,7 +147,7 @@ export default ESLintUtils.RuleCreator(() => ``)<Options, MessageIds>({
}
if (!(global as any).tsProjectRegistered) {
registerTsProject(join(workspaceRoot, 'tsconfig.base.json'));
registerTsProject(getRootTsConfigPath());
(global as any).tsProjectRegistered = true;
}