Skip to content

Commit 55f4c5f

Browse files
committed
fix(tslint): also lint tsx blocks
1 parent 3cc23dc commit 55f4c5f

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
@@ -44,7 +44,7 @@ module.exports = function lint (args = {}, api, silent) {
4444
const parseTSFromVueFile = file => {
4545
const content = fs.readFileSync(file, 'utf-8')
4646
const { script } = vueCompiler.parseComponent(content, { pad: 'line' })
47-
if (script && script.lang === 'ts') {
47+
if (script && /^tsx?$/.test(script.lang)) {
4848
vueFileCache.set(file, {
4949
before: content.slice(0, script.start),
5050
after: content.slice(script.end)

0 commit comments

Comments
 (0)