【发布时间】:2013-01-06 14:36:06
【问题描述】:
现在我有以下代码:
if (c > last) break;
而 jslint 抱怨
jslint:crud.js:69:19:Expected '{' and instead saw 'break'.
有几种方法可以克服它:
if (c > last) { break; }
或
if (c > last) {
break;
}
但我希望 jslint 在 if 语句在同一行时不要抱怨。
有什么方法可以配置吗?
顺便说一句:我正在使用 sublime text 和 sublime-jslint 插件,配置如下:
{
// Path to the jslint jar.
// Leave blank to use bundled jar.
"jslint_jar": "",
// Options pass to jslint.
"jslint_options": "--indent 2 --white --maxerr 10000 --nomen --browser --plusplus --es5",
// Ignore errors, regex.
"ignore_errors":
[
"Combine this with the previous 'var' statement.",
"It is not necessary to initialize"
],
// run jslint on save.
"run_on_save": false,
// debug flag.
"debug": false
}
知道如何配置它吗?
【问题讨论】:
标签: sublimetext2 jslint jslint4java