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

autofix for vue/no-empty-component-block #2564

Open
RedBlueKoi opened this issue Sep 20, 2024 · 4 comments · May be fixed by #2595
Open

autofix for vue/no-empty-component-block #2564

RedBlueKoi opened this issue Sep 20, 2024 · 4 comments · May be fixed by #2595

Comments

@RedBlueKoi
Copy link

RedBlueKoi commented Sep 20, 2024

What rule do you want to change?

  • Rule to change is vue/no-empty-component-block

Does this change cause the rule to produce more or fewer warnings?

  • This change would not change the amount of errors/warnings

How will the change be implemented? (New option, new default behavior, etc.)?

  • Preferably default behaviour

Please provide some example code that this change will affect:

<script setup lang="ts">
  defineProps<{...}>()
</script>

<template>
  <h1>My awesome title</h1>
</template>

<style scoped lang="postcss"></style>

What does the rule currently do for this code?

  • Currently the rule marks the style tag as an error, but you would have to remove it manually

What will the rule do after it's changed?

  • After change eslint will be able to remove the style tag with pnpm eslint --fix

Additional context

@FloEdelmann
Copy link
Member

PRs welcome!

@RedBlueKoi
Copy link
Author

@FloEdelmann got you, let me see if I can pull it off

@RedBlueKoi
Copy link
Author

PRs welcome!

Do you maybe have an example that I can reference?

@FloEdelmann
Copy link
Member

FloEdelmann commented Sep 20, 2024

Nice! I think vue/block-order might have a similar autofix. Please also add test cases.

@waynzh waynzh linked a pull request Nov 3, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants