chore(linter): allow cache override for manual jest runs (#12879)

This commit is contained in:
Miroslav Jonaš 2022-10-28 17:10:43 +02:00 committed by GitHub
parent 4a5783ac6e
commit 7e47fdcfa1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -376,11 +376,13 @@ export function mapProjectGraphFiles<T>(
}
const ESLINT_REGEX = /node_modules.*[\/\\]eslint$/;
const JEST_REGEX = /node_modules\/.bin\/jest$/; // when we run unit tests in jest
const NRWL_CLI_REGEX = /nx[\/\\]bin[\/\\]run-executor\.js$/;
export function isTerminalRun(): boolean {
return (
process.argv.length > 1 &&
(!!process.argv[1].match(NRWL_CLI_REGEX) ||
!!process.argv[1].match(JEST_REGEX) ||
!!process.argv[1].match(ESLINT_REGEX))
);
}