• Reading time ~ 1 min
  • 24.08.2022

Laravel Prose Linter is a package that provides syntax-aware proofreading for your Laravel application:

The Laravel Prose Linter helps you to polish the texts of your Laravel application. Let it check your translations and even your blade templates for typos, slang and get suggestions for a better writing style depending on which prose style you choose.

Prose Linter uses a Golang binary called Vale, a command-line tool that brings code-like linting to prose. Vale is a valuable package by itself, and Prose Linter leverages it to give you a clean CLI tool to check your Laravel Translations and Blade templates for prose linting:

Laravel Prose Linter CLI Output Example

Here are the available commands provided by Laravel Prose Linter:

# Lint blade templates
php artisan lint:blade
 
# Lint a single blade template
php artisan lint:blade auth.login
 
# Lint translations
php artisan lint:translation
 
# Lint specific translation namespace(s)
php artisan lint:translation auth validation

This package also comes with customizable style configuration, which you can configure via the config/linter.php file:

use Beyondcode\LaravelProseLinter\Styles\WriteGood;
use Beyondcode\LaravelProseLinter\Styles\Vale;
 
/*
 * Customize the Vale styles used by the linter.
 */
return [
    'styles' => [
        WriteGood::class,
        Vale::class
    ]
];

Check out the Vale Styles documentation for details on configuring styles to work with Vale. As you can see in the snippet above, Laravel Prose Linter comes with two default styles: write-good and vale.

To get started with this package, check out the official documentation for installation and usage instructions. You can check out the source code on GitHub.

Comments

No comments yet
Yurij Finiv

Yurij Finiv

Full stack

ABOUT

Professional Fullstack Developer with extensive experience in website and desktop application development. Proficient in a wide range of tools and technologies, including Bootstrap, Tailwind, HTML5, CSS3, PUG, JavaScript, Alpine.js, jQuery, PHP, MODX, and Node.js. Skilled in website development using Symfony, MODX, and Laravel. Experience: Contributed to the development and translation of MODX3 i...

About author CrazyBoy49z
WORK EXPERIENCE
Contact
Ukraine, Lutsk
+380979856297