DEV Community

Saloni Saraiya
Saloni Saraiya

Posted on

4 3

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

🥷

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay