Closed westtrade closed 4 months ago
Thanks for creating the issue @westtrade I'll look into it.
To workaround, you can use @php
~ @endphp
directive.
$ ./bin/blade-formatter.js test.blade.php
@php
$employees_list = array_map(function ($employee) {
return [
'name' => $employee['name'],
'value' => $employee['id'],
];
}, $employees->toArray());
@endphp
or use --trailing-comma-php
option
$ yarn run prettier __tests__/fixtures/test.blade.php --trailing-comma-php=false
yarn run v1.22.19
$ prettier --plugin @shufo/prettier-plugin-blade __tests__/fixtures/test.blade.php --trailing-comma-php=false
@php(
$employees_list = array_map(function ($employee) {
return [
'name' => $employee['name'],
'value' => $employee['id']
];
}, $employees->toArray())
)
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
Version
@shufo/prettier-plugin-blade@1.14.1
Template before formatting
Template after formatting
Expected Behaviour
Don't touch PHP code at all
Relevant log output
No response