Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 31 additions & 16 deletions .github/workflows/formatting.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,39 @@
name: Formatting Check

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

on:
pull_request:
branches: [main]
pull_request:
branches: [main]
paths:
- '**.js'
- '**.jsx'
- '**.ts'
- '**.tsx'
- '**.css'
- '**.scss'
- '**.md'
- '**.json'
- 'package.json'
- 'package-lock.json'

jobs:
format-check:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
format-check:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: "npm"
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: "npm"

- name: Install dependencies
run: npm ci
- name: Install dependencies
run: npm ci

- name: Run Prettier Check
run: npm run format:check || (echo "Code is not formatted! Run 'npm run format' locally." && exit 1)
- name: Run Prettier Check
run: npm run format:check
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
#!/bin/sh
npx lint-staged