Skip to content

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

Merged
FloEdelmann merged 13 commits intovuejs:masterfrom
waynzh:feat/add-auto-fix
Nov 11, 2024
Merged

feat(no-empty-component-block): support auto fix#2595
FloEdelmann merged 13 commits intovuejs:masterfrom
waynzh:feat/add-auto-fix

Conversation

@waynzh
Copy link
Copy Markdown
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
Copy Markdown
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!

Comment thread lib/rules/no-empty-component-block.js Outdated
@waynzh waynzh requested a review from ota-meshi November 11, 2024 08:23
Comment thread lib/rules/no-empty-component-block.js Outdated
Comment thread docs/rules/no-empty-component-block.md Outdated
Comment thread docs/rules/no-empty-component-block.md Outdated
waynzh and others added 2 commits November 11, 2024 17:16
Co-authored-by: Flo Edelmann <git@flo-edelmann.de>
Copy link
Copy Markdown
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
Comment thread lib/rules/no-empty-component-block.js Outdated
Copy link
Copy Markdown
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
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