-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Closed
Description
Bug Report or Feature Request (mark with an x
)
- [x ] bug report -> please search issues before submitting
- [ ] feature request
Command (mark with an x
)
- [ ] new
- [ ] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [X ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc
Versions
Angular CLI: 6.0.8
Node: 8.11.1
OS: darwin x64
Angular: 6.0.9
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.6.8
@angular-devkit/build-angular 0.6.8
@angular-devkit/build-optimizer 0.6.8
@angular-devkit/core 0.6.8
@angular-devkit/schematics 0.6.8
@angular/cli 6.0.8
@ngtools/webpack 6.0.8
@schematics/angular 0.6.8
@schematics/update 0.6.8
rxjs 6.2.2
typescript 2.7.2
webpack 4.8.3
Repro steps
Add some invalid typescript such as a function with a var statement that is also not used anywhere.
export class AppComponent {
title = 'app';
bar() {
var foo = 1;
}
}
The log given by the failure
▶ng lint ngtest --format stylish
/Users/papa/_play/ngtest/src/app/app.component.ts:11:5
ERROR: 11:5 no-var-keyword Forbidden 'var' keyword, use 'let' or 'const' instead
ERROR: 11:5 no-var-keyword Forbidden 'var' keyword, use 'let' or 'const' instead
ERROR: 11:9 prefer-const Identifier 'foo' is never reassigned; use 'const' instead of 'var'.
ERROR: 11:9 prefer-const Identifier 'foo' is never reassigned; use 'const' instead of 'var'.
Lint errors found in the listed files.
Desired functionality
Error messages should only show up once, not twice
Mention any other details that might be useful
Metadata
Metadata
Assignees
Labels
No labels