enable prefer-const rule for tslint, fix issues (#4409)

* enable prefer-const rule for tslint, fix issues

* Update content-node-selector.component.spec.ts

* Update content-node-selector.component.spec.ts

* fix const

* fix lint issues

* update tests

* update tests

* update tests

* fix code

* fix page class
This commit is contained in:
Denys Vuika
2019-03-27 09:55:30 +00:00
committed by Eugenio Romano
parent 26c5982a1a
commit a7a48e8b2b
581 changed files with 5435 additions and 5402 deletions
@@ -29,7 +29,7 @@ describe('FolderDialogComponent', () => {
let fixture: ComponentFixture<FolderDialogComponent>;
let component: FolderDialogComponent;
let nodesApi: NodesApiService;
let dialogRef = {
const dialogRef = {
close: jasmine.createSpy('close')
};
@@ -99,13 +99,13 @@ export class FolderDialogComponent implements OnInit {
}
get name(): string {
let { name } = this.form.value;
const { name } = this.form.value;
return (name || '').trim();
}
get description(): string {
let { description } = this.form.value;
const { description } = this.form.value;
return (description || '').trim();
}
@@ -83,7 +83,7 @@ describe('NodeLockDialogComponent', () => {
});
it('should update form inputs', () => {
let newTime = moment();
const newTime = moment();
component.form.controls['isLocked'].setValue(false);
component.form.controls['allowOwner'].setValue(false);
component.form.controls['isTimeLock'].setValue(false);
@@ -59,7 +59,7 @@ export class NodeLockDialogComponent implements OnInit {
private get lockTimeInSeconds(): number {
if (this.form.value.isTimeLock) {
let duration = moment.duration(moment(this.form.value.time).diff(moment()));
const duration = moment.duration(moment(this.form.value.time).diff(moment()));
return duration.asSeconds();
}