Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

useLaravelPint #117

Open
OlyaK95 opened this issue Sep 27, 2024 · 5 comments
Open

useLaravelPint #117

OlyaK95 opened this issue Sep 27, 2024 · 5 comments

Comments

@OlyaK95
Copy link

OlyaK95 commented Sep 27, 2024

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?

@JohnathonKoster
Copy link
Contributor

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.

@OlyaK95
Copy link
Author

OlyaK95 commented Sep 27, 2024

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
Copy link
Author

OlyaK95 commented Sep 27, 2024

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.

@JohnathonKoster
Copy link
Contributor

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

@OlyaK95
Copy link
Author

OlyaK95 commented Sep 28, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants