style: fix linting issues met Prettier
This commit is contained in:
		
							parent
							
								
									04b35a61f9
								
							
						
					
					
						commit
						b6e07d28df
					
				
					 6 changed files with 8 additions and 12 deletions
				
			
		|  | @ -6,11 +6,7 @@ import processingService from './processing/processing-service.js'; | ||||||
| import { NotFoundError } from '@mikro-orm/core'; | import { NotFoundError } from '@mikro-orm/core'; | ||||||
| import learningObjectService from './learning-object-service.js'; | import learningObjectService from './learning-object-service.js'; | ||||||
| import { getLogger, Logger } from '../../logging/initalize.js'; | import { getLogger, Logger } from '../../logging/initalize.js'; | ||||||
| import { | import { FilteredLearningObject, LearningObjectIdentifier, LearningPathIdentifier } from 'dwengo-1-common/src/interfaces/learning-content'; | ||||||
|     FilteredLearningObject, |  | ||||||
|     LearningObjectIdentifier, |  | ||||||
|     LearningPathIdentifier, |  | ||||||
| } from 'dwengo-1-common/src/interfaces/learning-content'; |  | ||||||
| 
 | 
 | ||||||
| const logger: Logger = getLogger(); | const logger: Logger = getLogger(); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -9,7 +9,7 @@ import { Language } from '../../../src/entities/content/language'; | ||||||
| import learningObjectExample from '../../test-assets/learning-objects/pn-werkingnotebooks/pn-werkingnotebooks-example'; | import learningObjectExample from '../../test-assets/learning-objects/pn-werkingnotebooks/pn-werkingnotebooks-example'; | ||||||
| import learningPathExample from '../../test-assets/learning-paths/pn-werking-example'; | import learningPathExample from '../../test-assets/learning-paths/pn-werking-example'; | ||||||
| import { LearningPath } from '../../../src/entities/content/learning-path.entity'; | import { LearningPath } from '../../../src/entities/content/learning-path.entity'; | ||||||
| import {FilteredLearningObject} from "dwengo-1-common/src/interfaces/learning-content"; | import { FilteredLearningObject } from 'dwengo-1-common/src/interfaces/learning-content'; | ||||||
| 
 | 
 | ||||||
| async function initExampleData(): Promise<{ learningObject: LearningObject; learningPath: LearningPath }> { | async function initExampleData(): Promise<{ learningObject: LearningObject; learningPath: LearningPath }> { | ||||||
|     const learningObjectRepo = getLearningObjectRepository(); |     const learningObjectRepo = getLearningObjectRepository(); | ||||||
|  |  | ||||||
|  | @ -80,11 +80,11 @@ describe('LearningObjectService', () => { | ||||||
| 
 | 
 | ||||||
|                 const responseFromDwengoApi = await fetch( |                 const responseFromDwengoApi = await fetch( | ||||||
|                     getEnvVar(envVars.LearningContentRepoApiBaseUrl) + |                     getEnvVar(envVars.LearningContentRepoApiBaseUrl) + | ||||||
|                     `/learningObject/getRaw?hruid=${DWENGO_TEST_LEARNING_OBJECT_ID.hruid}&language=${DWENGO_TEST_LEARNING_OBJECT_ID.language}&version=${DWENGO_TEST_LEARNING_OBJECT_ID.version}`, |                         `/learningObject/getRaw?hruid=${DWENGO_TEST_LEARNING_OBJECT_ID.hruid}&language=${DWENGO_TEST_LEARNING_OBJECT_ID.language}&version=${DWENGO_TEST_LEARNING_OBJECT_ID.version}` | ||||||
|                 ); |                 ); | ||||||
|                 const responseHtml = await responseFromDwengoApi.text(); |                 const responseHtml = await responseFromDwengoApi.text(); | ||||||
|                 expect(result).toEqual(responseHtml); |                 expect(result).toEqual(responseHtml); | ||||||
|             }, |             } | ||||||
|         ); |         ); | ||||||
|         it('returns null when queried with a non-existing identifier', async () => { |         it('returns null when queried with a non-existing identifier', async () => { | ||||||
|             const result = await learningObjectService.getLearningObjectHTML({ |             const result = await learningObjectService.getLearningObjectHTML({ | ||||||
|  |  | ||||||
|  | @ -20,7 +20,7 @@ import { | ||||||
| } from '../../test-assets/learning-paths/test-conditions-example.js'; | } from '../../test-assets/learning-paths/test-conditions-example.js'; | ||||||
| import { Student } from '../../../src/entities/users/student.entity.js'; | import { Student } from '../../../src/entities/users/student.entity.js'; | ||||||
| 
 | 
 | ||||||
| import {LearningObjectNode, LearningPathResponse} from "dwengo-1-common/src/interfaces/learning-content"; | import { LearningObjectNode, LearningPathResponse } from 'dwengo-1-common/src/interfaces/learning-content'; | ||||||
| 
 | 
 | ||||||
| async function initExampleData(): Promise<{ learningObject: LearningObject; learningPath: LearningPath }> { | async function initExampleData(): Promise<{ learningObject: LearningObject; learningPath: LearningPath }> { | ||||||
|     const learningObjectRepo = getLearningObjectRepository(); |     const learningObjectRepo = getLearningObjectRepository(); | ||||||
|  |  | ||||||
|  | @ -2,7 +2,7 @@ import { AssertionError } from 'node:assert'; | ||||||
| import { LearningObject } from '../../src/entities/content/learning-object.entity'; | import { LearningObject } from '../../src/entities/content/learning-object.entity'; | ||||||
| import { LearningPath as LearningPathEntity } from '../../src/entities/content/learning-path.entity'; | import { LearningPath as LearningPathEntity } from '../../src/entities/content/learning-path.entity'; | ||||||
| import { expect } from 'vitest'; | import { expect } from 'vitest'; | ||||||
| import {FilteredLearningObject, LearningPath} from "dwengo-1-common/src/interfaces/learning-content"; | import { FilteredLearningObject, LearningPath } from 'dwengo-1-common/src/interfaces/learning-content'; | ||||||
| 
 | 
 | ||||||
| // Ignored properties because they belang for example to the class, not to the entity itself.
 | // Ignored properties because they belang for example to the class, not to the entity itself.
 | ||||||
| const IGNORE_PROPERTIES = ['parent']; | const IGNORE_PROPERTIES = ['parent']; | ||||||
|  |  | ||||||
							
								
								
									
										2
									
								
								common/src/interfaces/learning-content.d.ts
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								common/src/interfaces/learning-content.d.ts
									
										
									
									
										vendored
									
									
								
							|  | @ -1,4 +1,4 @@ | ||||||
| import { Language } from 'dwengo-1-backend/src/entities/content/language.js' | import { Language } from 'dwengo-1-backend/src/entities/content/language.js'; | ||||||
| 
 | 
 | ||||||
| export interface Transition { | export interface Transition { | ||||||
|     default: boolean; |     default: boolean; | ||||||
|  |  | ||||||
		Reference in a new issue
	
	 Lint Action
						Lint Action