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 21, 2023
1 parent 2638bb0 commit 1bce1cd
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export async function lintProjectGenerator(
const projectConfig = readProjectConfiguration(tree, options.project);

const lintFilePatterns = options.eslintFilePatterns;
if (isBuildableLibraryProject(projectConfig)) {
if (lintFilePatterns && isBuildableLibraryProject(projectConfig)) {
lintFilePatterns.push(`${projectConfig.root}/package.json`);
}

Expand Down

0 comments on commit 1bce1cd

Please sign in to comment.