Rule family
Blade Rules
Blade rules focus on idiomatic Laravel template authoring: fewer raw PHP escapes, cleaner component structure, and fewer view-level bugs.
- Rules
- 35
- Auto-fixable
- 13
Enable blade-require-props under rules to
require every anonymous component to declare @props. See
Enabling an Optional Rule.
#Moving Off Older Syntax
Four rules modernize older Blade syntax. Run them together with the migration
preset:
php artisan sheath:lint --preset=migration --dry-run --dangerous
php artisan sheath:lint --preset=migration --fix --dangerous
- blade-prefer-component-tags -
@componentto<x-...> - blade-prefer-lang-helper -
@langto{{ __() }} - blade-prefer-endsection -
@stopto@endsection - blade-no-php-echo -
@php echoto{!! !!}
The individual rule pages explain which rewrites are dangerous and why.