Created
February 9, 2014 00:19
-
-
Save barmatz/8892380 to your computer and use it in GitHub Desktop.
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
Show hidden characters
| { | |
| /* Enforcing options */ | |
| "bitwise": false, // This option prohibits the use of bitwise operators such as ^ (XOR), | (OR) and others. Bitwise operators are very rare in JavaScript programs and quite often & is simply a mistyped &&. | |
| "camelcase": true, // This option allows you to force all variable names to use either camelCase style or UPPER_CASE with underscores. | |
| "curly": true, // This option requires you to always put curly braces around blocks in loops and conditionals. | |
| "eqeqeq": true, // This options prohibits the use of == and != in favor of === and !==. | |
| "es3": false, // This option tells JSHint that your code needs to adhere to ECMAScript 3 specification. | |
| "forin": true, // This option requires all for in loops to filter object's items. | |
| "freeze": true, // This options prohibits overwriting prototypes of native objects such as Array, Date and so on. | |
| "immed": true, // This option prohibits the use of immediate function invocations without wrapping them in parentheses. | |
| "indent": 4, // This option enforces specific tab width for your code. | |
| "latedef": true, // This option prohibits the use of a variable before it was defined. | |
| "newcap": true, // This option requires you to capitalize names of constructor functions. | |
| "noarg": true, // This option prohibits the use of arguments.caller and arguments.callee. | |
| "noempty": true, // This option warns when you have an empty block in your code. | |
| "nonbsp": true, // This option warns about "non-breaking whitespace" characters. | |
| "nonew": true, // This option prohibits the use of constructor functions for side-effects. | |
| "plusplus": true, // This option prohibits the use of unary increment and decrement operators. | |
| "quotmark": true, // This option enforces the consistency of quotation marks used throughout your code. | |
| "undef": true, // This option prohibits the use of explicitly undeclared variables. | |
| "unused": true, // This option warns when you define and never use your variables. | |
| "strict": true, // This option requires all functions to run in ECMAScript 5's strict mode. | |
| "trailing": true, // This option makes it an error to leave a trailing whitespace in your code. | |
| "maxparams": false, // This option lets you set the max number of formal parameters allowed per function. | |
| "maxdepth": false, // This option lets you control how nested do you want your blocks to be. | |
| "maxstatements": false, // This option lets you set the max number of statements allowed per function. | |
| "maxcomplexity": false, // This option lets you control cyclomatic complexity throughout your code. | |
| "maxlen": false, // This option lets you set the maximum length of a line. | |
| /* Relaxing options */ | |
| "asi": false, // This option suppresses warnings about missing semicolons. | |
| "boss": false, // This option suppresses warnings about the use of assignments in cases where comparisons are expected. | |
| "debug": false, // This option suppresses warnings about the debugger statements in your code. | |
| "eqnull": false, // This option suppresses warnings about == null comparisons. | |
| "esnext": false, // This option tells JSHint that your code uses ECMAScript 6 specific syntax. | |
| "evil": false, // This option suppresses warnings about the use of eval. | |
| "expr": false, // This option suppresses warnings about the use of expressions where normally you would expect to see assignments or function calls. | |
| "funcscope": false, // This option suppresses warnings about declaring variables inside of control structures while accessing them later from the outside. | |
| "gcl": false, // This option makes JSHint compatible with Google Closure Compiler. | |
| "globalstrict": false, // This option suppresses warnings about the use of global strict mode. | |
| "iterator": false, // This option suppresses warnings about the __iterator__ property. | |
| "lastsemic": false, // This option suppresses warnings about missing semicolons, but only when the semicolon is omitted for the last statement in a one-line block. | |
| "laxbreak": false, // This option suppresses most of the warnings about possibly unsafe line breakings in your code. | |
| "laxcomma": false, // This option suppresses warnings about comma-first coding style. | |
| "loopfunc": false, // This option suppresses warnings about functions inside of loops. | |
| "maxerr": 50, // This options allows you to set the maximum amount of warnings JSHint will produce before giving up. | |
| "multistr": false, // This option suppresses warnings about multi-line strings. | |
| "notypeof": false, // This option suppresses warnings about invalid typeof operator values. | |
| "proto": false, // This option suppresses warnings about the __proto__ property. | |
| "scripturl": false, // This option suppresses warnings about the use of script-targeted URLs—such as javascript:... . | |
| "smarttabs": false, // This option suppresses warnings about mixed tabs and spaces when the latter are used for alignmnent only. | |
| "shadow": false, // This option suppresses warnings about variable shadowing i.e. declaring a variable that had been already declared somewhere in the outer scope. | |
| "sub": false, // This option suppresses warnings about using [] notation when it can be expressed in dot notation: person['name'] vs. person.name. | |
| "supernew": false, // This option suppresses warnings about "weird" constructions like new function () { ... } and new Object;. | |
| "validthis": false, // This option suppresses warnings about possible strict violations when the code is running in strict mode and you use this in a non-constructor function. | |
| "noyield": false, // This option suppresses warnings about generator functions with no yield statement in them. | |
| /* Environments */ | |
| "browser": false, // This option defines globals exposed by modern browsers: all the way from good old document and navigator to the HTML5 FileReader and other new developments in the browser world. | |
| "couch": false, // This option defines globals exposed by CouchDB. | |
| "devel": false, // This option defines globals that are usually used for logging poor-man's debugging: console, alert, etc. | |
| "dojo": false, // This option defines globals exposed by the Dojo Toolkit. | |
| "jquery": false, // This option defines globals exposed by the jQuery JavaScript library. | |
| "mootools": false, // This option defines globals exposed by the MooTools JavaScript framework. | |
| "node": false, // This option defines globals available when your code is running inside of the Node runtime environment. | |
| "nonstandard": false, // This option defines non-standard but widely adopted globals such as escape and unescape. | |
| "phantom": false, // This option defines globals available when your core is running inside of the PhantomJS runtime environment. | |
| "prototypejs": false, // This option defines globals exposed by the Prototype JavaScript framework. | |
| "rhino": false, // This option defines globals available when your code is running inside of the Rhino runtime environment. | |
| "worker": false, // This option defines globals available when your code is running inside of a Web Worker. | |
| "wsh": false, // This option defines globals available when your code is running as a script for the Windows Script Host. | |
| "yui": false, // This option defines globals exposed by the YUI JavaScript framework. | |
| /* Globals */ | |
| "globals": {} | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment