text: Emacs - Can't get Flymake to work with JSHint - Stack Overflow
  I'm trying to get JSHint to work with Flymake.
  jshint is indeed installed in /opt/bin and works. /opt/bin is in Emacs' exec-path.
  I've followed the directions on the EmacsWiki and have this in my init.el:
  (defun flymake-jshint-init ()
  (list "jshint" (list local-file))))
  (setq flymake-err-line-patterns
  (cons '("^  [[:digit:]]+ \\([[:digit:]]+\\),\\([[:digit:]]+\\): \\(.+\\)$"
  nil 1 2 3)
  flymake-err-line-patterns))
  '("\\.js\\'" flymake-jshint-init))
  When I open JavaScript files, my modeline appears as:
  [(Javascript Flymake* AC)]
  This is odd because the * usually doesn't appear when I'm using Flymake with C++ or Python. According to the Flymake docs, Flymake* means "Flymake is currently running." However, Flymake isn't showing any errors.
  I've checked the *Messages* buffer but it only lists a few lines of Fontifying foo.js... (regexps...................). No errors.
  emacs flymake jshint share|improve this question edited Oct 12 '11 at 22:43
  6,4921227
  11.6k977110
  Try using M-: to execute (setq flymake-log-level 3), which will cause flymake to print debug info into *Messages*.
  Here's how I use flymake with jslint, which works nicely for me -- that code might give you a clue about what's going wrong for you.
  You might also consider js2-mode, which provides some language-aware lint-like warnings without resorting to running an external process.
  share|improve this answer edited Oct 15 '11 at 11:08
  answered Oct 12 '11 at 9:42
  8,8662130
  I found a project called jshint-mode and tried that. It created a buffer called *jshint-mode* which revealed the error: JSHint couldn't find the formidable module.
  I ran M-x setenv in Emacs to set NODE_PATH so that jshint could find the formidable library. I also set NODE_PATH in /etc/profile.
  share|improve this answer answered Oct 11 '11 at 22:07
  jshint-mode did not work for me (I use Linux Mint 14 'Nadia') -- I was getting errors with "flymake's configuration" when it runs curl to talk to the Node.js instance running the jshint script. This was perplexing, and I'm not familiar with ELisp to go around messing with the .el files.
  I solved this by instead going straight to the Emacs flymake project fork on github which now has support for jshint built-in (it needs to be installed as npm -g install jshint which in turn requires you to install npm and node.js if you haven't already). This made things work.
  One more caveat: on my Linux box, node was an executable already existing in /usr/sbin and I had to make a symbolic link named node in /usr/local/bin to override the former. This was necessary as the Node.js binary for Linux Mint (possibly Ubuntu as well, I haven't checked) is named nodejs instead and will cause many scripts written assuming a binary name of node to fail. You can test this by typing node: if it is the pre-existing binary it generally returns to the prompt silently, but if it is Node.js it prompts you with a > (you can Ctrl-D to quit out of there)
  1,75421121
  Not the answer you're looking for?	Browse other questions tagged emacs flymake jshint or ask your own question.	asked