Reputation: 16915
JSlint allows setting options in a comment block at the beginning of your script and some of them could help make it less annoying to use. I am hoping for some more productivity.
I picked these to start with:
/*jslint devel: true, browser: true, unparam: true, debug: false, es5: true, white: true, maxerr: 50, indent: 4 */
What are the established defaults?
[I am really trying to make it NOT subjective, but yeah, I want to know what works for you]
Upvotes: 7
Views: 8229
Reputation: 12142
You can install Komodo Edit (open source editor) and use its configuration tool for JsLint or JsHint, here is how for JsLint:
which gives you the config string
Upvotes: 0
Reputation: 9912
What do you mean by "less annoying for use"? Not using JSLint is the least annoying.
The defaults are already set by default in JSLint; thus, the defaults are "no overrides". However, in some cases you have to override the defaults; for you, that would probably be browser: true
(to allow javascript to interact with browser) and devel: true
(if you want to use alert
, console.log
etc; btw, consider using browser's integrated debugger instead).
Upvotes: 1
Reputation: 94101
Basically this works for me, disabled all annoying stuff.
/*jslint white: true, browser: true, devel: true, windows: true, forin: true, vars: true, nomen: true, plusplus: true, bitwise: true, regexp: true, sloppy: true, indent: 4, maxerr: 50 */
Upvotes: 5