Angular CLI: 6.0.7
Node: 9.6.1
OS: darwin x64
Angular: 6.0.3
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.6.7
@angular-devkit/build-angular 0.6.7
@angular-devkit/build-optimizer 0.6.7
@angular-devkit/core 0.6.7
@angular-devkit/schematics 0.6.7 (cli-only)
@angular/cdk 6.2.0
@angular/cli 6.0.7
@angular/material 6.2.0
@ngtools/webpack 6.0.7
@schematics/angular 0.6.7 (cli-only)
@schematics/update 0.6.7
rxjs 6.2.0
typescript 2.7.2
webpack 4.8.3
ng lintSuccess and error messages from lint are shown twice in the console.
For example, success case:
$ ng lint
All files pass linting.
All files pass linting.
Error case (with a simple lint error (missing semicolon)):
$ ng lint
ERROR: .../frontend/src/app/file-list/file-list.component.ts[11, 55]: Missing semicolon
ERROR: .../frontend/src/app/file-list/file-list.component.ts[11, 55]: Missing semicolon
Lint errors found in the listed files.
All files pass linting.
The log messages (success and error case) should only be shown once.
Why are there so many new lines between the log messages?
Why does it say All files pass linting. in the error case? Shouldn't it just say Lint errors found in the listed files.?
I can confirm, I have the same problem
Running ng lint [project name] prevents the double message for me. See: https://github.com/angular/angular-cli/wiki/lint
Ok, but why do we receive the message twice even when there is only one project?
Running ng lint on a fresh CLI generated project returns similar output as the OP, and running ng lint project yielded expected output. Looking at angular.json I have two projects; "project" and "project-e2e". I made "project-e2e2" and ng lint showed "All files passed linting" three times.
Seems like ng lint's default behavior is to lint every project at once, of which there are two to start.
thanks for research @will-janz
in that case, I would suggest to re-configure ts lint for e2e to look into the e2e folder only.
Maybe ng lint could display the project being linted as well, that would be less confusing.
Maybe
ng lintcould display the project being linted as well, that would be less confusing.
Any updates on this? I really would like ng lint to display a message with the project linted.
This is solved by #12384.
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
Running
ng linton a fresh CLI generated project returns similar output as the OP, and runningng lint projectyielded expected output. Looking atangular.jsonI have two projects; "project" and "project-e2e". I made "project-e2e2" andng lintshowed "All files passed linting" three times.Seems like
ng lint's default behavior is to lint every project at once, of which there are two to start.