Skip to content

Commit 54b6c6b

Browse files
DetectiveQuackfilipesilva
authored andcommitted
refactor(@angular/cli): remove eslint errors for console
1 parent 2574101 commit 54b6c6b

File tree

1 file changed

+9
-8
lines changed
  • packages/@angular/cli/bin

1 file changed

+9
-8
lines changed

packages/@angular/cli/bin/ng

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ resolve('@angular/cli', { basedir: process.cwd() },
151151
localVersion = _fromPackageJson();
152152
shouldWarn = localVersion && globalVersion.compare(localVersion) > 0;
153153
} catch (e) {
154+
// eslint-disable-next-line no-console
154155
console.error(e);
155156
shouldWarn = true;
156157
}
@@ -163,14 +164,14 @@ resolve('@angular/cli', { basedir: process.cwd() },
163164
To disable this warning use "ng set --global warnings.versionMismatch=false".
164165
`);
165166
// Don't show warning colorised on `ng completion`
166-
if (process.argv[2] !== 'completion') {
167-
// eslint-disable no-console
168-
console.log(warning);
169-
} else {
170-
// eslint-disable no-console
171-
console.error(warning);
172-
process.exit(1);
173-
}
167+
if (process.argv[2] !== 'completion') {
168+
// eslint-disable-next-line no-console
169+
console.log(warning);
170+
} else {
171+
// eslint-disable-next-line no-console
172+
console.error(warning);
173+
process.exit(1);
174+
}
174175
}
175176

176177
// No error implies a projectLocalCli, which will load whatever

0 commit comments

Comments
 (0)