refactor: await-thenable
This commit is contained in:
		
							parent
							
								
									e84c772916
								
							
						
					
					
						commit
						a42add7131
					
				
					 2 changed files with 2 additions and 1 deletions
				
			
		|  | @ -27,7 +27,7 @@ export async function createSubmission(submissionDTO: SubmissionDTO): Promise<Su | ||||||
|     const submission = mapToSubmission(submissionDTO); |     const submission = mapToSubmission(submissionDTO); | ||||||
| 
 | 
 | ||||||
|     try { |     try { | ||||||
|         const newSubmission = await submissionRepository.create(submission); |         const newSubmission = submissionRepository.create(submission); | ||||||
|         await submissionRepository.save(newSubmission); |         await submissionRepository.save(newSubmission); | ||||||
|     } catch (_) { |     } catch (_) { | ||||||
|         return null; |         return null; | ||||||
|  |  | ||||||
|  | @ -33,6 +33,7 @@ export default [ | ||||||
|         }, |         }, | ||||||
|         rules: { |         rules: { | ||||||
|             '@typescript-eslint/array-type': 'warn', |             '@typescript-eslint/array-type': 'warn', | ||||||
|  |             '@typescript-eslint/await-thenable': 'error', | ||||||
| 
 | 
 | ||||||
|             'consistent-return': 'off', |             'consistent-return': 'off', | ||||||
|             '@typescript-eslint/consistent-return': 'off', |             '@typescript-eslint/consistent-return': 'off', | ||||||
|  |  | ||||||
		Reference in a new issue