I've encountered async functions in my useEffect
hooks while working on a JavaScript project that I'm currently transitioning to TypeScript:
(async ():Promise<void> => {
const data = await fetchData()
setData(data)
})()
Previously, this worked without any issues. However, after converting to TypeScript, I'm now facing an error:
...
"severity": 8,
"message": "Replace `(async·():` with `;(async·():·`",
"source": "eslint",
...