blade-parser-typescript icon indicating copy to clipboard operation
blade-parser-typescript copied to clipboard

useLaravelPint

Open OlyaK95 opened this issue 1 year ago • 5 comments

I have three files:

  • .prettierrc
{
    "plugins": ["@prettier/plugin-php", "prettier-plugin-blade", "prettier-plugin-tailwindcss"],
    "overrides": [
        {
            "files": ["*.php"],
            "options": {
                "parser": "php"
            }
        },
        {
            "files": ["*.blade.php"],
            "options": {
                "parser": "blade"
            }
        }
    ]
}
  • .blade.format.json
{
    "useLaravelPint": true
}
  • pint.json
{
    "preset": "psr12"
}

When I run command like bunx prettier resources/ --write I have no Laravel Pint ouput. Why?

OlyaK95 avatar Sep 27 '24 10:09 OlyaK95

I have no Laravel Pint ouput.

Do you see any files formatted/etc. at all? The pint output generally is not output directly with the way it has been integrated, as its only applied inside directives and PHP blocks within Blade files.

JohnathonKoster avatar Sep 27 '24 13:09 JohnathonKoster

I have no Laravel Pint ouput.

Do you see any files formatted/etc. at all? The pint output generally is not output directly with the way it has been integrated, as its only applied inside directives and PHP blocks within Blade files.

Yes, I see that Prettier working, but I don't know this about Laravel Pint. 2024-09-27_18-04-09

OlyaK95 avatar Sep 27 '24 15:09 OlyaK95

I have no Laravel Pint ouput.

Do you see any files formatted/etc. at all? The pint output generally is not output directly with the way it has been integrated, as its only applied inside directives and PHP blocks within Blade files.

I set laravel preset in pint.json and do some tests on routes/web.php file. When I run only Pint I have single quotes. When I run Prettier I have double qoutes. I think Prettier don't run Pint.

OlyaK95 avatar Sep 27 '24 15:09 OlyaK95

Hm interesting. I'll need to experiment and see what could be going on. Thanks for providing the config files!

JohnathonKoster avatar Sep 27 '24 15:09 JohnathonKoster

Hm interesting. I'll need to experiment and see what could be going on. Thanks for providing the config files!

Maybe issue about Windows OS? For example, I run Pint with the command "./vendor/bin/pint", not the ./vendor/bin/pint. Only my guess.

OlyaK95 avatar Sep 28 '24 07:09 OlyaK95