Skip to content

Commit

Permalink
Added ESLint workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
oumoussa98 committed Aug 19, 2023
1 parent ffcf113 commit 670bde2
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: ESLint Workflow

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
lint:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '20'

- name: Install Dependencies
run: npm install -g pnpm && pnpm install

- name: Run ESLint
run: pnpm run lint

- name: Check for auto-fix changes
run: |
changes=$(git status --porcelain)
if [ -n "$changes" ]; then
echo "ESLint auto-fix changes detected. Please fix them locally and push again."
exit 1
fi

0 comments on commit 670bde2

Please sign in to comment.