Skip to content

Instantly share code, notes, and snippets.

@zxhfighter
Last active December 28, 2015 02:19
Show Gist options
  • Save zxhfighter/7427324 to your computer and use it in GitHub Desktop.
Save zxhfighter/7427324 to your computer and use it in GitHub Desktop.
jshint options, more details see here: http://jshint.com/docs/options/
{
// if allow use bit-wise operators like ^,|,&
"bitwise": false,
// camelCase or UPPER_CASE
"camelcase": true,
// always use curly braces
"curly": true,
// allow == and ===
"eqeqeq": false,
// it's ok not filter with hasOwnproperty method
"forin": false,
// immediate functions must be wrapped with parentheses
// Wrapping parentheses assists readers of your code in understanding that the expression is the result of a function, and not the function itself.
"immed": true,
// 4 spaces, fuck switch~case
"indent": 4,
// variables can defined later
"latedef": false,
// requires you to capitalize names of constructor functions
"newcap": true,
// allow arguments.callee and arguments.caller
// In fact, ECMAScript 5 forbids the use of arguments.callee in strict mode.
"noarg": false,
// don't allow empty blocks
"noempty": true,
// don't allow use new constructor without assignment
"nonew": true,
// allow use ++ and --
"plusplus": false,
// use single qutomark
"quotmark": "single",
// ?
"regexp": false,
// allow undefined variables(maybe defined in other files)
"undef": false,
// dont't allow unused vars defined by vars
"unused": "vars",
// not strict mode
"strict": false,
// allow trailing spaces
"trailing": false,
// max parameters
"maxparams": 20,
// This option lets you control how nested do you want your blocks to be
"maxdepth": 6,
// max length of a line
"maxlen": 80,
// always use semicolons
"asi": false,
// This option suppresses warnings about the use of assignments in cases where comparisons are expected.
"boss": false,
// This option suppresses warnings about the debugger statements in your code.
"debug": false,
// This option suppresses warnings about == null comparisons.
"eqnull": true,
// This option tells JSHint that your code uses ECMAScript 6 specific syntax.
"esnext": false,
// This option suppresses warnings about the use of eval.
"evil": true,
// This option suppresses warnings about the use of expressions where normally
// you would expect to see assignments or function calls.
"expr": true,
"funcscope": false,
"globalstrict": false,
"iterator": false,
"lastsemic": false,
"laxbreak": true,
"laxcomma": false,
"loopfunc": false,
"multistr": false,
"onecase": false,
"proto": false,
"regexdash": false,
"scripturl": false,
"smarttabs": false,
"shadow": true,
"sub": true,
"supernew": true,
"validthis": true,
"browser": true,
"couch": false,
"devel": false,
"dojo": false,
"jquery": true,
"mootools": false,
"node": false,
"nonstandard": false,
"prototypejs": false,
"rhino": false,
"wsh": false,
"nomen": false,
"onevar": false,
"passfail": false,
"white": false
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment