Skip to content

Commit

Permalink
Github CA (Formatting Check)
Browse files Browse the repository at this point in the history
  • Loading branch information
aishenreemo committed Aug 6, 2023
1 parent 7e6a2db commit 7a58d1c
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 7 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/format_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Format Check

on:
push:
branches:
- main
- format_ca
pull_request:
branches:
- main
- format_ca

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

steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Set up Node.js and pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- name: Format check on react-todo
run: cd packages/react-todo && pnpm install && pnpm run check
5 changes: 3 additions & 2 deletions packages/react-todo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"build": "vite build",
"lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview",
"format": "pnpm exec -- npx prettier --write ."
"format": "pnpm exec -- npx prettier --write .",
"check": "pnpm exec -- npx prettier --check ."
},
"dependencies": {
"react": "^18.2.0",
Expand All @@ -25,4 +26,4 @@
"prettier": "^3.0.1",
"vite": "^4.4.5"
}
}
}
3 changes: 2 additions & 1 deletion packages/svelte-todo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "prettier --plugin-search-dir . --check . && eslint .",
"format": "prettier --plugin-search-dir . --write .",
"prettier:check": "pnpm exec -- npx prettier --plugin-search-dir . --check .",
"test:integration": "playwright test",
"test:unit": "vitest"
},
Expand All @@ -33,4 +34,4 @@
"vitest": "^0.32.2"
},
"type": "module"
}
}
5 changes: 3 additions & 2 deletions packages/vanilla-todo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@
"dev": "vite",
"build": "vite build",
"preview": "vite preview",
"format": "pnpm exec -- npx prettier --write ."
"format": "pnpm exec -- npx prettier --write .",
"check": "pnpm exec -- npx prettier --check ."
},
"devDependencies": {
"vite": "^4.4.5"
}
}
}
5 changes: 3 additions & 2 deletions packages/vue-todo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"dev": "vite",
"build": "vue-tsc && vite build",
"preview": "vite preview",
"format": "pnpm exec -- npx prettier --write ."
"format": "pnpm exec -- npx prettier --write .",
"check": "pnpm exec -- npx prettier --check ."
},
"dependencies": {
"vue": "^3.3.4"
Expand All @@ -18,4 +19,4 @@
"vite": "^4.4.5",
"vue-tsc": "^1.8.5"
}
}
}

0 comments on commit 7a58d1c

Please sign in to comment.