mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
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:
committed by
Eugenio Romano
parent
26c5982a1a
commit
a7a48e8b2b
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user