Skip to content

Commit

Permalink
Merge pull request #10 from aloisklink/add-github-actions
Browse files Browse the repository at this point in the history
Add a basic GitHub actions for checking `prettier` formatting
  • Loading branch information
tbo47 authored Dec 5, 2022
2 parents c4493e5 + b27d81d commit 2478fdd
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: CI

on:
push:
pull_request:

jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci # throws an error if the package-lock.json file is out of sync
- name: Check for prettier errors (run `npm run format` to fix)
run: npx prettier --check .
4 changes: 4 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
singleQuote: true,
printWidth: 100,
};

0 comments on commit 2478fdd

Please sign in to comment.