Skip to main content

job-id-casing

Rule catalog ID: R010

Targeted pattern scopeโ€‹

GitHub Actions workflow YAML files that declare job identifiers under jobs.

What this rule reportsโ€‹

This rule reports workflow job IDs whose casing does not match the configured naming convention.

Why this rule existsโ€‹

Job IDs are referenced by features like needs, reusable workflow outputs, and visual run graphs. A consistent convention makes those references easier to read and maintain.

โŒ Incorrectโ€‹

jobs:
BuildApp:
name: Build App
runs-on: ubuntu-latest

โœ… Correctโ€‹

jobs:
build-app:
name: Build App
runs-on: ubuntu-latest
jobs:
build_app:
name: Build App
runs-on: ubuntu-latest

The second example is valid when the rule is configured for snake_case.

Additional examplesโ€‹

For larger repositories, this rule is often enabled together with one of the published presets so violations are caught in pull requests before workflow changes are merged.

ESLint flat config exampleโ€‹

import githubActions from "eslint-plugin-github-actions-2";

export default [
{
files: ["**/*.{yml,yaml}"],
plugins: {
"github-actions": githubActions,
},
rules: {
"github-actions/job-id-casing": "error",
},
},
];

When not to use itโ€‹

You can disable this rule when its policy does not match your repository standards, or when equivalent enforcement is already handled by another policy tool.

Further readingโ€‹