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

does not respect prettier printWidth in overrides since v0.22.0 #2341

Closed
apasov opened this issue Mar 17, 2024 · 2 comments
Closed

does not respect prettier printWidth in overrides since v0.22.0 #2341

apasov opened this issue Mar 17, 2024 · 2 comments

Comments

@apasov
Copy link

apasov commented Mar 17, 2024

I have the following prettier config:

    "prettier": {
        "printWidth": 280,
        "semi": false,
        "singleQuote": true,
        "phpVersion": "8.2",
        "plugins": [
            "@prettier/plugin-php"
        ],
        "overrides": [
            {
                "files": [
                    "*.php"
                ],
                "options": {
                    "printWidth": 150,
                    "singleQuote": false
                }
            }
        ]
    },

Since v0.22.0 this plugin stopped respecting printWidth settings in overrides options and uses 280 instead. While singleQuote is respected correctly as it is set in overrides.

@apasov apasov changed the title does not respect prettier printwidth in overrides since v0.22.0 does not respect prettier printWidth in overrides since v0.22.0 Mar 17, 2024
@cseufert
Copy link
Collaborator

cseufert commented Apr 4, 2024

Can you provide some example code, before and after formatting?

@apasov
Copy link
Author

apasov commented Apr 5, 2024

It was my mistake. The plugin just started treating printWidth differently since v0.22.0
It does respect options set in overrides.

@apasov apasov closed this as completed Apr 5, 2024
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