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);
|
||||
|
||||
try {
|
||||
const newSubmission = await submissionRepository.create(submission);
|
||||
const newSubmission = submissionRepository.create(submission);
|
||||
await submissionRepository.save(newSubmission);
|
||||
} catch (_) {
|
||||
return null;
|
||||
|
|
|
@ -33,6 +33,7 @@ export default [
|
|||
},
|
||||
rules: {
|
||||
'@typescript-eslint/array-type': 'warn',
|
||||
'@typescript-eslint/await-thenable': 'error',
|
||||
|
||||
'consistent-return': 'off',
|
||||
'@typescript-eslint/consistent-return': 'off',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue