【发布时间】:2013-02-18 19:26:34
【问题描述】:
我使用 nicEdit 编辑器,它有一个名为 nicEditor 的函数对象。
JSLint 对其发出警告:
构造函数名称“nicEditor”应以大写字母开头。
它忽略了我在问题行之前放置的/*jslint newcap:false */ 选项”
/*jslint newcap:false */
var nic_editor = new nicEditor({
buttonList : ['bold', 'italic', 'underline', 'strikethrough', 'emoticonToolbar'],
iconsPath : '/assets/nicEditorIcons.gif'
}),
/*jslint newcap:true */
我怎样才能抑制这个警告,但只针对这一行?
【问题讨论】:
-
你能改用 JSHint 吗?有了它,这种事情就容易多了。
-
我不认为我可以轻松切换,因为我通过 hallettj/jslint.vim Vim 插件使用 JSLint。
标签: javascript jslint