Skip to content

Commit

Permalink
fix(linter): adjust terminal run check for crystal (#21638)
Browse files Browse the repository at this point in the history
(cherry picked from commit f79aabb)
  • Loading branch information
meeroslav authored and FrozenPandaz committed Feb 7, 2024
1 parent 3d2ffc9 commit c638f6b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions e2e/eslint/src/linter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'];
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/src/utils/runtime-lint-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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$/;

Expand Down

0 comments on commit c638f6b

Please sign in to comment.