Skip to content

Commit 6b91a13

Browse files
committed
fix: fix tslint on vue file with no script
1 parent ed0315a commit 6b91a13

File tree

1 file changed

+1
-1
lines changed
  • packages/@vue/cli-plugin-typescript/lib

1 file changed

+1
-1
lines changed

packages/@vue/cli-plugin-typescript/lib/tslint.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ module.exports = function lint (args = {}, api, silent) {
5858
const getSourceFile = program.getSourceFile
5959
program.getSourceFile = function (file, languageVersion, onError) {
6060
if (isVueFile(file)) {
61-
const script = parseTSFromVueFile(file)
61+
const script = parseTSFromVueFile(file) || ''
6262
return ts.createSourceFile(file, script, languageVersion, true)
6363
} else {
6464
return getSourceFile.call(this, file, languageVersion, onError)

0 commit comments

Comments
 (0)