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:
Paul Gschwendtner
2017-09-01 17:05:46 +02:00
committed by Jeremy Elbourn
parent 454781d494
commit 28ede304fb
13 changed files with 24 additions and 28 deletions
@@ -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'];
});
}