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

prevent-abbreviations breaks code in Vue templates? #2005

Closed
KnifeFed opened this issue Dec 5, 2022 · 2 comments · Fixed by #2012
Closed

prevent-abbreviations breaks code in Vue templates? #2005

KnifeFed opened this issue Dec 5, 2022 · 2 comments · Fixed by #2012
Assignees
Labels

Comments

@KnifeFed
Copy link

KnifeFed commented Dec 5, 2022

It seems prevent-abbreviations can break code in Vue templates.

prevent-abbreviations

<template>
    <button @click="goToPrev"/>
</template>

<script setup>
const goToPrev = () => {
    // do something
}
</script>

Auto-fixing renames goToPrev to goToPrevious but doesn't change the reference in the Vue directive, breaking the execution.

Also, is there a way to only disable auto-fixing for this rule?

@KnifeFed
Copy link
Author

Alright, I guess I need to just disable this rule.

@fisker
Copy link
Collaborator

fisker commented Dec 12, 2022

Looks like there is no info for variables in template, so I'm going to remove the auto-fix for this case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants