-
Notifications
You must be signed in to change notification settings - Fork 165
Add a prettier
for format
#59
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
Conversation
@@ -1,273 +1,810 @@ | |||
<!DOCTYPE html> | |||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}"> | |||
<head> | |||
<meta charset="utf-8"> | |||
<meta name="viewport" content="width=device-width, initial-scale=1"> | |||
<meta charset="utf-8" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we figure out how to prevent the formatter from adding />
to single tags like this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good except for the formatter changing things like:
<meta charset="utf-8">
to this:
<meta charset="utf-8" />
Can you figure out how to prevent that and then I think we can get this approved.
Appreciate it!
@@ -9,7 +9,8 @@ | |||
@custom-variant dark (&:where(.dark, .dark *)); | |||
|
|||
@theme { | |||
--font-sans: 'Instrument Sans', ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'; | |||
--font-sans: | |||
'Instrument Sans', ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Meh
autocomplete="email" | ||
placeholder="[email protected]" | ||
/> | ||
<flux:input wire:model="email" :label="__('Email address')" type="email" required autocomplete="email" placeholder="[email protected]" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for elements with many attributes is it not better to go on multiple lines? is there not a limit of characters per line?
@michaelnabil230, let me know if you can address the concerns above and we can move forward with this PR. Really appreciate it 👏 |
Hello @tnylea, Sorry for the delay in responding. After thoroughly investigating, I found that Prettier created this format to support HTML5. |
Even though it makes sense, browsers don't care about the self-closing tag at all />. |
Hello @xewl, It looks like |
I'm sorry, I assumed this was an option, as I've seen it on JS-side. This looks to be more in line with "Void Tags". ( Though (after looking around): Lots of issues on their plugin are around this topic, to be honest :/
Final note; |
Had the same result, sadly. |
This is something that we can add eventually to the Laravel ecosystem. Nuno Maduro actually has a draft open for Pint to add Blade formatting: laravel/pint#256. I'm sure he would appreciate any help on that front. I'm closing this for now. Please re-open if you wish to revisit it in the future. Appreciate it. |
This PR is for adding prettier to format the frontend.