github-action/action-name-casing
Enforce naming convention to action name.
💼 This rule is enabled in the ✅
recommendedconfig.🔧 The
--fixoption on the command line can automatically fix some of the problems reported by this rule.
📖 Rule Details
This rule enforces the consistent case usage of action names.
yaml
name: Unit Testcorrect
yaml
# camelCase
name: unitTestincorrect
yaml
# kebab-case
name: unit-testincorrect
yaml
# PascalCase
name: UnitTestincorrect
yaml
# snake_case
name: unit_testincorrect
yaml
# Train-Case
name: Unit-Testincorrect
yaml
# SCREAMING_SNAKE_CASE
name: UNIT_TESTincorrect
🔧 Options
Default casing is set to TitleCase.
ts
type ActionNameCasingOptions = [
'error' | 'warn' | 'off' | 2 | 1 | 0,
(
| 'camelCase'
| 'kebab-case'
| 'PascalCase'
| 'snake_case'
| 'Title Case'
| 'Train-Case'
| 'SCREAMING_SNAKE_CASE'
),
]"Title Case" (default)
Examples of correct code for this rule with default option:
yaml
name: Unit TestExamples of incorrect code for this rule with default option:
correct
yaml
# camelCase
name: unitTestincorrect
yaml
# kebab-case
name: unit-testincorrect
yaml
# PascalCase
name: UnitTestincorrect
yaml
# snake_case
name: unit_testincorrect
yaml
# Train-Case
name: Unit-Testincorrect
yaml
# SCREAMING_SNAKE_CASE
name: UNIT_TESTincorrect
"kebab-case"
Examples of correct code for this rule with "kebab-case" option:
yaml
name: unit-testExamples of incorrect code for this rule with "kebab-case" option:
correct
yaml
# camelCase
name: unitTestincorrect
yaml
# PascalCase
name: UnitTestincorrect
yaml
# snake_case
name: unit_testincorrect
yaml
# Title Case
name: unit-testincorrect
yaml
# Train-Case
name: Unit-Testincorrect
yaml
# SCREAMING_SNAKE_CASE
name: UNIT_TESTincorrect
🚀 Version
This rule was introduced in eslint-plugin-github-action v0.0.2