From 2230b7d2203a475d14478bcae56b91604ebfcabb Mon Sep 17 00:00:00 2001 From: Matthew Tancik Date: Thu, 14 Jul 2022 09:49:27 -0700 Subject: [PATCH] Tancik/prettier on merge (#138) * Add prettier formatting to github action --- .github/workflows/prettier.yaml | 25 +++++++++++++++++++++++++ .gitignore | 5 ++++- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/prettier.yaml diff --git a/.github/workflows/prettier.yaml b/.github/workflows/prettier.yaml new file mode 100644 index 000000000..94b471ad6 --- /dev/null +++ b/.github/workflows/prettier.yaml @@ -0,0 +1,25 @@ +name: Prettier + +on: + pull_request: + branches: + - master + types: [closed] + +jobs: + prettier: + if: ${{ github.event.pull_request.merged }} + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + # Make sure the actual branch is checked out when running on pull requests + ref: ${{ github.head_ref }} + + - name: Prettify JS code + uses: creyD/prettier_action@v4.2 + with: + # This part is also where you can pass other options, for example: + prettier_options: --write ./pyrad/**/*.js diff --git a/.gitignore b/.gitignore index 1e57b649b..310a1c41b 100644 --- a/.gitignore +++ b/.gitignore @@ -178,4 +178,7 @@ temp* .nfs* external/ __MACOSX/ -outputs*/ \ No newline at end of file +outputs*/ +node_modules/ +yarn.lock +package.json \ No newline at end of file