Skip to content

Commit

Permalink
fix(linter): fixes usages of lintProjectGenerator without eslintFileP…
Browse files Browse the repository at this point in the history
…atterns provided

Previous change broke usages of the lintProjectGenerator which did not include an eslintFilePatterns
array option. This resolves by first checking for the arrays existence before pushing to it

closed #18740
  • Loading branch information
jbean96 committed Aug 22, 2023
1 parent 2638bb0 commit 3a85833
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export async function lintProjectGenerator(
});
const projectConfig = readProjectConfiguration(tree, options.project);

const lintFilePatterns = options.eslintFilePatterns;
const lintFilePatterns = options.eslintFilePatterns ?? [];
if (isBuildableLibraryProject(projectConfig)) {
lintFilePatterns.push(`${projectConfig.root}/package.json`);
}
Expand Down

0 comments on commit 3a85833

Please sign in to comment.