Skip to content

Commit

Permalink
feat: add prettier for formatting (#151)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hellebore authored May 31, 2023
1 parent 232651f commit 654758d
Show file tree
Hide file tree
Showing 12 changed files with 5,513 additions and 979 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Check conformance with Prettier

on:
pull_request:

jobs:
prettier:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v2

- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.npm
key: npm-${{ hashFiles('package-lock.json') }}
restore-keys: npm-

- name: Install dependencies
run: npm ci --ignore-scripts

- name: Run prettier
run: |-
npm run lint:format
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
repos:
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.7.1
hooks:
- id: prettier
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Ignore everything:
/*

# Except src:
!/src
Loading

0 comments on commit 654758d

Please sign in to comment.