Skip to content

Commit

Permalink
chore(project): use vitest/globals types
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyckahn committed Nov 19, 2024
1 parent 04156dc commit 763a802
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
with:
node-version: 20
- run: npm ci
- run: npm run check:types
- run: npm test

- name: 'Build web app artifacts'
Expand Down
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ set -e

npx pretty-quick --staged
npm run lint
npm run check:types
CI=true npm test
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@
"test": "vitest",
"prepare": "husky install",
"prettier": "prettier \"**/*.{ts,tsx}\" --write",
"lint": "eslint src --max-warnings=0"
"lint": "eslint src --max-warnings=0",
"check:types": "tsc && echo \"No type errors.\""
},
"eslintConfig": {
"extends": [
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"paths": {
"trystero/torrent": ["../node_modules/trystero/src/torrent.d.ts"]
},
"types": ["vite-plugin-pwa/client", "vite/client"]
"types": ["vite-plugin-pwa/client", "vite/client", "vitest/globals"]
},
"include": ["src"]
}

0 comments on commit 763a802

Please sign in to comment.