- Make sure
eslintis installed and present on your emacs
exec-path. For Linux systems
exec-pathusually equals your
$PATHenvironment variable; for other systems, you're on your own.
- from MELPA:
M-x package-install [RET] flymake-eslint [RET]
- manually: download and place inside
~/.emacs or equivalent:
(add-to-list 'load-path "~/.emacs.d/lisp") (require "flymake-eslint.el")
(add-hook 'web-mode-hook ; or whatever the mode-hook is for your mode of choice (lambda () (flymake-eslint-enable)))
useful variables are members of the
flymake-eslint group and can be viewed and modified with the command
M-x customize-group [RET] flymake-eslint [RET].
(defcustom flymake-eslint-executable-name "eslint" "Name of executable to run when checker is called. Must be present in variable `exec-path'." :type 'string :group 'flymake-eslint) (defcustom flymake-eslint-executable-args nil "Extra arguments to pass to eslint." :type 'string :group 'flymake-eslint) (defcustom flymake-eslint-show-rule-name t "Set to t to append rule name to end of warning or error message, nil otherwise." :type 'boolean :group 'flymake-eslint)