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

feat!: support prettier 3.0 #165

Merged
merged 1 commit into from
Jan 15, 2024
Merged

Conversation

mgabeler-lee-6rs
Copy link
Contributor

@mgabeler-lee-6rs mgabeler-lee-6rs commented Jul 7, 2023

This seems to work for me, but I haven't been able to test if fully

Fixes #164

bin/pretty-quick.js Show resolved Hide resolved
buu700 added a commit to cyph/pretty-quick that referenced this pull request Jul 20, 2023
@lukeapage
Copy link
Contributor

lukeapage commented Jul 24, 2023

I get this issue when using this branch (note - I do not use flow)

image

@lukeapage
Copy link
Contributor

ok sorry,

When I have a failing prettier file, if I leave off --check I get the above exception.

But when I add the check param then it says there are no issues, even though there are.

probably because isFormatted returned from prettier.check is now a promise

@JaKXz
Copy link

JaKXz commented Jan 4, 2024

Curious if anyone has published this branch (or would be interested in a forked publish as v2.0.0) of this? @mgabeler-lee-6rs I'm happy to help with that, or you could publish it under your npm namespace - totally up to you!

@mgabeler-lee-6rs
Copy link
Contributor Author

@JaKXz I've put this on hold because, while this allows pretty-quick to run the new version of prettier for me, the new version of prettier itself is currently unusable for my team due to problems with monorepos -- prettier/prettier#15025

If you want to use my branch to publish a variant with the fixes from here, and take a stab at fixing lukeapage's issue above, I have no objections, this is all open source after all :)

@lukeapage
Copy link
Contributor

I published the fix on npm - @lukeapage/pretty-quick

@JounQin
Copy link
Member

JounQin commented Jan 15, 2024

I'll take over @azz's place and help to maintain this package in few days. 🍻

@JounQin JounQin changed the title feat: support prettier 3.0 feat!: support prettier 3.0 Jan 15, 2024
@JounQin JounQin merged commit c6d8543 into prettier:master Jan 15, 2024
@JounQin
Copy link
Member

JounQin commented Jan 16, 2024

I'm trying to migrate this package to pure ESM but failed due to testing issues, jest does not support ESM well yet, vitest does not support support inspecting core modules (not sure).

So I'll keep it as commonjs currently, and will try to migrate to dual package later.


OK, related to tschaub/mock-fs#380

@JounQin
Copy link
Member

JounQin commented Jan 16, 2024

I have to reset this PR because it is full of bugs actually...

I'll rewrite the whole package with TypeScript.

@bennycode
Copy link

When using prettier v3.2.5 along with pretty-quick v4.0.0 then I am still getting this error:

TypeError: prettier.resolveConfig.sync is not a function

Logs: https://github.com/bennycode/trading-signals/actions/runs/8104997828/job/22152606896?pr=651

Any updates on this, @JounQin?

@JounQin
Copy link
Member

JounQin commented Apr 16, 2024

You need upgrade eslint-plugin-prettier.

@bennycode
Copy link

Thank you!! I upgraded from eslint-plugin-prettier v4.2.1 to eslint-plugin-prettier v5.0.1 and it worked. 🥳

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.

pretty-quick will break with prettier v3
7 participants