mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
build: stricter unused variable checking (#6633)
Currently only variables that don't start with an underscore will be checked by TSLint. This doesn't make sense, because variables get prefixed with an underscore to indicate that they are not part of the public API, but still need to be public in favor of AOT compilation for example. This means that those properties are having the public modifier set (explicitly or automatically) and therefore won't be treated as unused anyway. **TL;DR**: With this change, prefixed variables will be checked by the `no-unused-variable` TSLint rule and those which are marked as `private` and are unused will be catched by TSLint.
This commit is contained in:
committed by
Jeremy Elbourn
parent
454781d494
commit
28ede304fb
@@ -38,9 +38,9 @@ export class ViewerComponent {
|
||||
}
|
||||
|
||||
constructor(private _service: FirebaseService,
|
||||
private _route: ActivatedRoute,
|
||||
public snackBar: MdSnackBar) {
|
||||
_route.params.subscribe(p => {
|
||||
public snackBar: MdSnackBar,
|
||||
activatedRoute: ActivatedRoute) {
|
||||
activatedRoute.params.subscribe(p => {
|
||||
this._service.prNumber = p['id'];
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user