typescript-eslint/no-misused-promises: how to handle Promise<void> in event handlers?

<button onClick={someAsyncFetchFunction} />Click</button> This ESLint rule didn't squash the warning: https://github.com/typescript-eslint/typescript-eslint/pull/4623
{
"@typescript-eslint/no-misused-promises": [
"error",
{
"checksVoidReturn": {
"arguments": false
}
}
]
}
{
"@typescript-eslint/no-misused-promises": [
"error",
{
"checksVoidReturn": {
"arguments": false
}
}
]
}
GitHub
feat(eslint-plugin): [no-misused-promises] add granular options wit...
PR Checklist Addresses an existing issue: fixes #4619 That issue was marked as accepting prs Steps in CONTRIBUTING.md were taken Overview Allows user configurations to provide an object contai...
2 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
mcgrealife
mcgrealifeOP2y ago
Brilliant @aether that worked – much appreciated!
Want results from more Discord servers?
Add your server