我想在 emacs 中使用 jslint,所以我安装了包flymake-jslint
和flymake-cursor
. 我有非常简单的 javascript 文件:
/*global desc, task, jake, fail, complete */
"use strict";
task("example", function() {
var x = 5
console.log("asdf");
});
Flymake 正确突出显示var x = 5
,我进入Unused 'x'.
迷你缓冲区。但是,当我从命令行运行时jslint
,我得到:
$ 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
有没有办法配置flymake-jslint
给我显示那些非语法错误,比如“预期空间”?