This rule requires that theDocumentation 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.
returnType property is explicitly set in the action options export. The implicit default for returnType differs between model actions (defaults to false) and global actions (defaults to true), which can lead to confusion. Requiring an explicit value makes the behavior clear.
Rule Details
This rule reports an error when theoptions export does not include a returnType property. The auto-fixer adds the appropriate default based on the action type:
- Model actions: adds
returnType: false - Global actions: adds
returnType: true
Examples
Incorrect
Correct
Auto-fixes
The rule automatically adds thereturnType property with the appropriate default:
The rule works even without the
ActionOptions type annotation, as it detects action files based on their path.When to Use
This rule is included in thestrict config. It helps prevent confusion about the implicit default behavior by requiring explicit configuration.