I want to use jslint in emacs, so I installed package flymake-jslint
and flymake-cursor
.
I have really simple javascript file:
/*global desc, task, jake, fail, complete */
"use strict";
task("example", function() {
var x = 5
console.log("asdf");
});
Flymake properly highlights var x = 5
and I get Unused 'x'.
in mini buffer. However, when I run jslint
from command line, I get:
$ jslint jakefile.js
jakefile.js
#1 Expected exactly one space between 'function' and '('.
task("example", function() { // Line 3, Pos 25
#2 Expected ';' and instead saw 'console'.
var x = 5 // Line 4, Pos 14
#3 Unused 'x'.
var x = 5 // Line 4, Pos 9
Is there a way to configure flymake-jslint
to show me those non syntax error, like "Expected space"?
I've found the answer :)
There is config variable called
flymake-jslint-args
. When i rundescribe-variable
it showed me something like this:All those command line arguments are types of errors, that will be ignored while running jslint, so I've set this variable to
()
.and now I get all the errors, like I wanted.