Skip to content

Merge pull request #10 from pherval/snyk-upgrade-3296b4b3f484d641f5ac… #290

Merge pull request #10 from pherval/snyk-upgrade-3296b4b3f484d641f5ac…

Merge pull request #10 from pherval/snyk-upgrade-3296b4b3f484d641f5ac… #290

name: Formatting
on: [push]
jobs:
format-check:
runs-on: ${{matrix.os}}
strategy:
matrix:
node:
- "14.x"
os:
- windows-latest
- ubuntu-latest
- macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{matrix.node}}
- run: npm ci
- run: npm run format:check
format-fix:
runs-on: ubuntu-latest
needs: format-check
if: ${{ failure() }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- name: Prettify code
uses: creyD/[email protected]
with:
prettier_options: --write .
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}