Skip to content

Commit

Permalink
enable nuxt typechecking
Browse files Browse the repository at this point in the history
  • Loading branch information
ftsell committed Nov 15, 2023
1 parent 576f292 commit 6fb7aaf
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
node-version: 18
- run: npm install -g pnpm
- run: pnpm install --prefer-frozen-lockfile
- run: pnpm exec nuxt prepare .playground
- run: python -m pip install pre-commit
- uses: actions/cache@v3
with:
Expand Down
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,9 @@ repos:
types_or: [ vue, ts, javascript ]
entry: "pnpm exec eslint"
args: [ "--fix", "--max-warnings=0" ]
- id: typecheck
name: typecheck
language: system
types_or: [ vue, ts, javascript ]
pass_filenames: false
entry: "pnpm run typecheck"
3 changes: 3 additions & 0 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ export default defineNuxtConfig({
modules: [
"@nuxt/ui",
],
typescript: {
typeCheck: true,
},
devtools: {enabled: true},
colorMode: {
classSuffix: "",
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@
"build": "nuxt build .playground",
"generate": "nuxt generate .playground",
"preview": "nuxt preview .playground",
"lint": "eslint ."
"lint": "eslint .",
"typecheck": "nuxt typecheck"
},
"devDependencies": {
"@nuxt/eslint-config": "^0.1.1",
"eslint": "^8.28.0",
"nuxt": "^3.6.2",
"typescript": "^4.9.3"
"typescript": "^4.9.5",
"vue-tsc": "^1.8.22"
},
"dependencies": {
"@nuxt/ui": "^2.10.0",
Expand Down

0 comments on commit 6fb7aaf

Please sign in to comment.