Created
September 6, 2012 16:38
-
-
Save rgrove/3658306 to your computer and use it in GitHub Desktop.
My .jshintrc
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
{ | |
// enforcing options (true means potentially more warnings) | |
"bitwise": true, // true if bitwise operators should not be allowed | |
"curly": true, // true if curly braces should be required around blocks in loops and conditionals | |
"eqeqeq": true, // true if === should be required (for ALL equality comparisons) | |
"forin": false, // true if unfiltered 'for in' statements should be forbidden | |
"immed": true, // true if immediate function invocations must be wrapped in parens | |
"newcap": true, // true if Initial Caps must be used with constructor functions | |
"noarg": true, // true if arguments.caller and arguments.callee should be forbidden | |
"noempty": true, // true if empty blocks should be forbidden | |
"nomen": false, // true if initial or trailing underscore in identifiers should be forbidden | |
"onevar": false, // true if only one var statement per function should be allowed | |
"plusplus": false, // true if ++ and -- should not be allowed | |
"regexp": false, // true if . and [^...] should not be allowed in RegExp literals | |
"strict": false, // true if the ES5 "use strict"; pragma is required | |
"trailing": true, // true if trailing whitespace should be forbidden | |
"undef": true, // true if variables must be declared before used | |
"unused": true, // true to warn on variables that are defined but never used | |
"white": false, // true if strict whitespace rules apply (see also 'indent' option) | |
// relaxing options (false means potentially more warnings) | |
"asi": false, // true to suppress warnings about missing semicolons | |
"boss": false, // true if assignments should be allowed when comparison is expected | |
"debug": false, // true if debugger statements should be allowed (set to false before going into production) | |
"eqnull": false, // true to suppress warnings about `== null` comparisons | |
"es5": false, // true if ECMAScript 5 syntax should be allowed | |
"esnext": false, // true if ES.next features like `const` and `let` should be allowed | |
"evil": false, // true if eval should be allowed | |
"expr": true, // true if expressions should be allowed where an assignment or function call is expected | |
"funcscope": false, // true to suppress warnings about variables declared inside control structures | |
"globalstrict": false, // true to suppress warnings about the use of global strict mode | |
"iterator": false, // true to suppress warnings about the `__iterator__` property | |
"lastsemic": false, // true to suppress warnings about semicolons only when the semicolon is omitted on the last line of a block | |
"laxbreak": true, // true if statement breaks should not be checked | |
"laxcomma": false, // true to suppress warnings about the comma-first style | |
"loopfunc": false, // true to suppress warnings about creating functions inside loops | |
"multistr": false, // true to suppress warnings about multi-line strings | |
"onecase": false, // true to suppress warnings about switch statements with only a single case | |
"proto": false, // true to suppress warnings about the `__proto__` property | |
"regexdash": false, // true to suppress warnings about unescaped `-` as the end of a regular expression | |
"scripturl": false, // true to suppress warnings about script-targeted URLs such as `javascript:...` | |
"shadow": false, // true to suppress warnings about variable shadowing | |
"smarttabs": false, // true to suppress warnings about mixed tabs and spaces | |
"sub": false, // true if subscript notation may be used for expressions better expressed in dot notation | |
"supernew": false, // true to suppress warnings about "weird" constructions like `new function () { ... }` | |
// other options | |
"indent": 4, // number of spaces that should be used for indentation - used only if 'white' option is set | |
"maxerr": 50, // maximum number of warnings reported (per file) | |
"maxlen": 150, // maximum line length | |
"passfail": false, // true if the scan should stop on first error (per file) | |
// following are relevant only if undef = true | |
"predef": [ // names of predefined global variables (as an array of strings) | |
"Y", "YUI" | |
], | |
// environments | |
"browser": true, // true if the standard browser globals should be predefined | |
"devel": false, // true if functions like alert, confirm, console, prompt etc. are predefined | |
"node": false, // true if Node.js globals should be predefined | |
"nonstandard": true, // true to allow nonstandard but widely adopted globals like `escape` and `unescape` | |
"rhino": false // true if the Rhino environment globals should be predefined | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment