DEV Community

Cover image for Add Github Eslint Checker Action
Tony Zheng
Tony Zheng

Posted on

Add Github Eslint Checker Action

Add .github/workflows/eslint.yml file

Add this content

name: Lint
on:
  push:
    branches:
      - '*'
  pull_request:
    branches:
      - master
  workflow_dispatch:
jobs:
  ESlinter_JS:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Repository
        uses: actions/checkout@master
      - uses: actions/setup-node@v3
        with:
          node-version: '16.14.1'
      - name: Install Dependencies
        run: npm install

      - name: Run ESLint
        run: npm run eslint
Enter fullscreen mode Exit fullscreen mode

Top comments (0)