Skip to content

crowdbotics/action-eslint

 
 

Repository files navigation

Action ESLint

GitHub Action that runs ESLint on files changed in a Pull Request.

Lint

Annotation

Usage

.github/workflows/lint.yml:

name: Lint

on:
  pull_request:
  push:
    branches:
      - master

jobs:
  eslint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-node@v3
        with:
          node-version: 16
      - run: npm ci # or yarn install
      - uses: sibiraj-s/action-eslint@v2
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }} # Optional
          eslint-args: '--ignore-path=.gitignore --quiet'
          extensions: 'js,jsx,ts,tsx'
          annotations: true

Security

For better security it is recommended to pin actions to a full length commit SHA.

Read more on using third-party actions

Known Issues

  • Yarn 2+ is not supported

Debugging

To enable debug logs, set secret ACTIONS_STEP_DEBUG to true. Refer docs more details https://docs.github.com/en/actions/managing-workflow-runs/enabling-debug-logging#enabling-step-debug-logging

About

✅ GitHub Action that runs ESLint on files changed in a Pull Request

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 95.7%
  • Shell 4.3%