blade-formatter
blade-formatter copied to clipboard
[Formatting Bug]: Arrays which have been aligned are formatted so they are no longer aligned
Version
1.41.1
Template before formatting
@props([
'class' => '',
'path' => '',
])
Template after formatting
@props([
'class' => '',
'path' => '',
])
Expected Behaviour
I like to align attributes and values within arrays as they are more readable. I format them accordingly, but when saving the file, blade-formatter reverts to unaligned array.
Is there an option to disable this? I don't really want to have to use ignore blocks everywhere.
Relevant log output
No response
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days
@mattkingshott This package depends on prettier plugin-php for formatting php code and plugin-php does not support arrow alignment as the following issue's decision, so unfortunately it's difficult to support align arrow option sorry. https://github.com/prettier/plugin-php/issues/118
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days