Skip to content

User Guide

Install

shell
npm i eslint-plugin-github-action -D
shell
yarn add eslint-plugin-github-action -D
shell
pnpm add eslint-plugin-github-action -D

Basic Usage

Highly recommended to use eslint.config.mjs as config file.

eslint.config.mjs
ts
import { 
defineConfig
} from 'eslint/config'
import
pluginGitHubAction
from 'eslint-plugin-github-action'
export default
defineConfig
([
...
pluginGitHubAction
.
configs
.
recommended
,
// Other configs... ])

The recommended config enables a subset of the rules that should be most useful to most users.

Advanced Usage

Override/add specific rules configurations.

See also: http://eslint.org/docs/user-guide/configuring.

eslint.config.mjs
ts
import { 
defineConfig
} from 'eslint/config'
import
pluginGitHubAction
from 'eslint-plugin-github-action'
import * as
parserYAML
from 'yml-eslint-parser'
export default
defineConfig
([
// Create a single config based on the recommended config {
name
: 'github-action',
files
: ['.github/workflows/*.y?(a)ml'],
ignores
: ['!**/.github/workflows/*.y?(a)ml'],
plugins
: {
'github-action':
pluginGitHubAction
,
},
languageOptions
: {
parser
:
parserYAML
,
},
rules
: {
'github-action/action-name-casing': ['error', 'kebab-case'], }, }, ])