Getting started
Use this guide to install the plugin, enable your first preset, and quickly navigate to the rule and preset reference docs.
Installโ
npm install --save-dev eslint eslint-plugin-github-actions-2
Flat config exampleโ
import githubActions from "eslint-plugin-github-actions-2";
export default [githubActions.configs.recommended];
What the presets do for youโ
The exported presets already:
- scope themselves to
.github/workflows/*.{yml,yaml} - register
yaml-eslint-parser - register the
github-actionsplugin namespace
Choosing a presetโ
- Start with
recommendedfor most repositories. - Add
securitywhen you want immutable pinning checks. - Use
strictwhen you want concurrency and stronger operational guardrails. - Use
allto enable every published rule.
For target-specific linting, use:
actionMetadataforaction.yml/action.yamlworkflowTemplatesforworkflow-templates/*.ymland*.yamlworkflowTemplatePropertiesforworkflow-templates/*.properties.json
Next stepsโ
- Review the preset reference
- Browse the full rule reference
- See the official workflow syntax documentation