blade-formatter icon indicating copy to clipboard operation
blade-formatter copied to clipboard

[Formatting Bug]: Arrays which have been aligned are formatted so they are no longer aligned

Open mattkingshott opened this issue 1 year ago • 1 comments

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

mattkingshott avatar May 03 '24 09:05 mattkingshott

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

github-actions[bot] avatar Jul 03 '24 01:07 github-actions[bot]

@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

shufo avatar Aug 13 '24 18:08 shufo

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

github-actions[bot] avatar Oct 13 '24 02:10 github-actions[bot]