Use prettier to check for the presence of its config file
This commit is contained in:
parent
fc32bfa4bf
commit
a55e02d043
@ -903,7 +903,10 @@
|
|||||||
:init
|
:init
|
||||||
(defun prettier-js-mode-maybe ()
|
(defun prettier-js-mode-maybe ()
|
||||||
(interactive)
|
(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))))
|
(prettier-js-mode t))))
|
||||||
|
|
||||||
;;; Local Variables
|
;;; Local Variables
|
||||||
|
Loading…
Reference in New Issue
Block a user