Skip to content

Commit 72d76dc

Browse files
authored
Merge pull request #11 from cryspen/wysiwys/ci-format-lint-checks
Add formatting and lint checks to CI
2 parents 8df769c + 985a33a commit 72d76dc

File tree

3 files changed

+28
-2
lines changed

3 files changed

+28
-2
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Format and lint
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
7+
jobs:
8+
format:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- name: "install and check format"
13+
run: |
14+
npm install
15+
npm run format:check
16+
lint:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
- name: "install and lint"
21+
run: |
22+
npm install
23+
npm run lint

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
test/data
22
coverage
33
dist
4+
scripts/
45
**/*.md
56
**/*.txt
7+
**/*.sh
8+
**/*.yml

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"build": "tsc -p tsconfig.build.json",
99
"lint": "eslint '**/*.{ts,js}'",
1010
"fix": "eslint --fix '**/*.{ts,js}'",
11-
"format": "prettier -w **",
12-
"format:check": "prettier -c **",
11+
"format": "prettier -w .",
12+
"format:check": "prettier -c .",
1313
"test": "jest",
1414
"test:watch": "jest --watch",
1515
"coverage": "jest --coverage",

0 commit comments

Comments
 (0)