The ESLint plugin requires ESLint v9+ (flat config) and Node 18+. It includes peer dependencies for TypeScript ESLint utilities.Documentation 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.
Install with package managers
- pnpm
- npm
- yarn
Peer dependencies
The plugin requires the following peer dependencies:| Package | Version | Purpose |
|---|---|---|
eslint | >=9.0.0 | ESLint flat config support |
@typescript-eslint/utils | >=8.0.0 | TypeScript AST utilities for rule logic |
The plugin works with both JavaScript and TypeScript Gadget action files. You do not need to install @typescript-eslint/parser unless you are using other TypeScript-specific ESLint rules.
Verify installation
Check that the plugin is available:Minimal config
Createeslint.config.js in your project root:
eslint.config.js
error and warn).
Run ESLint
Lint your Gadget action files:**/api/actions/**/*.{js,ts}(global actions)**/api/models/**/actions/**/*.{js,ts}(model actions)
Auto-fix issues
Many rules support auto-fixing:action-no-invalid-options- removes numeric separators, converts template literals to stringsaction-no-invalid-timeout-ms- clamps timeout to 900000msaction-require-timeout-ms-comment- adds trailing// N minutescommentaction-no-empty-on-success- removes emptyonSuccessexportsaction-require-action-run-type- addsActionRuntype annotations
Local development
If you are contributing to the plugin or testing unreleased changes, you can link it locally.Using pnpm link
pnpm run build after making changes.
Using pnpm pack
Next steps
Configuration
Learn about file patterns and customizing rules
Configs
Compare recommended vs strict presets
