Skip to content
This repository has been archived by the owner on Feb 21, 2024. It is now read-only.

Commit

Permalink
CircleCI: Generate types for eslint
Browse files Browse the repository at this point in the history
I stumbled upon this issue here when searching for what to do when PageData
types are not created:

sveltejs/kit#5940

The solution is to run svelte-kit sync. I have added a small helper to our
package.json and I call it from the CircleCI check:eslint step.

Also including this in our bisect helper
  • Loading branch information
justuswilhelm committed Sep 4, 2023
1 parent 6a55d90 commit e1514e5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ jobs:
key: npm-cache-v1-{{ checksum "package-lock.json" }}
paths:
- ~/.npm
- run:
name: Generate type information
command: npm run sync-types
- run:
name: Run eslint
command: npm run check:eslint
Expand Down
2 changes: 2 additions & 0 deletions bin/git-helper
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash
set -e
echo Aligning star charts
npm run sync-types
echo Finding fixpoint...
npm run fix
echo Inverting matrices...
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"check:prettier": "prettier --ignore-path .gitignore --check --cache --cache-strategy metadata .",
"check:svelte-check": "svelte-check --tsconfig tsconfig.json --diagnostic-sources js,svelte",
"check:knip": "knip",
"sync-types": "svelte-kit sync",
"format": "npm run fix:prettier",
"fix": "npm run fix:prettier && npm run fix:eslint",
"fix:eslint": "eslint . --fix --cache --ext .ts,.js,.svelte src",
Expand Down

0 comments on commit e1514e5

Please sign in to comment.