Rules for consistent, readable and valid GitHub action files.
npm install eslint-plugin-github-action




> Rules for consistent, readable and valid GitHub action files.
``shell`
npm install eslint-plugin-github-action -D
`shell`
yarn add eslint-plugin-github-action -D
`shell`
pnpm add eslint-plugin-github-action -D
Config in ESLint config files:
`ts
import { defineConfig } from 'eslint/config'
import pluginGitHubAction from 'eslint-plugin-github-action'
export default defineConfig([
...pluginGitHubAction.configs.recommended,
// Other configs...
])
`
:apple: For advanced usaged, please check Advanced Usage
š¼ Configurations enabled in.\
ā
Set in the recommended preset.\--fix` CLI option.\
š§ Automatically fixable by the
š” Manually fixable by editor suggestions.
| Name | Description | š¼ | š§ | š” |
| :------------------------------------------------------------------------------------------------------------ | :---------------------------------------- | :-: | :-: | :-: |
| action-name-casing | Enforce naming convention to action name. | | š§ | |
| job-id-casing | Enforce naming convention to job id. | | | |
| max-jobs-per-action | Enforce maximum jobs per action file. | | | |
| no-external-job | Disallow using external job. | | | |
| 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. | | | |
| prefer-fail-fast | Disallow setting fail-fast to false. | | | |
| prefer-file-extension | Enforce action file extension. | ā
| | |
| prefer-step-uses-style | Enforce the style of job step uses. | | | |
| require-action-name | Require a string action name. | ā
| | |
| require-action-run-name | Require a string action run-name. | | | |
| 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. | ā
| | |
- GitHub Actions documentation
- Understanding the workflow file
- Workflow syntax for GitHub Actions