build: Use prettier for typescript

Stop ignoring .ts files in prettier and fix existing issues.
This commit is contained in:
Ralph Hopman
2025-01-15 11:59:30 +00:00
committed by Adam Saghy
parent 9d6cf1514a
commit cac1d11ad7
1812 changed files with 22516 additions and 16862 deletions
@@ -1,6 +1,6 @@
/** Angular Imports */
import { Injectable } from '@angular/core';
import {ActivatedRouteSnapshot, Resolve} from '@angular/router';
import { ActivatedRouteSnapshot, Resolve } from '@angular/router';
/** rxjs Imports */
import { Observable } from 'rxjs';
@@ -13,7 +13,6 @@ import { SystemService } from '../../system.service';
*/
@Injectable()
export class HookResolver implements Resolve<Object> {
/**
* @param {SystemService} systemService System service.
*/
@@ -27,5 +26,4 @@ export class HookResolver implements Resolve<Object> {
const hookId = route.paramMap.get('id');
return this.systemService.getHook(hookId);
}
}
@@ -8,9 +8,8 @@ describe('ViewHookComponent', () => {
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ ViewHookComponent ]
})
.compileComponents();
declarations: [ViewHookComponent]
}).compileComponents();
}));
beforeEach(() => {
@@ -19,7 +19,6 @@ import { SystemService } from '../../system.service';
styleUrls: ['./view-hook.component.scss']
})
export class ViewHookComponent {
/** Hook Data. */
hookData: any;
@@ -31,11 +30,13 @@ export class ViewHookComponent {
* @param {Router} router Router for navigation.
* @param {TranslateService} translateService Translate Service.
*/
constructor(private route: ActivatedRoute,
constructor(
private route: ActivatedRoute,
private dialog: MatDialog,
private systemService: SystemService,
private router: Router,
private translateService: TranslateService) {
private translateService: TranslateService
) {
this.route.data.subscribe((data: { hook: any }) => {
this.hookData = data.hook;
});
@@ -50,12 +51,10 @@ export class ViewHookComponent {
});
deleteHookDialogRef.afterClosed().subscribe((response: any) => {
if (response.delete) {
this.systemService.deleteHook(this.hookData.id)
.subscribe(() => {
this.router.navigate(['/system/hooks']);
});
this.systemService.deleteHook(this.hookData.id).subscribe(() => {
this.router.navigate(['/system/hooks']);
});
}
});
}
}