Skip to content

Commit

Permalink
fix: fix tslint on vue file with no script
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Jul 27, 2018
1 parent ed0315a commit 6b91a13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/@vue/cli-plugin-typescript/lib/tslint.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ module.exports = function lint (args = {}, api, silent) {
const getSourceFile = program.getSourceFile
program.getSourceFile = function (file, languageVersion, onError) {
if (isVueFile(file)) {
const script = parseTSFromVueFile(file)
const script = parseTSFromVueFile(file) || ''
return ts.createSourceFile(file, script, languageVersion, true)
} else {
return getSourceFile.call(this, file, languageVersion, onError)
Expand Down

0 comments on commit 6b91a13

Please sign in to comment.