Skip to content
| Marketplace
Sign in
Visual Studio Code>Formatters>Blade LinterNew to Visual Studio Code? Get it now.
Blade Linter

Blade Linter

ctf0

|
5,399 installs
| (1) | Free
blade simple linter via regex
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Blade Linter

simple linters rules for blade via regex.

Usage

  • open blade file and run Blade Linter: Lint

Rules

  • remove trailing , in array

    ['one','two',]

  • add space before directive round brace @..(

    @if (), @push (), ...

  • add new line after directive end

    @endphp, @endif, ...

  • add one space to each side of curly braces

    {!! $one !!}, {{ $one }}, {{-- $one --}}

  • add space after ,

    , ['one', $two]

  • surround || / && / ?? / => / ?: with one space

    $one || $two, $one && $two, $one ?? $two, ['k' => 'v'], $one ?: $two

  • surround ..?..:.. with one space

    isset($one) ? 'yes' : 'no'

  • surround --.--.-- with one space

    $one . '|' . $two

Notes

  • rules works as expected for my own needs, if u had any issues plz open a ticket.
  • this is more of a search and replace, not a global formatter.
  • u can test with the demo file

Issues

  • inline styles/javascript or font declaration might break, so watch out.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft