Skip to content

Commit 84b1f8b

Browse files
authored
Merge pull request #3 from CS3219-AY2526Sem1/create-lint-workflow
Add ci workflow for checking formatting and syntax errors
2 parents 2ce559e + fa6c1b3 commit 84b1f8b

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

.github/workflows/lint.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Lint CI
2+
on:
3+
pull_request:
4+
branches:
5+
- master
6+
7+
jobs:
8+
check-lint:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
13+
- uses: actions/setup-node@v4
14+
with:
15+
node-version: '20'
16+
cache: 'npm'
17+
18+
- run: npm ci
19+
20+
- run: npm run lint
21+
22+
- run: npm run format

frontend/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
"dev": "next dev --turbopack",
77
"build": "next build --turbopack",
88
"start": "next start",
9-
"lint": "eslint"
9+
"lint": "next lint",
10+
"format": "prettier --check .",
11+
"format:fix": "prettier --write ."
1012
},
1113
"dependencies": {
1214
"react": "19.1.0",

0 commit comments

Comments
 (0)