Changelog - 2026-10-31
Async style lint rules and a codemod
New FeatureIn one line. After updating @venizia/dev-configs you can turn on four rules that keep await on its own line, stop return await, and keep async functions out of React hooks; nothing changes until you spread the new config arrays: asyncStyleConfigs for the two await rules, reactAsyncStyleConfigs for the two hook rules.
What changed
venizia/no-inline-await.awaitis a whole statement or the whole initializer of a declaration, never inside a call, a ternary, a template literal or an assignment. Test files follow it too.venizia/no-return-await.return await f()becomesreturn f(); insidetry,catchorfinallyit becomesconst result = await f(); return result;.venizia/no-async-hook-callback. Nouse...call receives an async function: not as an argument, and not nested in an object or array argument either (useMutation({ mutationFn: async () => {} })is reported). A sync callback that builds an async function inside is left alone.venizia/effect-cleanup-consistency. An effect callback returns nothing on every path or a cleanup on every path.devz codemod async-style. Applies the fixes of the first two rules across a codebase (a dry run unless--write;--checkexits 1 when anything is left) and lists what it cannot fix, with file and line. With--writeit refuses a file that has local changes (modified, staged or untracked) and printsrefused <file> has local changes: commit or stash it, then run again.
How to turn them on
// .configs/lints/eslint.config.mjs
import { asyncStyleConfigs, houseConfigs } from '@venizia/dev-configs/linters';
export default [...houseConfigs, ...asyncStyleConfigs];asyncStyleConfigs holds no-inline-await and no-return-await; the two hook rules are not in it. A React project spreads reactHouseConfigs and reactAsyncStyleConfigs, which holds no-async-hook-callback and effect-cleanup-consistency, and spreads asyncStyleConfigs as well when it also wants the two await rules. The rules are at error. A later release will include them in houseConfigs and reactHouseConfigs; the two new exports will stay as aliases.
Who is affected
- Projects that update and change nothing. No action needed: the rules are off.
- Projects that turn them on. Run
devz codemod async-style <package>to see the plan, commit your work, then run it again with--write; what it cannot fix is listed for you to fix by hand. See Async Style.