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

Laravel Prose Linter

Evaluating the results

CLI#

The linter outputs every hint with a minimum level of suggestion.

The linting results of blade templates and translations are both printed as a table in the CLI and may look like this:

~ php artisan lint:translation auth validation
πŸ—£  Start linting ...
 2/2 [β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“] 100%
+---------------------------------+------+----------+--------------------------------------------------------------------+----------+---------------------+
| Key.                            | Line | Position | Message                                                            | Severity | Condition           |
+---------------------------------+------+----------+--------------------------------------------------------------------+----------+---------------------+
| auth.throttle                   | 1    | 5        | 'many' is a weasel word!                                           | warning  | write-good.Weasel   |
| validation.accepted             | 1    | 21       | 'be accepted' may be passive voice. Use active voice if you can.   | warning  | write-good.Passive  |
[...]
+---------------------------------+------+----------+--------------------------------------------------------------------+----------+---------------------+
17 linting hints were found.
Applied styles: WriteGood, Vale
🏁 Finished linting in 8 seconds.

The result gives you a short overview which translations or blade templates were linted, how long linting took and which styles were applied. The table lists all linting hints with translation or template key and a position to find the respective sentence or word in the text.

JSON#

If you provide the --json flag in the command as stated above, the results file can be found in your applications storage folder. It will look a bit like this:

[
  [
    "auth.throttle",
    1,
    5,
    "'many' is a weasel word!",
    "warning",
    "write-good.Weasel"
  ]
]

The order of the array elements is the same as in the CLI output: Translation or template key, line, position, linting hint message, severity and the condition of the library that produced the hint.

Invoker

Instant admin panels for Laravel

Don’t waste time building admin panels for your Laravel applications. Let Invoker do the hard work for you. No coding. No setup. No stress.

Learn more
Invoker screenshot