Skip to content


flymake mode in javascript #21

mattharrison opened this Issue · 3 comments

2 participants


Flymake for js doesn't work out of the box. There's some hardcoded Windows paths in there.

I have a script that runs jslint, so I hooked that up. The regexes need to be updated for jslint as well....

diff --git a/elpa-to-submit/nxhtml/related/flymake-js.el b/elpa-to-submit/nxhtml/related/flymake-js.el
index 56aa571..73f5feb 100644
--- a/elpa-to-submit/nxhtml/related/flymake-js.el
+++ b/elpa-to-submit/nxhtml/related/flymake-js.el
@@ -87,6 +87,8 @@
;; These pattern are probably for Rhino:
("^js: \"\(.+\)\", line \([0-9]+\): \(.+\)$" 1 2 nil 3)
("^js: uncaught JavaScript \(.+\)$" nil nil nil 1)
+ ;; jslint
+ ("^Lint at line \([[:digit:]]+\) character \([[:digit:]]+\): \(.+\)$" nil 1 2 3)
;; These pattern are probably for SpiderMonkey:
("^\(.+\):\([0-9]+\): \(SyntaxError:.+\):$" 1 2 nil 3)
("^\(.+\):\([0-9]+\): \(strict warning: trailing comma.+\):$" 1 2 nil 3)
@@ -130,11 +132,14 @@ not figure out what buffers and processes to kill."
(lwarn 't :warning "Can't find rhino.js: %s" flymake-js-rhino-js))
((eq flymake-js-engine 'rhino)
- (list "java" (list "-jar" flymake-js-rhino-jar flymake-js-rhino-js local-file)))
- ((eq flymake-js-engine 'spidermonkey)
+ ;; (list "java" (list "-jar" flymake-js-rhino-jar flymake-js-rhino-js local-file)))
+ (list "" (list local-file)))
+ ((eq flymake-js-engine 'spidermonkey)
(list "js" (list "-s" local-file)))
- (error "Bad value: %s" flymake-js-engine)))))
+ (error "Bad value: %s" flymake-js-engine)))
+ ))

 (defun flymake-js-load ()
   (dolist (rec flymake-allowed-js-file-name-masks)

What would be the process for resolving this? I'm assuming we just need to package/include os neutral jslint.

Let me know what I can do to help.



Not sure if it helps, but there's this package of mine:


I'm on el-get now, but I'll check out your package. Thanks.


I used to use el-get too... now enjoying having everything in elpa, even though it meant I had to package up a bunch of stuff. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.