Tinkerwell 4 is out now! Get the most popular PHP Scratchpad application. Learn more

Laravel Prose Linter

Usage

The package includes a default configuration of the linter based on the Vale and the WriteGood styles, so that you can start linting right away!

The linter supports two different modes: translation linting and blade template linting.

Linting#

Blade templates#

To lint all blade templates of your project, call the following command from your project root:

~ php artisan lint:blade

Linting all templates of your app can take a while, so it will ask you for confirmation before it starts.

As an alternative, you can lint either a single blade template by providing the template key just like you would inside laravel:

~ php artisan lint:blade auth.login

Or you exclude one or several view directories by using the --exclude option:

~ php artisan lint:blade --exclude=auth,vendor

Translations#

If you want to lint all translations of your application, open up your CLI in the Laravel project root and execute the following command:

~ php artisan lint:translation

This can be quite time-consuming for big applications, so if you want to restrict the linting to a certain namespace*, provide it as a parameter:

~ php artisan lint:translation auth

If you want to lint the translations of multiple namespaces, add them as further parameters:

~ php artisan lint:translation auth passwords pagination
  • A translation namespace in Laravel is the name file of the file before the file extension where the translation array is returned. For example: The translations of the passwords namespace are located in resources/lang/en/passwords.php .

Output#

Instead of evaluating the results in the CLI as a table you for further processing or storing by appending a --json flag to the command:

~ php artisan lint:translation --json

The result file will be saved in the storage folder of your application.

DevTools for Tailwind

Tailwind CSS deserves proper DevTools with Intellisense autocompletion and the full JIT engine in your browser.

Get the DevTools