Skip to main content
This rule disallows empty onSuccess exports in Gadget action files. An empty onSuccess function serves no purpose and should be removed to keep the code clean.

Rule Details

This rule checks for onSuccess exports that have an empty function body (no statements) and reports them as unnecessary. Severity: Warning Auto-fixable: Yes

Examples

Incorrect

Correct

Auto-fixes

The rule automatically removes the entire empty onSuccess export:
Gadget does not require an onSuccess export. If you have no post-processing work to do, simply omit the export entirely.

When to Use

This rule is included in the recommended config. It helps keep action files clean by removing unnecessary boilerplate.