This rule requires that when an action exportsDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/aurelienbobenrieth/gadget/llms.txt
Use this file to discover all available pages before exploring further.
onSuccess, it must also export run. Gadget will error at runtime if an action has onSuccess but no run function.
Rule Details
This rule checks if the action file exportsonSuccess and reports an error if there is no corresponding run export.
Severity: Error
Auto-fixable: No
Examples
Incorrect
Correct
Why This Matters
TheonSuccess function is called after the run function completes successfully. Without a run function, there is nothing for onSuccess to run after, and Gadget will throw a runtime error.
When to Use
This rule is included in therecommended config and should always be enabled for Gadget projects. It prevents a common configuration error that causes runtime failures.