Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(utils): also recognize .tsx files as Vue files #2565

Merged
merged 2 commits into from
Oct 11, 2024

Conversation

haoqunjiang
Copy link
Member

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:

utils.isVueFile(fileName) &&

@FloEdelmann
Copy link
Member

Could you please add a test case?

@haoqunjiang
Copy link
Member Author

Thanks for the feedback!
Initially, I didn't know there were corresponding tests for this simple utility function.
Now I've found them and added the TSX case.

Copy link
Member

@FloEdelmann FloEdelmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thank you!

Copy link
Member

@ota-meshi ota-meshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@ota-meshi ota-meshi merged commit a91ae04 into vuejs:master Oct 11, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants