Skip to main content
The plugin does not lint every file. Most rules activate only on Gadget action file paths, so they stay silent in the rest of your codebase.

File path detection

The plugin matches file paths using these glob patterns:
PatternMatches
**/api/actions/**/*.{js,ts}Global action files
**/api/models/**/actions/**/*.{js,ts}Model action files
A file matching either pattern is considered a “Gadget action file.” Windows backslash paths are normalized before matching.

Scope by rule prefix

Rule prefixApplies to
action-*All Gadget action files (global and model)
model-action-*Model action files only (api/models/**/actions)
global-action-*Global action files only (api/actions)
Enqueue rulesAny file that contains api.enqueue(...) calls
Each rule reference page includes a Scope label so you can see exactly where it applies.

Why enqueue rules apply everywhere

The two enqueue rules - action-no-enqueue-max-concurrency-exceeded and action-no-implicit-enqueue-retries - inspect api.enqueue(...) call expressions directly. They apply to all files because enqueue calls can appear in utility modules, route handlers, or background jobs outside the standard action directories.

Examples

my-gadget-app/
  api/
    actions/
      sendEmail.ts          # global action - matched by action-* and global-action-* rules
    models/
      user/
        actions/
          create.ts         # model action - matched by action-* and model-action-* rules
          update.ts         # model action
  src/
    utils/
      queue-helper.ts       # not an action file, but enqueue rules still apply here
Last modified on March 10, 2026