From 51fc99f1e180a30c2a7bc21517b41009fbb72f3f Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Wed, 18 Oct 2017 12:35:31 +0200 Subject: Emacs: Fix flycheck setup in js2-mode --- emacs/.emacs.d/main.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'emacs/.emacs.d/main.el') 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 -- cgit 1.4.1