Skip to content

Commit 7da337e

Browse files
leosvelperezFrozenPandaz
authored andcommitted
fix(testing): check for project eslint config file in cypress and pla… (#23401)
…ywright configuration generators <!-- Please make sure you have read the submission guidelines before posting an PR --> <!-- https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr --> <!-- Please make sure that your commit message follows our format --> <!-- Example: `fix(nx): must begin with lowercase` --> ## Current Behavior <!-- This is the behavior we have today --> ## Expected Behavior <!-- This is the behavior we should expect with the changes in this PR --> ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes #21301 (cherry picked from commit 9af7386)
1 parent d281489 commit 7da337e

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

packages/cypress/src/utils/add-linter.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,10 @@ export async function addLinterToCyProject(
8585
: () => {}
8686
);
8787

88-
if (isEslintConfigSupported(tree)) {
88+
if (
89+
isEslintConfigSupported(tree, projectConfig.root) ||
90+
isEslintConfigSupported(tree)
91+
) {
8992
const overrides = [];
9093
if (options.rootProject) {
9194
addPluginsToLintConfig(tree, projectConfig.root, '@nx');

packages/playwright/src/utils/add-linter.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,10 @@ export async function addLinterToPlaywrightProject(
7272
: () => {}
7373
);
7474

75-
if (isEslintConfigSupported(tree)) {
75+
if (
76+
isEslintConfigSupported(tree, projectConfig.root) ||
77+
isEslintConfigSupported(tree)
78+
) {
7679
addExtendsToLintConfig(
7780
tree,
7881
projectConfig.root,

0 commit comments

Comments
 (0)