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
Open

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

RedBlueKoi opened this issue Sep 20, 2024 · 4 comments

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.

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

No branches or pull requests

2 participants