| 1 |
name: Check JavaScript for conformance with Prettier |
| 2 |
|
| 3 |
on: [push] |
| 4 |
|
| 5 |
permissions: |
| 6 |
contents: read |
| 7 |
|
| 8 |
jobs: |
| 9 |
prettier: |
| 10 |
runs-on: ubuntu-latest |
| 11 |
steps: |
| 12 |
- name: Check out repo |
| 13 |
uses: actions/checkout@v7 |
| 14 |
- uses: actions/cache@v6 |
| 15 |
name: Configure npm caching |
| 16 |
with: |
| 17 |
path: ~/.npm |
| 18 |
key: ${{ runner.OS }}-npm-${{ hashFiles('**/package-lock.json') }} |
| 19 |
restore-keys: | |
| 20 |
${{ runner.OS }}-npm- |
| 21 |
- name: Install dependencies |
| 22 |
run: npm ci |
| 23 |
- name: Run prettier |
| 24 |
run: |- |
| 25 |
npm run prettier -- --check |