-
Notifications
You must be signed in to change notification settings - Fork 12
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
Support Prettier v3 #125
Comments
For the time being I'm using this to use the version from the fork: (straight-use-package
'(prettier :pre-build (("npm" "install" "--frozen-lockfile") ("make" "dist/prettier-el.js.gz.base64") ("bash" "-c" "cp ./dist/* .")) :files (:defaults "*.js" "dist/*.base64" "prettier-pkg.el") ;; https://github.com/radian-software/straight.el/issues/621#issuecomment-716221459
:repo "asbish/prettier.el" :branch "support-for-prettier3" ) ;; https://github.com/jscheid/prettier.el/pull/124
) |
@kuba-orlik I ask because I don't personally use 'straight.el' to manage packages, and just grab the latest stable packages from MELPA with my Emacs config. Trying to use Prettier, but I'm getting the same exact 'TypeError: n.resolveConfig.sync is not a function' error after attempting to save a Typescript buffer with the 'Prettier.el' package. |
@kuba-orlik Probably will just hold off from using this until this gets fixed in the main branch of this project. |
I notice only now there's already a PR for it #124
Thanks!
Describe the bug
Prettier v3 has some breaking changes: https://prettier.io/blog/2023/07/05/3.0.0.html#api-1
Link to
M-x prettier-info
outputTo Reproduce
"prettier": "3.0.0"
prettier-mode
.json
,.ts[x]
file)*prettier-errors*
and the file not prettifiedExpected behavior
The file should be prettified with no error.
Additional context
I'm not sure what the relevant part of
prettier.el
are so let me know if more clues are necessary.Downgrading to v2.8.8, then restarting the
prettier
process removes the error on save with no surprise.The text was updated successfully, but these errors were encountered: