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

feat(no-empty-component-block): support auto fix #2595

Merged
merged 13 commits into from
Nov 11, 2024

Conversation

waynzh
Copy link
Member

@waynzh waynzh commented Nov 3, 2024

resolve #2564
Add support for automatically deleting empty blocks.

Chose this approach is because I couldn't find a better way to handle reporting & fixing each emptyBlock within a for loop, as removing the first block will affect the range of the second block😵‍💫.
UPDATE: Due to lack of whitespaces in test cases.

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 for this PR!

lib/rules/no-empty-component-block.js Outdated Show resolved Hide resolved
@waynzh waynzh requested a review from ota-meshi November 11, 2024 08:23
docs/rules/no-empty-component-block.md Outdated Show resolved Hide resolved
docs/rules/no-empty-component-block.md Outdated Show resolved Hide resolved
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.

LGTM! Thank you!

@waynzh waynzh changed the title feat(no-empty-component-block): add autofix option feat(no-empty-component-block): support auto fix Nov 11, 2024
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.

LGTM now. Thanks @waynzh!

@FloEdelmann FloEdelmann merged commit b779f88 into vuejs:master Nov 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.

autofix for vue/no-empty-component-block
3 participants