Use prettier to check for the presence of its config file

This commit is contained in:
Adam Goldsmith 2019-09-12 08:53:34 -04:00
parent fc32bfa4bf
commit a55e02d043

View File

@ -903,7 +903,10 @@
:init
(defun prettier-js-mode-maybe ()
(interactive)
(when (file-exists-p (concat (magit-toplevel) ".prettierrc"))
(when (not (string=
""
(shell-command-to-string
(concat "prettier --find-config-path " (buffer-file-name)))))
(prettier-js-mode t))))
;;; Local Variables