Skip to content

Commit

Permalink
Add vue-tsc (#32601)
Browse files Browse the repository at this point in the history
As per https://vuejs.org/guide/typescript/overview#overview,
typescript's `tsc` does not support importing `.vue` files from `.ts`
files, so we need to use `vue-tsc` which patches in that support. Added
a convenience alias `make tsc` to run it.
  • Loading branch information
silverwind authored Nov 23, 2024
1 parent 713364f commit fa175c1
Show file tree
Hide file tree
Showing 3 changed files with 147 additions and 4 deletions.
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -377,12 +377,12 @@ lint-backend-fix: lint-go-fix lint-go-vet lint-editorconfig
.PHONY: lint-js
lint-js: node_modules
npx eslint --color --max-warnings=0 --ext js,ts,vue $(ESLINT_FILES)
# npx tsc
# npx vue-tsc

.PHONY: lint-js-fix
lint-js-fix: node_modules
npx eslint --color --max-warnings=0 --ext js,ts,vue $(ESLINT_FILES) --fix
# npx tsc
# npx vue-tsc

.PHONY: lint-css
lint-css: node_modules
Expand Down Expand Up @@ -451,6 +451,10 @@ lint-templates: .venv node_modules
lint-yaml: .venv
@poetry run yamllint .

.PHONY: tsc
tsc:
npx vue-tsc

.PHONY: watch
watch:
@bash tools/watch.sh
Expand Down
140 changes: 139 additions & 1 deletion package-lock.json

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

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@
"type-fest": "4.26.1",
"updates": "16.4.0",
"vite-string-plugin": "1.3.4",
"vitest": "2.1.4"
"vitest": "2.1.4",
"vue-tsc": "2.1.10"
},
"browserslist": [
"defaults"
Expand Down

0 comments on commit fa175c1

Please sign in to comment.