github-action/prefer-file-extension
Enforce action file extension.
- 💼 This rule is enabled in the ✅
recommended
config.
📖 Rule Details
This rule reports when action file extension doesn't match.
yml
# yml.yml
name: Release
correct
yaml
# yaml.yaml
name: Release
incorrect
🔧 Options
Default extension is set to yml
.
ts
type AllowedExtension = 'yml' | 'yaml'
type JobIdCasingOptions = [
'error' | 'warn' | 'off' | 2 | 1 | 0,
(
| AllowedExtension
| {
extension?: AllowedExtension
/**
* @default true
*/
caseSensitive?: boolean
}
),
]
"yml"
(default)
Examples of correct code for this rule with default option:
yml
# yml.yml
name: Release
correct
Examples of incorrect code for this rule with default option:
yaml
# yaml.yaml
name: Release
incorrect
"yaml"
Examples of correct code for this rule with "yaml"
option:
yaml
# yaml.yaml
name: Release
correct
Examples of incorrect code for this rule with "yaml"
option:
yml
# yml.yml
name: Release
incorrect
🚀 Version
This rule was introduced in eslint-plugin-github-action v0.0.8