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: add option --component-prefix #943

Merged
merged 4 commits into from
Dec 22, 2024
Merged

feat: add option --component-prefix #943

merged 4 commits into from
Dec 22, 2024

Conversation

RayGuo-ergou
Copy link
Contributor

@RayGuo-ergou RayGuo-ergou commented Oct 10, 2024

Description

Add a new option componentPrefix for html attr format.

Related Issue

closes #942 closes #944

Motivation and Context

Due to currently only prefix of x- or livewire: treat as custom component and format html attr differently, thus for new libs like flux which uses prefix of flux:. The result of the format will cause a syntex error. e.g. :key="$foo - > bar"

How Has This Been Tested?

Both cli and formatter test cases added.

Screenshots (if appropriate):

@RayGuo-ergou RayGuo-ergou requested a review from shufo as a code owner October 10, 2024 04:27
@shufo
Copy link
Owner

shufo commented Oct 10, 2024

@RayGuo-ergou
Thanks for the PR! I'll review it shortly.

@RayGuo-ergou
Copy link
Contributor Author

Hi @shufo , just friendly pinging to see if you have a chance to review this PR.

@shufo
Copy link
Owner

shufo commented Oct 22, 2024

@RayGuo-ergou
Uh sorry, I'm currently silly busy on past week.
will make time in this weekend to check your PR will work on every platform.

@raz-iacob
Copy link

I would like this fix too! I just ran into this issue.

@shufo shufo changed the title feat: allow pass in component prefix feat: add option --component-prefix Dec 22, 2024
@shufo shufo merged commit 9f089a3 into shufo:main Dec 22, 2024
1 check passed
@shufo
Copy link
Owner

shufo commented Dec 22, 2024

Released on https://github.com/shufo/blade-formatter/releases/tag/v1.42.0 🚀 Thanks!

@RayGuo-ergou
Copy link
Contributor Author

Thank you!

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.

[Formatting Bug]: Livewire parameters broken after format [Feature]: Allow pass in component prefix
3 participants