forked from supabase/supabase
-
Notifications
You must be signed in to change notification settings - Fork 10
39 lines (36 loc) · 1.11 KB
/
Copy pathprettier.yml
File metadata and controls
39 lines (36 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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
run: |-
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
run: |-
npx prettier -c 'i18n/**/*.{js,jsx,ts,tsx,css,md,json}'