Skip to content

Commit f015cba

Browse files
committed
Better lint and format support
1 parent cc6863a commit f015cba

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ jobs:
1919
- uses: bahmutov/npm-install@v1
2020
with:
2121
install-command: yarn --immutable
22+
- name: Code quality
23+
run: make check
2224
- name: Unit Tests
2325
run: make test
2426
env:

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ test: ## Launch unit tests
1818
watch-test: ## Launch unit tests and watch for changes
1919
@yarn run watch-test
2020

21+
check: ## Lint and format the source code
22+
@yarn run check
23+
24+
lint: ## Lint the source code
25+
@yarn run lint
26+
2127
format: ## Format the source code
2228
@yarn run format
2329

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@
2727
],
2828
"license": "MIT",
2929
"scripts": {
30+
"check": "biome check",
3031
"format": "biome format --write src",
31-
"lint": "biome lint --apply src",
32+
"lint": "biome lint --write src",
3233
"precommit": "lint-staged",
3334
"test": "cross-env NODE_ENV=test vitest",
3435
"server": "node ./bin/json-graphql-server.js example/data.js",
@@ -41,8 +42,7 @@
4142
},
4243
"lint-staged": {
4344
"*.{js,jsx,ts,tsx}": [
44-
"biome lint --apply",
45-
"biome format --write"
45+
"biome check --write"
4646
]
4747
},
4848
"devDependencies": {

0 commit comments

Comments
 (0)