Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/format-and-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Format and lint

on:
workflow_dispatch:
pull_request:

jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "install and check format"
run: |
npm install
npm run format:check
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "install and lint"
run: |
npm install
npm run lint
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
test/data
coverage
dist
scripts/
**/*.md
**/*.txt
**/*.sh
**/*.yml
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"build": "tsc -p tsconfig.build.json",
"lint": "eslint '**/*.{ts,js}'",
"fix": "eslint --fix '**/*.{ts,js}'",
"format": "prettier -w **",
"format:check": "prettier -c **",
"format": "prettier -w .",
"format:check": "prettier -c .",
"test": "jest",
"test:watch": "jest --watch",
"coverage": "jest --coverage",
Expand Down