Add prettier workflow

follow up for #1501
This commit is contained in:
ligi 2022-08-27 19:21:22 +02:00
parent fb49612d70
commit 01a1a1ca7b
No known key found for this signature in database
GPG Key ID: 8E81894010ABF23D

22
.github/workflows/prettier.yml vendored Normal file
View File

@ -0,0 +1,22 @@
name: Check JavaScript for conformance with Prettier
on:
push:
pull_request:
jobs:
prettier:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v2
- uses: actions/cache@v2
name: Configure npm caching
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('**/workflows/prettier.yml') }}
restore-keys: |
${{ runner.os }}-npm-
- name: Run prettier
run: |-
npx prettier --check '_data/*/*.json'