Skip to content

Commit

Permalink
fix(react): add e2e for root project should not add eslintrc.base
Browse files Browse the repository at this point in the history
  • Loading branch information
xiongemi committed Oct 25, 2023
1 parent 3e0f5c4 commit 91bcfc8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/angular/src/generators/application/lib/add-e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export async function addE2e(tree: Tree, options: NormalizedSchema) {
skipPackageJson: options.skipPackageJson,
skipFormat: true,
devServerTarget: `${options.name}:serve:development`,
rootProject: options.rootProject,
});
} else if (options.e2eTestRunner === 'playwright') {
const { configurationGenerator: playwrightConfigurationGenerator } =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export interface CypressE2EConfigSchema {
linter?: Linter;
port?: number | 'cypress-auto';
jsx?: boolean;
rootProject?: boolean;
}

type NormalizedSchema = ReturnType<typeof normalizeOptions>;
Expand Down Expand Up @@ -91,7 +92,7 @@ In this case you need to provide a devServerTarget,'<projectName>:<targetName>[:
return {
...options,
bundler: options.bundler ?? 'webpack',
rootProject: projectConfig.root === '.',
rootProject: options.rootProject ?? projectConfig.root === '.',
linter: options.linter ?? Linter.EsLint,
devServerTarget:
options.devServerTarget ??
Expand Down
1 change: 1 addition & 0 deletions packages/react/src/generators/application/lib/add-e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export async function addE2e(
skipFormat: true,
devServerTarget: `${options.projectName}:serve`,
jsx: true,
rootProject: options.rootProject,
});
}
case 'playwright': {
Expand Down

0 comments on commit 91bcfc8

Please sign in to comment.