fix(utils): also recognize .tsx files as Vue files by haoqunjiang · Pull Request #2565 · vuejs/eslint-plugin-vue (original) (raw)

I was testing eslint-config-vue integration with TypeScript projects.
I was surprised to find out that the rule vue/multi-word-component-names does not error on .tsx files, such as Foo.tsx, while it correctly showed errors for Foo.jsx and Foo.vue.

Digging into the rule source code I found that it's because isVueFile('Foo.tsx') always returns false:

eslint-plugin-vue/lib/rules/multi-word-component-names.js

Line 120 in2dc606c

utils.isVueFile(fileName) &&