I am dropping support for rhino.js and wsh.js because others have improved on them. If you have such an improvement, please add a record describing it. Thank you.Here is what the original rhino.js file looks like:
The actual GitHub that removed this file is located here:
The Rhino'd version on the jslint-utils is basically concatenating the fulljslint.js with a small wrapper program for the Rhino:
cat ./fulljslint.js ./rhino.js > ../rhinoed_jslint.jsThe version posted at
https://github.com/mikewest/jslint-utils/commit/6e854f564b517c696a35b72f93a69635bfc66ab3 has the following diff:
Adjust rhino.js - accept a 'realfilename' argument for the CSS munging that I'll put in later on. - change the defaults to what I consider a good baseline (documented inline)
var e, i, input, fileToParse, fileToDisplay, defaults; 15c15 < print("Usage: jslint.js file.js"); --- > print("Usage: jslint.js file.js [realfilename.js]");
In addition, it changes the JSLint output to be the following:
print('Lint at line ' + e.line + ' character ' + 47 + print('[' + fileToDisplay + '] Lint at line ' + e.line + ' character ' +
If you intend to use Flymake with Emacs, you have to check your flymake-jslint.el to change the regexp accordingly.
(setq flymake-err-line-patterns ; (cons '("^Lint at line \\([[:digit:]]+\\) character \\([[:digit:]]+\\): \\(.+\\)$" ; nil 1 2 3) (cons '("\\[\\(.*\\)\\] Lint at line \\([[:digit:]]+\\) character \\([[:digit:]]+\\): \\(.+\\)$" 1 2 3 4) flymake-err-line-patterns)) (provide 'flymake-jslint)
Page 362 of Learning GNU Emacs from the O'Reilly series and Stack Overflow article explains the reason for the double backslashes. Apparently Emacs needs one backslash when decoding/parsing the Lisp program, and another when creating the regular expression character. Basically the regular expression extracts the file displayed with the \\[ and \\] groupings, and then we extract the filename within it.