summary refs log tree commit diff stats
path: root/emacs/.emacs.d
diff options
context:
space:
mode:
authorAlan Pearce2017-10-18 12:35:31 +0200
committerAlan Pearce2017-10-18 12:35:31 +0200
commit51fc99f1e180a30c2a7bc21517b41009fbb72f3f (patch)
treeafee37579f73890d7c5ede652689ca14d420d30d /emacs/.emacs.d
parentee14f070df766bddd8710124dbcfc2737422882d (diff)
downloadnixfiles-51fc99f1e180a30c2a7bc21517b41009fbb72f3f.tar.lz
nixfiles-51fc99f1e180a30c2a7bc21517b41009fbb72f3f.tar.zst
nixfiles-51fc99f1e180a30c2a7bc21517b41009fbb72f3f.zip
Emacs: Fix flycheck setup in js2-mode
Diffstat (limited to 'emacs/.emacs.d')
-rw-r--r--emacs/.emacs.d/main.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/emacs/.emacs.d/main.el b/emacs/.emacs.d/main.el
index 80ff2d5a..b4ddd664 100644
--- a/emacs/.emacs.d/main.el
+++ b/emacs/.emacs.d/main.el
@@ -2092,13 +2092,14 @@ With prefix TO-CURRENT-BUFFER, insert command output into buffer."
 (use-package add-node-modules-path
   :config (progn
             (define-hook-helper js2-mode ()
+              :name node-modules-flycheck
               (add-node-modules-path)
               (when (executable-find "eslint")
-                (setq flycheck-javascript-eslint-executable "eslint"))
+                (setq-local flycheck-javascript-eslint-executable (executable-find "eslint")))
               (when (executable-find "prettier-standard")
-                (setq flycheck-javascript-standard-executable "prettier-standard"))
+                (setq-local flycheck-javascript-standard-executable (executable-find "prettier-standard")))
               (when (executable-find "standard")
-                (setq flycheck-javascript-standard-executable "standard")))))
+                (setq-local flycheck-javascript-standard-executable (executable-find "standard"))))))
 
 ;;;;;;; Flow