.github/workflows/prettier.yml
name: Prettier
on:
pull_request:
branches:
- '*'
push:
branches:
- main
jobs:
prettier:
name: Prettier Check Action
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v4
with:
version: '20.x'
cache: 'npm'
- name: NPM Install
run: 'npm install --legacy-peer-deps'
- name: Run Prettier
run: 'npx prettier --check --fail-on-errors .'