Created
May 31, 2012 18:23
-
-
Save qiao/2845237 to your computer and use it in GitHub Desktop.
My configuration file for jshint
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// vim: set filetype=javascript: | |
// See http://www.jshint.com/options/ for the elaboration of the options. | |
// The comment after each entry is the result of applying this configuration. | |
// When toggling the booleans, don't forget to change the comments as well. | |
{ | |
// Enforcing Options | |
"bitwise" : false, // Allows the use of bitwise operators. | |
"curly" : true, // Always put curly braces around blocks in loops and conditionals. | |
"eqeqeq" : true, // Always use `===` and `!==` instead of `==` and `!=`. | |
"forin" : false, // Doesn't require all `for in` loops to check properties with `hasOwnProperty`. | |
"immed" : false, // Allows the use of immediate functions without wrapping them in parentheses. | |
"latedef" : false, // Allows the use of a variable before it was defined. | |
"newcap" : true, // Must capitalize names of constructor functions. | |
"noarg" : true, // Prohibits the use of `arguments.caller` and `arguments.callee`. | |
"noempty" : false, // Doesn't warn when empty blocks are present. | |
"nonew" : true, // Prohibits the use of constructor functions for side-effects. | |
"plusplus" : false, // Allows the use `++` and `--`. | |
"regexp" : true, // Prohibits the use of unsafe `.` in regular expressions. | |
"undef" : true, // Prohibits the use of explicitly undeclared variables. | |
"strict" : false, // Doesn't require all functions to run in EcmaScript 5's strict mode. | |
"trailing" : true, // Warns about trailing whitespaces. | |
// Relaxing Options | |
"asi" : false, // Warns about missing semicolons. | |
"boss" : true, // Doesn't warn about the use of assignments where comparisons are expected. | |
"debug" : false, // Warns about the debugger statements in your code. | |
"eqnull" : true, // Doesn't warn about `== null` comparisons. | |
"es5" : true, // Allows the use of ES5 specific features. | |
"esnext" : true, // Allows the use of ES.next specific features. | |
"evil" : false, // Warns about the use of `eval`. | |
"expr" : true, // Doesn't warn about the use of expressions when expecting assignments or function calls. | |
"funcscope" : false, // Warns about declaring variables in control structures while accessing them later from outside. | |
"globalstrict" : false, // Warns about the use of global strict mode. | |
"iterator" : false, // Warns about the use of the `__iterator__` property. | |
"lastsemic" : false, // Warns about the missing semicolon for the last statement in a one-line block. | |
"laxbreak" : false, // Warns about possibly unsafe line breaks. | |
"laxcomma" : true, // Doesn't warn about the use of comma-first coding style. | |
"loopfunc" : true, // Doesn't warn about functions inside of loops. | |
"multistr" : false, // Warns about multi-line strings. | |
"onecase" : false, // Warns about switches with only one case. | |
"proto" : false, // Warns about the `__proto__` property. | |
"regexdash" : false, // Warns about unescaped `-` in the end of regular expressions. | |
"scripturl" : false, // Warns about the use of script-targeted URLs—such as `javascript:....`. | |
"smarttabs" : false, // Warns about mixed tabs and spaces when the latter are used for alignmnent only. | |
"shadow" : true, // Doesn't warn about variable shadowing. | |
"sub" : false, // Warn about using `[]` notation when it can be expressed in dot notation. | |
"supernew" : false, // Warns about "weird" constructions like `new function () { ... }` and `new Object;` | |
"validthis" : false, // Warns about possible strict violations when running in strict mode. | |
// Environments | |
"browser" : true, // Defines globals exposed by modern browsers. | |
"couch" : true, // Defines globals exposed by CouchDB. | |
"devel" : true, // Defines globals that are usually used for logging poor-man's debugging: console, alert, etc. | |
"dojo" : true, // Defines globals exposed by the Dojo Toolkit. | |
"jquery" : true, // Defines globals exposed by jQuery. | |
"mootools" : true, // Defines globals exposed by the Mootools framework. | |
"node" : true, // Defines globals available when your code is running inside of the Node runtime environment. | |
"nonstandard" : true, // Defines non-standard but widely adopted globals such as `escape` and `unescape`. | |
"prototypejs" : true, // Defines globals exposed by the Prototype JavaScript framework. | |
"rhino" : true, // Defines globals available when your code is running inside of the Rhino runtime environment. | |
"wsh" : false, // Doesn't define globals available when your code is running as a script for the Windows Script Host. | |
// Legacy | |
"nomen" : false, // Allows the use of dangling _ in variables. | |
"onevar" : false, // Allows multiple var statements per function | |
"passfail" : false, // Doesn't stop on the first error or warning. | |
"white" : false // Doesn't check against Douglas Crockford's JavaScript coding style. | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment