mirror of
https://github.com/jimeh/.emacs.d.git
synced 2026-02-19 13:46:41 +00:00
fix(formatting/prettier): use prettier-pnp instead of prettier
As of v3.x prettier can no longer load plugins installed via npm globally. The prettier-pnp package/binary works around this by acting as a wrapper with more flexible support for loading plugins.
This commit is contained in:
@@ -19,6 +19,11 @@
|
||||
toml-ts-mode
|
||||
vue-mode) . siren-prettier-js-mode-enable)
|
||||
|
||||
:custom
|
||||
(prettier-js-command "prettier-pnp")
|
||||
(prettier-js-args '("--quiet"
|
||||
"--pnp" "prettier-plugin-toml"))
|
||||
|
||||
:preface
|
||||
(defun siren-prettier-js-mode-enable ()
|
||||
(prettier-js-mode t))
|
||||
@@ -26,7 +31,7 @@
|
||||
:config
|
||||
(let ((rc (expand-file-name "~/.prettierrc.js")))
|
||||
(if (file-exists-p rc)
|
||||
(setq prettier-js-args `("--config" ,rc)))))
|
||||
(add-to-list 'prettier-js-args `("--config" ,rc)))))
|
||||
|
||||
(provide 'siren-prettier-js)
|
||||
;;; siren-prettier-js.el ends here
|
||||
|
||||
Reference in New Issue
Block a user