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: enforce name casing for unregistered components #289

Merged
merged 1 commit into from Oct 18, 2023

Conversation

vaibhav11s
Copy link
Contributor

fix #288
added optional param for vue/component-name-in-template-casing

Description

vue/component-name-in-template-casing doesn't work when the component is global or auto-imported (like in nuxt).

Linked Issues

#288

Additional context

fix #288
added optional param for `vue/component-name-in-template-casing`
@antfu antfu merged commit ba704e7 into antfu:main Oct 18, 2023
5 checks passed
@qin-guan
Copy link
Contributor

Hey! Upgraded to the latest version with this change and found that it breaks camel case components which are imported within SFC itself, even though it is valid SFC syntax. For example, using framework7-vue where component names are prefixed with f7:

<script setup lang="ts">
	import { f7Button } from 'framework7-vue'
</script>

<template>
	<f7Button>Hello</f7Button>
</template>

It will get fixed to

<script setup lang="ts">
</script>

<template>
	<F7Button>Hello</F7Button>
</template>

Which is invalid. Should this change be reconsidered?

@antfu
Copy link
Owner

antfu commented Oct 28, 2023

In that case, I think we better revert it and find a better solution later. @qin-guan do you want to send a PR?

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.

vue/component-name-in-template-casing for auto-imported components
3 participants