Skip to content

Commit fa175c1

Browse files
authored
Add vue-tsc (#32601)
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.
1 parent 713364f commit fa175c1

File tree

3 files changed

+147
-4
lines changed

3 files changed

+147
-4
lines changed

Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,12 +377,12 @@ lint-backend-fix: lint-go-fix lint-go-vet lint-editorconfig
377377
.PHONY: lint-js
378378
lint-js: node_modules
379379
npx eslint --color --max-warnings=0 --ext js,ts,vue $(ESLINT_FILES)
380-
# npx tsc
380+
# npx vue-tsc
381381

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

387387
.PHONY: lint-css
388388
lint-css: node_modules
@@ -451,6 +451,10 @@ lint-templates: .venv node_modules
451451
lint-yaml: .venv
452452
@poetry run yamllint .
453453

454+
.PHONY: tsc
455+
tsc:
456+
npx vue-tsc
457+
454458
.PHONY: watch
455459
watch:
456460
@bash tools/watch.sh

package-lock.json

Lines changed: 139 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,8 @@
109109
"type-fest": "4.26.1",
110110
"updates": "16.4.0",
111111
"vite-string-plugin": "1.3.4",
112-
"vitest": "2.1.4"
112+
"vitest": "2.1.4",
113+
"vue-tsc": "2.1.10"
113114
},
114115
"browserslist": [
115116
"defaults"

0 commit comments

Comments
 (0)