In Inngest functions, keep step.run calls flat and never assign to outer variables inside them. Steps replay and memoize, so a nested step errors and a mutated variable comes back undefined on resume; return values and sequence them instead.

Context: From the official Inngest eslint-plugin README for the JS SDK. Two rules encode real runtime behavior. Nesting step.run calls is not supported and errors at runtime; extract sequential steps into a plain function instead. And mutating a variable inside step.run does not work: steps are memoized and skipped on replay, so the assignment only runs once and later code sees undefined. Return the value from step.run and assign that instead.