From e88dc6c07d33e734c8059dfe4e01a8556ab8a5f8 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Wed, 6 Sep 2017 16:43:17 +0200 Subject: Emacs: hook up `standard` and `eslint` if available --- emacs/.emacs.d/main.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'emacs') diff --git a/emacs/.emacs.d/main.el b/emacs/.emacs.d/main.el index bb902583..2f7bf539 100644 --- a/emacs/.emacs.d/main.el +++ b/emacs/.emacs.d/main.el @@ -2296,7 +2296,12 @@ With prefix TO-CURRENT-BUFFER, insert command output into buffer." ;; #+BEGIN_SRC emacs-lisp (use-package add-node-modules-path :config (progn - (add-hook 'js2-mode-hook #'add-node-modules-path))) + (define-hook-helper js2-mode () + (add-node-modules-path) + (when (executable-find "eslint") + (setq flycheck-javascript-eslint-executable "eslint")) + (when (executable-find "standard") + (setq flycheck-javascript-standard-executable "standard"))))) ;; #+END_SRC ;; ***** Flow -- cgit 1.4.1