Skip to content

github-action/require-job-step-name

Require a string job step name.

📖 Rule Details

This rule reports when action job steps has no name or not a string.

yaml
name: Release

jobs:
  test:
    name: Test
    steps:
      - name: Lint
      - name: Typecheck
correct
yaml
# job step has no name
name: Release

jobs:
  test:
    name: Test
    steps:
      - run: echo hello world
incorrect
yaml
# job step name is empty
name: Release

jobs:
  test:
    name: Test
    steps:
      - name:
        run: echo hello world
incorrect
yaml
# job step name not a string
name: Release

jobs:
  test:
    name: Test
    steps:
      - name:
          - Test
incorrect
yaml
# one or more job step has no name
name: Release

jobs:
  test:
    name: Test
    steps:
      - name: Lint
        run: echo hello world
      - run: echo hello world
incorrect

🔧 Options

Nothing.

🚀 Version

This rule was introduced in eslint-plugin-github-action v0.0.6

🔍 Implementation