DEV Community

Saloni Saraiya
Saloni Saraiya

Posted on

Workflow to apply a Eslint check before merging the Pull Request

Submission Category: Maintainer Must-Haves

If you have a javascript based projects, then maintainers must check code quality through eslint checks before merging the PRs.

My Workflow

name: Check ESLint on Pull Request

on:
  pull_request:
    branches: [ main ]

jobs:
  fix:
    runs-on: ubuntu-latest
    steps:
      - name: Check out Git repository
        uses: actions/checkout@v2
      - name: installing eslint 
        run: npm i -g eslint
      - name: Fixing Files
        run: eslint . --ext .js --fix
Enter fullscreen mode Exit fullscreen mode

Top comments (1)

Collapse
 
ful1e5 profile image
Kaiz Khatri

πŸ₯·