Skip to main content

Options and params

Validate that options and params exports contain values Gadget can serialize and process.

action-no-invalid-options

Enforce that the Gadget action options export contains only valid JSON-serializable literals. error fixable

action-no-invalid-params

Enforce that Gadget action params export only uses supported JSON schema types and properties. error

action-no-invalid-timeout-ms

Enforce that timeoutMS in Gadget action options does not exceed 900000ms (15 minutes). error fixable

action-require-explicit-return-type

Require returnType to be explicitly set in the options export of Gadget actions. warn fixable

action-require-timeout-ms-comment

Require a trailing inline comment describing the duration on the timeoutMS property in Gadget action options. warn fixable

global-action-no-action-type

Disallow actionType in global action options. warn fixable

model-action-invalid-action-type

Disallow invalid actionType values in model action options. warn

model-action-no-invalid-trigger

Disallow scheduler triggers in model action options. warn fixable

model-action-no-transactional-timeout-mismatch

Disallow timeoutMS above 5000ms on model actions without explicitly setting transactional: false. warn

Runtime safety

Prevent empty handlers, missing types, and patterns that cause transaction timeouts or billing surprises.

action-no-await-handle-result-in-action

Disallow awaiting handle.result() inside run or onSuccess exports in Gadget actions. warn

action-no-empty-on-success

Disallow empty onSuccess exports in Gadget actions. warn fixable

action-no-return-value-in-on-success

Disallow returning a value from onSuccess in Gadget actions. warn fixable

action-require-action-run-type

Require Gadget action run and onSuccess exports to use generated type annotations. warn fixable

action-require-run-with-on-success

Require a run export when onSuccess is exported in Gadget actions. warn

Enqueue safety

Enforce explicit retries and concurrency limits on api.enqueue() calls.

action-no-enqueue-max-concurrency-exceeded

Disallow maxConcurrency values exceeding Gadget’s hard limit of 100 in api.enqueue queue options. warn

action-no-implicit-enqueue-retries

Require explicit retries option on api.enqueue calls to avoid unintended retry behavior. warn
Last modified on March 10, 2026