Skip to content

Add formatting and lint checks to CI #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 30, 2025
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