Created
January 27, 2016 12:57
-
-
Save qoobaa/22c60eeb12ccb42a4563 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(add-hook 'js2-mode-hook 'qoobaa/js2-mode-setup) | |
(defun qoobaa/js2-mode-setup () | |
(let ((local-eslint (expand-file-name "node_modules/.bin/eslint" (projectile-project-root)))) | |
(when (file-exists-p local-eslint) | |
(setq flycheck-javascript-eslint-executable local-eslint) | |
(js2-mode-hide-warnings-and-errors) | |
(flycheck-mode t) | |
(flycheck-select-checker 'javascript-eslint)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment