Skip to content

Commit

Permalink
Add automated typechecking for PRs (#7)
Browse files Browse the repository at this point in the history
* Enable type checking

* Add GH action for typechecking
  • Loading branch information
rijkvanzanten authored Jun 19, 2023
1 parent 9158b9f commit 4834541
Show file tree
Hide file tree
Showing 4 changed files with 132 additions and 10 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/typecheck.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Check

on:
push:
branches:
- main
pull_request:
branches:
- main

concurrency:
group: check-${{ github.ref }}
cancel-in-progress: true

env:
NODE_OPTIONS: --max_old_space_size=6144

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Prepare
uses: ./.github/actions/prepare

- name: Run Typechecker
run: pnpm typecheck
3 changes: 3 additions & 0 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
devtools: { enabled: true },
typescript: {
typeCheck: true,
},
});
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"preview": "nuxt preview",
"postinstall": "nuxt prepare",
"lint": "eslint .",
"typecheck": "nuxt typecheck",
"format": "prettier --write \"**/*.{md,y?(a)ml,json,vue}\""
},
"devDependencies": {
Expand All @@ -20,7 +21,9 @@
"eslint-plugin-prettier": "4.2.1",
"eslint-plugin-vue": "9.14.1",
"nuxt": "3.5.2",
"prettier": "2.8.8"
"prettier": "2.8.8",
"typescript": "5.1.3",
"vue-tsc": "1.8.0"
},
"packageManager": "[email protected]",
"engines": {
Expand Down
104 changes: 95 additions & 9 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4834541

Please sign in to comment.