Skip to content

Commit 654758d

Browse files
authored
feat: add prettier for formatting (#151)
1 parent 232651f commit 654758d

File tree

12 files changed

+5513
-979
lines changed

12 files changed

+5513
-979
lines changed

.github/workflows/ci.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Check conformance with Prettier
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
prettier:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Check out repo
11+
uses: actions/checkout@v2
12+
13+
- name: Cache dependencies
14+
uses: actions/cache@v2
15+
with:
16+
path: ~/.npm
17+
key: npm-${{ hashFiles('package-lock.json') }}
18+
restore-keys: npm-
19+
20+
- name: Install dependencies
21+
run: npm ci --ignore-scripts
22+
23+
- name: Run prettier
24+
run: |-
25+
npm run lint:format

.pre-commit-config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/mirrors-prettier
3+
rev: v2.7.1
4+
hooks:
5+
- id: prettier

.prettierignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Ignore everything:
2+
/*
3+
4+
# Except src:
5+
!/src

0 commit comments

Comments
 (0)