Skip to content
This repository was archived by the owner on Jan 11, 2024. It is now read-only.

Commit 00b397f

Browse files
Teamophansl
authored andcommitted
fix(@schematics/angular): fix invalid configuration in lint
(cherry picked from commit e9f3d4026f3ef2a63179fa69197d901badcda39d)
1 parent b525536 commit 00b397f

File tree

1 file changed

+13
-1
lines changed
  • packages/schematics/angular/migrations/update-6

1 file changed

+13
-1
lines changed

packages/schematics/angular/migrations/update-6/index.ts

+13-1
Original file line numberDiff line numberDiff line change
@@ -478,9 +478,15 @@ function extractProjectsConfig(
478478

479479
const tsConfigs: string[] = [];
480480
const excludes: string[] = [];
481+
let warnForLint = false;
481482
if (config && config.lint && Array.isArray(config.lint)) {
482483
config.lint.forEach(lint => {
483-
tsConfigs.push(lint.project);
484+
if (lint.project) {
485+
tsConfigs.push(lint.project);
486+
} else {
487+
warnForLint = true;
488+
}
489+
484490
if (lint.exclude) {
485491
if (typeof lint.exclude === 'string') {
486492
excludes.push(lint.exclude);
@@ -491,6 +497,12 @@ function extractProjectsConfig(
491497
});
492498
}
493499

500+
if (warnForLint) {
501+
logger.warn(`
502+
Lint without 'project' was not migrated which is not supported in Angular CLI 6.
503+
`);
504+
}
505+
494506
const removeDupes = (items: string[]) => items.reduce((newItems, item) => {
495507
if (newItems.indexOf(item) === -1) {
496508
newItems.push(item);

0 commit comments

Comments
 (0)