Skip to content

Commit 6725282

Browse files
committed
enhance lint and format checking
1 parent 1405e27 commit 6725282

1 file changed

Lines changed: 30 additions & 5 deletions

File tree

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,35 @@
1-
name: Lint & Format
1+
name: Lint & Format Check
22

3-
on: workflow_dispatch
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
pull_request:
7+
branches: [ main, develop ]
48

59
jobs:
6-
demo:
10+
lint:
711
runs-on: ubuntu-latest
12+
813
steps:
9-
- name: Lint and Format running
10-
run: echo "✅ This workflow is active: lint-and-format"
14+
- name: Checkout code
15+
uses: actions/checkout@v3
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v3
19+
with:
20+
node-version: '18'
21+
cache: 'npm'
22+
23+
- name: Install dependencies
24+
run: npm ci
25+
26+
- name: Run ESLint
27+
run: npm run lint --if-present
28+
continue-on-error: true
29+
30+
- name: Check code formatting
31+
run: npm run format:check --if-present
32+
continue-on-error: true
33+
34+
- name: Lint Check Success
35+
run: echo "✅ Code quality checks completed!"

0 commit comments

Comments
 (0)