Update ESLint config and optimize error handling
This commit is contained in:
@@ -56,7 +56,7 @@ const ContactFormSection = () => {
|
||||
const resJson = await res.json();
|
||||
setError(resJson?.error || "Ein Fehler ist aufgetreten. Bitte versuche es später erneut.");
|
||||
}
|
||||
} catch (err) {
|
||||
} catch (_err) {
|
||||
setError("Serverfehler. Bitte versuche es später erneut.");
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,17 @@ const compat = new FlatCompat({
|
||||
|
||||
const eslintConfig = [
|
||||
...compat.extends("next/core-web-vitals", "next/typescript"),
|
||||
...compat.config({
|
||||
rules: {
|
||||
'@typescript-eslint/no-unused-vars': [
|
||||
'warn',
|
||||
{
|
||||
argsIgnorePattern: '^_',
|
||||
varsIgnorePattern: '^_'
|
||||
}
|
||||
]
|
||||
}
|
||||
})
|
||||
];
|
||||
|
||||
export default eslintConfig;
|
||||
|
||||
Reference in New Issue
Block a user