Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
37 lines (29 sloc) 1.05 KB
;; use V8 Javascript to run JSLint for flymake
(require 'flymake)
(defcustom jslint-v8-shell (concat (getenv "HOME")
"Javascript V8 shell program"
:type 'string
:group 'jslint-v8)
(defcustom jslint-v8-location (concat (getenv "HOME")
"Location of jslint-v8"
:type 'string
:group 'jslint-v8)
(defun flymake-jslint-init ()
"Initialize flymake for jslint"
(let* ((temp-file (flymake-init-create-temp-buffer-copy
(list jslint-v8-shell
(list "-e" (concat "var input_filename = \"" temp-file "\"")
(concat jslint-v8-location "/jshint.js")
(concat jslint-v8-location "/v8shell.js")))))
(add-to-list 'flymake-allowed-file-name-masks
(add-to-list 'flymake-err-line-patterns
'("^Lint at line \\([[:digit:]]+\\) character \\([[:digit:]]+\\): \\(.+\\)$"
nil 1 2 3))
(provide 'flymake-jslint)
Jump to Line
Something went wrong with that request. Please try again.