datasette/.github/workflows/prettier.yml
Simon Willison ffff3a4c53
Easier way to run Prettier locally (#1203)
Thanks, Ben Pickles - refs #1167
2021-01-24 17:41:46 -08:00

22 lines
534 B
YAML

name: Check JavaScript for conformance with Prettier
on: [push]
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('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-npm-
- name: Install dependencies
run: npm ci
- name: Run prettier
run: |-
npm run prettier -- --check