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
+12 -13
View File
@@ -9,26 +9,25 @@ import { Pipe, PipeTransform } from '@angular/core';
name: 'urlToString'
})
export class UrlToStringPipe implements PipeTransform {
transform(url: string): any {
url = decodeURIComponent(url);
const urlSubstrings: string[] = url.slice(1).split('/');
if (url.includes('?')) { // Query params URL.
if (url.includes('?')) {
// Query params URL.
const query = urlSubstrings.pop();
const prefix = query.slice(0, query.indexOf('?'));
urlSubstrings.push(prefix);
}
const stringRepresentation =
urlSubstrings
.map((path: string) => {
return path.split('-')
.map((str: string) => {
return str.charAt(0).toUpperCase() + str.slice(1);
})
.join(' ');
})
.join(' | ');
const stringRepresentation = urlSubstrings
.map((path: string) => {
return path
.split('-')
.map((str: string) => {
return str.charAt(0).toUpperCase() + str.slice(1);
})
.join(' ');
})
.join(' | ');
return stringRepresentation;
}
}