diff --git a/e2e/eslint/src/linter.test.ts b/e2e/eslint/src/linter.test.ts index f94fe99ae9c9f..9d7d9405ee752 100644 --- a/e2e/eslint/src/linter.test.ts +++ b/e2e/eslint/src/linter.test.ts @@ -462,8 +462,7 @@ describe('Linter', () => { }); }); - // TODO(crystal, @meeroslav): Investigate why this is failing - xit('should report dependency check issues', () => { + it('should report dependency check issues', () => { const rootPackageJson = readJson('package.json'); const nxVersion = rootPackageJson.devDependencies.nx; const tslibVersion = rootPackageJson.dependencies['tslib']; @@ -476,7 +475,7 @@ describe('Linter', () => { `libs/${mylib}/src/lib/${mylib}.ts`, (content) => `import { names } from '@nx/devkit';\n\n` + - content.replace(/=> .*;/, `=> names(${mylib}).className;`) + content.replace(/=> .*;/, `=> names('${mylib}').className;`) ); // output should now report missing dependency diff --git a/packages/eslint-plugin/src/utils/runtime-lint-utils.ts b/packages/eslint-plugin/src/utils/runtime-lint-utils.ts index 49fe6536177e4..e991cd477a750 100644 --- a/packages/eslint-plugin/src/utils/runtime-lint-utils.ts +++ b/packages/eslint-plugin/src/utils/runtime-lint-utils.ts @@ -416,7 +416,7 @@ export function hasBuildExecutor( ); } -const ESLINT_REGEX = /node_modules.*[\/\\]eslint$/; +const ESLINT_REGEX = /node_modules.*[\/\\]eslint(?:\.js)?$/; const JEST_REGEX = /node_modules\/.bin\/jest$/; // when we run unit tests in jest const NRWL_CLI_REGEX = /nx[\/\\]bin[\/\\]run-executor\.js$/;