Add an exception

This commit is contained in:
Manav Rathi 2024-06-11 20:40:36 +05:30
parent a2e93489f2
commit d2fd7dea97
No known key found for this signature in database
2 changed files with 15 additions and 1 deletions

View File

@ -6,7 +6,6 @@ module.exports = {
"react/react-in-jsx-scope": "off",
"react/prop-types": "off",
"react-hooks/exhaustive-deps": "off",
"@typescript-eslint/no-misused-promises": "off",
"@typescript-eslint/no-explicit-any": "off",
"react-refresh/only-export-components": "off",
},

View File

@ -25,5 +25,20 @@ module.exports = {
ignoreArrowShorthand: true,
},
],
/*
Allow async functions to be passed as JSX attributes expected to be
functions that return void (typically onFoo event handlers).
This should be safe since we have registered global unhandled Promise
handlers.
*/
"@typescript-eslint/no-misused-promises": [
"error",
{
checksVoidReturn: {
attributes: false,
},
},
],
},
};