oxc/crates/oxc_span
DonIsaac f81e8a126e feat(linter): add oxc/no-async-endpoint-handlers (#5364)
Adds `no-async-endpoint-handlers` rules, which bans async functions used as endpoint handlers in Express applications. These do not get caught by Express' error handler, causing the server to crash with an unhandled process rejection error.

```js
app.use(async (req, res) => {
  const foo = await api.getFoo(req.query) // server panics if this function rejects
  return res.json(foo)
})
```

I could not find this rule implemented in any ESLint plugin, but this is a problem I see quite often and I'm tired of dealing with it. I've added it to `oxc` for now, but we should consider adding an `express` or `api` plugin in the future.
2024-08-31 16:59:52 +00:00
..
src feat(linter): add oxc/no-async-endpoint-handlers (#5364) 2024-08-31 16:59:52 +00:00
Cargo.toml Release crates v0.25.0 (#5107) 2024-08-23 15:37:36 +08:00
CHANGELOG.md Release crates v0.25.0 (#5107) 2024-08-23 15:37:36 +08:00