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

Add limitation for wp-prettier v3.0 #195

Merged
merged 2 commits into from Dec 13, 2023
Merged

Conversation

ingeniumed
Copy link
Contributor

Description

At the moment, wp-prettier v3.0 causes the following problem to occur:

TypeError: prettier.resolveConfig.sync is not a function
Occurred while linting <redacted path to the code>/.eslintrc.js:1
Rule: "prettier/prettier"
    at Program (<redacted path to the code>/node_modules/eslint-plugin-prettier/eslint-plugin-prettier.js:138:40)

This is because of this PR that removed supported for that function entirely in prettier. There have been updates made to eslint-plugin-prettier that should resolve it, but there could be additional dependencies that need updating/fixing as well. That might take some time to do in order to support v3.0 of wp-prettier.

In the meantime, I have made this small change to the README to ensure someone else doesn't run into this like me.

I'll try and spend some time in fixing this, this week or the next.

Replicating instructions

Follow the readme, including installing the latest wp-prettier version and lint your code. You will run into the same problem as me.

@ingeniumed ingeniumed self-assigned this Dec 13, 2023
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@chriszarate chriszarate merged commit aa9df6a into trunk Dec 13, 2023
3 checks passed
@chriszarate chriszarate deleted the update/readme-for-prettier branch December 13, 2023 02:48
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

Successfully merging this pull request may close these issues.

None yet

2 participants