Skip to content

Commit 670bde2

Browse files
authored
Added ESLint workflow
1 parent ffcf113 commit 670bde2

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/eslint.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: ESLint Workflow
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
lint:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout Repository
17+
uses: actions/checkout@v2
18+
19+
- name: Setup Node.js
20+
uses: actions/setup-node@v2
21+
with:
22+
node-version: '20'
23+
24+
- name: Install Dependencies
25+
run: npm install -g pnpm && pnpm install
26+
27+
- name: Run ESLint
28+
run: pnpm run lint
29+
30+
- name: Check for auto-fix changes
31+
run: |
32+
changes=$(git status --porcelain)
33+
if [ -n "$changes" ]; then
34+
echo "ESLint auto-fix changes detected. Please fix them locally and push again."
35+
exit 1
36+
fi

0 commit comments

Comments
 (0)