vscode-blade-formatter
                                
                                 vscode-blade-formatter copied to clipboard
                                
                                    vscode-blade-formatter copied to clipboard
                            
                            
                            
                        Alphabetical HTML attribute sorting with Blade directives issue
Code
<input @unless ($hasMask())
           {{ $applyStateBindingModifiers('wire:model') }}="{{ $getStatePath() }}"
           type="{{ $getType() }}"
       @else
           x-data="textInputFormComponent({
               {{ $hasMask() ? "getMaskOptionsUsing: (IMask) => ({$getJsonMaskConfiguration()})," : null }}
               state: $wire.{{
                   $isLazy() ?
                       'entangle(\'' . $getStatePath() . '\').defer' :
                       $applyStateBindingModifiers('entangle(\'' . $getStatePath() . '\')')
               }},
           })"
           type="text"
           wire:ignore
           @if ($isLazy()) x-on:blur="$wire.$refresh" @endif
           {{ $getExtraAlpineAttributeBag() }}
       @endunless />
Formatted
<input @endunless
   {{ $getExtraAlpineAttributeBag() }}
   @unless($hasMask()) {{ $applyStateBindingModifiers('wire:model') }}="{{ $getStatePath() }}"
           type="{{ $getType() }}"
       @else
           x-data="textInputFormComponent({
               {{ $hasMask() ? "getMaskOptionsUsing: (IMask) => ({$getJsonMaskConfiguration()})," : null }}
               state: $wire.{{ $isLazy()
                   ? 'entangle(\'' . $getStatePath() . '\').defer'
                   : $applyStateBindingModifiers('entangle(\'' . $getStatePath() . '\')') }},
           })"
           type="text"
           wire:ignore
           @if ($isLazy()) x-on:blur="$wire.$refresh" @endif />
Note
It seems that there are more issues than just the HTML sorting with the provided code sample, and that are alignment (wrapAttributes) related...
If you could, please check out the Blade views in Filament packages, which aim to exploit the tall-stack and Laravel Blade to the core! -Infinite testing samples, pretty much! 🙂