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
@@ -8,9 +8,8 @@ describe('ServerSelectorComponent', () => {
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ ServerSelectorComponent ]
})
.compileComponents();
declarations: [ServerSelectorComponent]
}).compileComponents();
}));
beforeEach(() => {
@@ -14,9 +14,7 @@ import { SettingsService } from 'app/settings/settings.service';
templateUrl: './server-selector.component.html',
styleUrls: ['./server-selector.component.scss']
})
export class ServerSelectorComponent implements OnInit {
/** Input server. */
form: any;
@@ -24,7 +22,7 @@ export class ServerSelectorComponent implements OnInit {
servers: string[];
/** Server Setting */
serverSelector = new UntypedFormControl('');
serverSelector = new UntypedFormControl('');
/** Server list to show */
existMoreThanOneServer = false;
@@ -32,20 +30,25 @@ export class ServerSelectorComponent implements OnInit {
/**
* @param {SettingsService} settingsService Settings Service
*/
constructor(private settingsService: SettingsService,
constructor(
private settingsService: SettingsService,
public dialog: MatDialog,
private formBuilder: UntypedFormBuilder) { }
private formBuilder: UntypedFormBuilder
) {}
ngOnInit(): void {
this.servers = this.settingsService.servers;
this.existMoreThanOneServer = (this.servers && this.servers.length > 1);
this.existMoreThanOneServer = this.servers && this.servers.length > 1;
if (!this.existMoreThanOneServer) {
this.settingsService.setServer(this.servers[0]);
} else {
this.existMoreThanOneServer = true;
this.serverSelector.patchValue(this.settingsService.server);
this.form = this.formBuilder.group({
'url': ['', [Validators.required]],
url: [
'',
[Validators.required]
]
});
}
}
@@ -57,7 +60,6 @@ export class ServerSelectorComponent implements OnInit {
this.settingsService.setServer(this.serverSelector.value);
}
/**
* Add new server to the list.
*/
@@ -69,5 +71,4 @@ export class ServerSelectorComponent implements OnInit {
this.settingsService.setServers(servers);
window.location.reload();
}
}