Rules for consistent, readable, and valid GitHub Actions workflow files.
- Node.js ^22.13.0 || >=24
npm install eslint-plugin-github-action -Dyarn add eslint-plugin-github-action -Dpnpm add eslint-plugin-github-action -DConfigure in ESLint config files:
import { defineConfig } from 'eslint/config'
import pluginGitHubAction from 'eslint-plugin-github-action'
export default defineConfig([
...pluginGitHubAction.configs.recommended,
// Other configs...
])The recommended config targets .github/workflows/*.yml and .yaml files.
🍎 For advanced usage, please check Advanced Usage
💼 Configurations enabled in.
✅ Set in the recommended preset.
🔧 Automatically fixable by the --fix CLI option.
💡 Manually fixable by editor suggestions.
| Name | Description | 💼 | 🔧 | 💡 |
|---|---|---|---|---|
| action-name-casing | Enforce naming convention for workflow name. | 🔧 | ||
| job-id-casing | Enforce naming convention for job IDs. | |||
| max-jobs-per-action | Enforce maximum jobs per workflow file. | |||
| no-external-job | Disallow using external jobs. | |||
| no-invalid-key | Disallow using invalid key. | ✅ | ||
| no-top-level-env | Disallow using top-level env. | |||
| no-top-level-permissions | Disallow using top-level permissions. | |||
| no-unpinned-uses | Disallow unpinned uses references. | |||
| prefer-cancel-in-progress | Prefer setting concurrency cancel-in-progress to true. | |||
| prefer-fail-fast | Disallow setting fail-fast to false. | |||
| prefer-file-extension | Enforce workflow file extension. | ✅ | ||
| prefer-step-uses-style | Enforce the style of job step uses. |
|||
| require-action-name | Require a string workflow name. | ✅ | ||
| require-action-run-name | Require a string workflow run-name. | |||
| require-concurrency-group | Require a workflow-level concurrency group. | |||
| require-job-name | Require a string job name. | |||
| require-job-step-name | Require a string job step name. | |||
| valid-trigger-events | Disallow invalid trigger events. | ✅ | 🔧 | |
| valid-timeout-minutes | Disallow invalid timeout-minutes. | ✅ |