From a55e02d043be5b0199dd09eeaf7ead024643ef20 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Thu, 12 Sep 2019 08:53:34 -0400 Subject: [PATCH] Use prettier to check for the presence of its config file --- .emacs.d/init.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index c8b2414..ce2e7e7 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -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