style: fix linting issues met ESLint
This commit is contained in:
		
							parent
							
								
									67b60caded
								
							
						
					
					
						commit
						8fde49c051
					
				
					 4 changed files with 8 additions and 8 deletions
				
			
		|  | @ -29,7 +29,7 @@ export async function invalidateAllAssignmentKeys(queryClient: QueryClient, clas | ||||||
|         "assignment-questions", |         "assignment-questions", | ||||||
|     ]; |     ]; | ||||||
| 
 | 
 | ||||||
|     for (let key of keys) { |     for (const key of keys) { | ||||||
|         const queryKey = [key, classid, assignmentNumber].filter(arg => arg !== undefined); |         const queryKey = [key, classid, assignmentNumber].filter(arg => arg !== undefined); | ||||||
|         await queryClient.invalidateQueries({ queryKey: queryKey }); |         await queryClient.invalidateQueries({ queryKey: queryKey }); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  | @ -38,7 +38,7 @@ export async function invalidateAllClassKeys(queryClient: QueryClient, classid?: | ||||||
|         "class-assignments", |         "class-assignments", | ||||||
|     ]; |     ]; | ||||||
| 
 | 
 | ||||||
|     for (let key of keys) { |     for (const key of keys) { | ||||||
|         const queryKey = [key, classid].filter(arg => arg !== undefined); |         const queryKey = [key, classid].filter(arg => arg !== undefined); | ||||||
|         await queryClient.invalidateQueries({ queryKey: queryKey }); |         await queryClient.invalidateQueries({ queryKey: queryKey }); | ||||||
|     } |     } | ||||||
|  | @ -109,7 +109,7 @@ export function useClassStudentsQuery( | ||||||
| ): UseQueryReturnType<StudentsResponse, Error> { | ): UseQueryReturnType<StudentsResponse, Error> { | ||||||
|     return useQuery({ |     return useQuery({ | ||||||
|         queryKey: computed(() => classStudentsKey(toValue(id)!, toValue(full))), |         queryKey: computed(() => classStudentsKey(toValue(id)!, toValue(full))), | ||||||
|         queryFn: async () => classController.getStudents(toValue(id)!, toValue(full)!), |         queryFn: async () => classController.getStudents(toValue(id)!, toValue(full)), | ||||||
|         enabled: () => Boolean(toValue(id)), |         enabled: () => Boolean(toValue(id)), | ||||||
|     }) |     }) | ||||||
| } | } | ||||||
|  | @ -146,7 +146,7 @@ export function useClassTeachersQuery( | ||||||
| ): UseQueryReturnType<StudentsResponse, Error> { | ): UseQueryReturnType<StudentsResponse, Error> { | ||||||
|     return useQuery({ |     return useQuery({ | ||||||
|         queryKey: computed(() => classTeachersKey(toValue(id)!, toValue(full))), |         queryKey: computed(() => classTeachersKey(toValue(id)!, toValue(full))), | ||||||
|         queryFn: async () => classController.getTeachers(toValue(id)!, toValue(full)!), |         queryFn: async () => classController.getTeachers(toValue(id)!, toValue(full)), | ||||||
|         enabled: () => Boolean(toValue(id)), |         enabled: () => Boolean(toValue(id)), | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
|  | @ -183,7 +183,7 @@ export function useClassTeacherInvitationsQuery( | ||||||
| ): UseQueryReturnType<StudentsResponse, Error> { | ): UseQueryReturnType<StudentsResponse, Error> { | ||||||
|     return useQuery({ |     return useQuery({ | ||||||
|         queryKey: computed(() => classTeacherInvitationsKey(toValue(id)!, toValue(full))), |         queryKey: computed(() => classTeacherInvitationsKey(toValue(id)!, toValue(full))), | ||||||
|         queryFn: async () => classController.getTeacherInvitations(toValue(id)!, toValue(full)!), |         queryFn: async () => classController.getTeacherInvitations(toValue(id)!, toValue(full)), | ||||||
|         enabled: () => Boolean(toValue(id)), |         enabled: () => Boolean(toValue(id)), | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
|  | @ -194,7 +194,7 @@ export function useClassAssignmentsQuery( | ||||||
| ): UseQueryReturnType<StudentsResponse, Error> { | ): UseQueryReturnType<StudentsResponse, Error> { | ||||||
|     return useQuery({ |     return useQuery({ | ||||||
|         queryKey: computed(() => classAssignmentsKey(toValue(id)!, toValue(full))), |         queryKey: computed(() => classAssignmentsKey(toValue(id)!, toValue(full))), | ||||||
|         queryFn: async () => classController.getAssignments(toValue(id)!, toValue(full)!), |         queryFn: async () => classController.getAssignments(toValue(id)!, toValue(full)), | ||||||
|         enabled: () => Boolean(toValue(id)), |         enabled: () => Boolean(toValue(id)), | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
|  | @ -33,7 +33,7 @@ export async function invalidateAllGroupKeys( | ||||||
|         "group-questions", |         "group-questions", | ||||||
|     ]; |     ]; | ||||||
| 
 | 
 | ||||||
|     for (let key of keys) { |     for (const key of keys) { | ||||||
|         const queryKey = [key, classid, assignmentNumber, groupNumber].filter(arg => arg !== undefined); |         const queryKey = [key, classid, assignmentNumber, groupNumber].filter(arg => arg !== undefined); | ||||||
|         await queryClient.invalidateQueries({ queryKey: queryKey }); |         await queryClient.invalidateQueries({ queryKey: queryKey }); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  | @ -21,7 +21,7 @@ export async function invalidateAllSubmissionKeys( | ||||||
|         "submission", |         "submission", | ||||||
|     ]; |     ]; | ||||||
| 
 | 
 | ||||||
|     for (let key of keys) { |     for (const key of keys) { | ||||||
|         const queryKey = [key, classid, assignmentNumber, groupNumber, submissionNumber].filter(arg => arg !== undefined); |         const queryKey = [key, classid, assignmentNumber, groupNumber, submissionNumber].filter(arg => arg !== undefined); | ||||||
|         await queryClient.invalidateQueries({ queryKey: queryKey }); |         await queryClient.invalidateQueries({ queryKey: queryKey }); | ||||||
|     } |     } | ||||||
|  |  | ||||||
		Reference in a new issue
	
	 Lint Action
						Lint Action