Files
supabase/.github/workflows/prettier.yml
T
Sara TavaresandHan Qiao fd8573529b chore(prettier): improve ci (#9947)
* Update prettier.yml

* Update DEVELOPERS.md

* Update prettier.yml

* Update DEVELOPERS.md

* Update .github/workflows/prettier.yml

Co-authored-by: Han Qiao <sweatybridge@gmail.com>
2022-12-28 21:29:57 +08:00

49 lines
1.4 KiB
YAML

name: Check Code with Prettier
on:
pull_request:
branches:
- 'master'
jobs:
format:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v2
# disable this check while we migrate to monorepo
- name: Run prettier
uses: EPMatt/reviewdog-action-prettier@v1
with:
github_token: ${{ secrets.github_token }}
reporter: github-pr-review
level: warning
command: npx prettier -c 'apps/**/*.{js,jsx,ts,tsx,css,md,json}'
# run: |-
# function run_check() {
# if $(grep -q '"prettier"' "$1") ; then
# pushd "$(dirname $1)"
# echo "Running prettier on $(pwd)"
# npx prettier -c '**/*.{js,jsx,ts,tsx,css,md,json}'
# popd
# fi
# }
# find . -type f -name 'package.json' ! -path '*node_modules*' -print0 | while IFS= read -r -d '' file; do
# run_check "$file"
# done
# i18n is not a node package, so we handle that one separately
format-i18n:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v2
- name: Run prettier
uses: EPMatt/reviewdog-action-prettier@v1
with:
github_token: ${{ secrets.github_token }}
reporter: github-pr-review
level: warning
command: npx prettier -c 'i18n/**/*.{js,jsx,ts,tsx,css,md,json}'