fix(nx-plugin): support root tsconfig.json in nx-plugin-checks eslint rule
This commit is contained in:
parent
e19f33bb27
commit
4850bdb6aa
@ -11,9 +11,9 @@ import { findProject, getSourceFilePath } from '../utils/runtime-lint-utils';
|
|||||||
import { existsSync } from 'fs';
|
import { existsSync } from 'fs';
|
||||||
import { registerTsProject } from '@nx/js/src/internal';
|
import { registerTsProject } from '@nx/js/src/internal';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import { join } from 'path';
|
|
||||||
import { readProjectGraph } from '../utils/project-graph-utils';
|
import { readProjectGraph } from '../utils/project-graph-utils';
|
||||||
import { valid } from 'semver';
|
import { valid } from 'semver';
|
||||||
|
import { getRootTsConfigPath } from '@nx/js';
|
||||||
|
|
||||||
type Options = [
|
type Options = [
|
||||||
{
|
{
|
||||||
@ -147,7 +147,7 @@ export default ESLintUtils.RuleCreator(() => ``)<Options, MessageIds>({
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!(global as any).tsProjectRegistered) {
|
if (!(global as any).tsProjectRegistered) {
|
||||||
registerTsProject(join(workspaceRoot, 'tsconfig.base.json'));
|
registerTsProject(getRootTsConfigPath());
|
||||||
(global as any).tsProjectRegistered = true;
|
(global as any).tsProjectRegistered = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user