I use nicEdit editor, which has a function object called nicEditor
.
JSLint puts a warning on it:
A constructor name 'nicEditor' should start with an uppercase letter.
It ignores the /*jslint newcap:false */
option I put right before the troubled line"
/*jslint newcap:false */
var nic_editor = new nicEditor({
buttonList : ['bold', 'italic', 'underline', 'strikethrough', 'emoticonToolbar'],
iconsPath : '/assets/nicEditorIcons.gif'
}),
/*jslint newcap:true */
How can I suppress this warning but only for this line?
I don't believe its possible to be more finegrained than you currently are. And TBH, I think your current solution is just fine.
If you really want to avoid the newCaps
setting you could just use a local variable to rename the constructor:
var NicEditor = nicEditor;
var nic_editor = new NicEditor({
buttonList : ['bold', 'italic', 'underline', 'strikethrough', 'emoticonToolbar'],
iconsPath : '/assets/nicEditorIcons.gif'
}),
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With