Skip to content

Commit

Permalink
Add checkstyle based on yarn prettier:fix
Browse files Browse the repository at this point in the history
  • Loading branch information
TanPingZhi committed Sep 26, 2024
1 parent e9c1c30 commit 28afbde
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 5 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/pr-style-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: PR Style Check

on:
pull_request:
paths:
- 'frontend/**'

jobs:
style-check:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

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

- name: Install dependencies
run: yarn install
working-directory: ./frontend

- name: Run ESLint
run: yarn lint
working-directory: ./frontend

- name: Run Prettier check
run: yarn prettier --check .
working-directory: ./frontend
8 changes: 3 additions & 5 deletions frontend/components/questions/questions-listing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export default function QuestionListing() {
</Button>
</div>
);
}
};

const handleFileSelect = (event: ChangeEvent<HTMLInputElement>) => {
const file = event.target.files?.[0];
Expand Down Expand Up @@ -213,9 +213,7 @@ export default function QuestionListing() {
</Button>
</label>
</div>
<div>
{createNewQuestion()}
</div>
<div>{createNewQuestion()}</div>
</div>
)}
<QuestionTable
Expand All @@ -232,4 +230,4 @@ export default function QuestionListing() {
/>
</div>
);
}
}

0 comments on commit 28afbde

Please sign in to comment.