diff --git a/eslint.config.mjs b/eslint.config.mjs index aa94178c..481e88af 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -61,10 +61,15 @@ export default tseslint.config( '@typescript-eslint/no-unsafe-call': 'off', '@typescript-eslint/no-unsafe-return': 'off', '@typescript-eslint/no-unsafe-enum-comparison': 'off', - '@typescript-eslint/no-unnecessary-type-assertion': 'off', - '@typescript-eslint/no-redundant-type-constituents': 'off', + }, + }, + { + // Test files: `async` test callbacks and `act(async () => {})` wrappers are + // idiomatic even when they contain no `await` (async `act` flushes the + // microtask queue). Relaxing require-await here avoids churn in test infra. + files: ['**/*.spec.{ts,tsx}', '**/*.test.{ts,tsx}'], + rules: { '@typescript-eslint/require-await': 'off', - '@typescript-eslint/no-misused-promises': 'off', }, }, prettierRecommended, diff --git a/src/app/[locale]/complete-registration/CompleteRegistration.tsx b/src/app/[locale]/complete-registration/CompleteRegistration.tsx index 2d84892d..e2615cd2 100644 --- a/src/app/[locale]/complete-registration/CompleteRegistration.tsx +++ b/src/app/[locale]/complete-registration/CompleteRegistration.tsx @@ -86,7 +86,7 @@ export default function CompleteRegistration(): React.ReactElement { validationSchema: CompleteRegistrationSchema, validateOnChange: isSubmitted, validateOnBlur: true, - onSubmit: async (values) => { + onSubmit: (values) => { if (user != null) { dispatch( refreshUserInformation({ diff --git a/src/app/[locale]/contribute/FeedSubmission/Form/FirstStep.tsx b/src/app/[locale]/contribute/FeedSubmission/Form/FirstStep.tsx index a203f336..35893604 100644 --- a/src/app/[locale]/contribute/FeedSubmission/Form/FirstStep.tsx +++ b/src/app/[locale]/contribute/FeedSubmission/Form/FirstStep.tsx @@ -107,7 +107,11 @@ export default function FormFirstStep({ return ( <> -