style: fix linting issues met Prettier
This commit is contained in:
		
							parent
							
								
									aa1a85e64e
								
							
						
					
					
						commit
						2a2881ec30
					
				
					 84 changed files with 846 additions and 1013 deletions
				
			
		|  | @ -17,9 +17,9 @@ export async function fetchWithLogging<T>( | |||
|     url: string, | ||||
|     description: string, | ||||
|     options?: { | ||||
|         params?: Record<string, any>, | ||||
|         query?: Record<string, any>, | ||||
|         responseType?: "json" | "text", | ||||
|         params?: Record<string, any>; | ||||
|         query?: Record<string, any>; | ||||
|         responseType?: 'json' | 'text'; | ||||
|     } | ||||
| ): Promise<T | null> { | ||||
|     try { | ||||
|  |  | |||
|  | @ -16,7 +16,7 @@ export async function replaceAsync(str: string, regex: RegExp, replacementFn: (m | |||
|     }); | ||||
| 
 | ||||
|     // Wait for the replacements to get loaded. Reverse them so when popping them, we work in a FIFO manner.
 | ||||
|     const replacements: string[] = (await Promise.all(promises)); | ||||
|     const replacements: string[] = await Promise.all(promises); | ||||
| 
 | ||||
|     // Second run through matches: Replace them by their previously computed replacements.
 | ||||
|     return str.replace(regex, () => replacements.pop()!); | ||||
|  |  | |||
|  | @ -15,9 +15,9 @@ export const EnvVars: { [key: string]: EnvVar } = { | |||
|     DbUsername: { key: DB_PREFIX + 'USERNAME', required: true }, | ||||
|     DbPassword: { key: DB_PREFIX + 'PASSWORD', required: true }, | ||||
|     DbUpdate: { key: DB_PREFIX + 'UPDATE', defaultValue: false }, | ||||
|     LearningContentRepoApiBaseUrl: { key: PREFIX + "LEARNING_CONTENT_REPO_API_BASE_URL", defaultValue: "https://dwengo.org/backend/api"}, | ||||
|     FallbackLanguage: { key: PREFIX + "FALLBACK_LANGUAGE", defaultValue: "nl" }, | ||||
|     UserContentPrefix: { key: DB_PREFIX + 'USER_CONTENT_PREFIX', defaultValue: "u_" }, | ||||
|     LearningContentRepoApiBaseUrl: { key: PREFIX + 'LEARNING_CONTENT_REPO_API_BASE_URL', defaultValue: 'https://dwengo.org/backend/api' }, | ||||
|     FallbackLanguage: { key: PREFIX + 'FALLBACK_LANGUAGE', defaultValue: 'nl' }, | ||||
|     UserContentPrefix: { key: DB_PREFIX + 'USER_CONTENT_PREFIX', defaultValue: 'u_' }, | ||||
|     IdpStudentUrl: { key: STUDENT_IDP_PREFIX + 'URL', required: true }, | ||||
|     IdpStudentClientId: { key: STUDENT_IDP_PREFIX + 'CLIENT_ID', required: true }, | ||||
|     IdpStudentJwksEndpoint: { key: STUDENT_IDP_PREFIX + 'JWKS_ENDPOINT', required: true }, | ||||
|  |  | |||
|  | @ -1,9 +1,9 @@ | |||
| import {LearningObjectIdentifier} from "../interfaces/learning-content"; | ||||
| import { LearningObjectIdentifier } from '../interfaces/learning-content'; | ||||
| 
 | ||||
| export function isValidHttpUrl(url: string): boolean { | ||||
|     try { | ||||
|         const parsedUrl = new URL(url, "http://test.be"); | ||||
|         return parsedUrl.protocol === "http:" || parsedUrl.protocol === "https:"; | ||||
|         const parsedUrl = new URL(url, 'http://test.be'); | ||||
|         return parsedUrl.protocol === 'http:' || parsedUrl.protocol === 'https:'; | ||||
|     } catch (e) { | ||||
|         return false; | ||||
|     } | ||||
|  |  | |||
		Reference in a new issue
	
	 Lint Action
						Lint Action