Skip to content

Commit 438f275

Browse files
authored
ci: shuffle a few things around (#250)
refactors our CI a bit: - don't use `--write` flag when running prettier in CI - splits out linting + tests
1 parent 862a48e commit 438f275

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ jobs:
2525
with:
2626
node-version: ${{ matrix.node-version }}
2727

28+
- run: npm cit
29+
30+
lint:
31+
runs-on: ubuntu-latest
32+
33+
steps:
34+
- uses: actions/checkout@v4
35+
2836
- run: npm ci
29-
- run: npm run build
30-
- run: npm test
37+
- run: npm run lint

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,12 @@
7070
"attw": "attw --pack --format table-flipped",
7171
"build": "tsup",
7272
"clean": "rm -rf dist/",
73-
"lint": "eslint . --ext .js,.cjs,.ts",
73+
"lint": "npm run lint:js && npm run prettier",
74+
"lint:js": "eslint . --ext .js,.cjs,.ts && prettier --check .",
7475
"prebuild": "npm run clean",
7576
"prepack": "npm run build",
76-
"pretest": "npm run lint && npm run prettier",
77-
"prettier": "prettier --list-different --write .",
77+
"prettier": "prettier --check .",
78+
"prettier:write": "prettier --check --write .",
7879
"test": "vitest run --coverage"
7980
},
8081
"dependencies": {

0 commit comments

Comments
 (0)