diff --git a/packages/linter/src/generators/lint-project/lint-project.ts b/packages/linter/src/generators/lint-project/lint-project.ts index a7fc9abdf4cea4..c927b8d246bd77 100644 --- a/packages/linter/src/generators/lint-project/lint-project.ts +++ b/packages/linter/src/generators/lint-project/lint-project.ts @@ -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`); }