/**
 * @class JSHintOptions
 */

/*
documentation extracted from
https://github.com/jshint/site/blob/newsite/_tables/enforcers.table
https://github.com/jshint/site/blob/newsite/_tables/relaxers.table
https://github.com/jshint/site/blob/newsite/_tables/legacy.table
*/

 

{
	/**
	 * This option prohibits the use of bitwise operators such as `^` (XOR), `|` (OR) and others. Bitwise operators are
	 * very rare in JavaScript programs and very often `&` is simply a mistyped `&&`.
	 * @property bitwise
	 * @type boolean
	 * @default true
	 */
	"bitwise": true,
	
	/**
	 * This option allows you to force all variable names to use either camelCase style or UPPER_CASE with underscores.
	 * @property camelcase
	 * @type boolean
	 * @default true
	 */
	"camelcase": true,
	
	/**
	 * This option requires you to always put curly braces around blocks in loops and conditionals. JavaScript allows
	 * you to omit curly braces when the block consists of only one statement, for example:
	 * 
	 * 	while (day)
	 * 		shuffle();
	 * 
	 * However, in some circumstances, it can lead to bugs:
	 * 
	 * 	while (day)
	 * 		shuffle();
	 * 		sleep(); // You would think that this is a part of your loop, but it is not.
	 * 
	 * Generally, unless you are careful, it is safer to require curly braces around all blocks.
	 * 
	 * **smpl addition**: Do not require braces if statement if on a single line:
	 * 
	 * 	while (day) shuffle();
	 * 
	 * @property curly
	 * @type boolean
	 * @default true
	 */
	"curly": true,
	
	/**
	 * This options prohibits the use of `==` and `!=` in favor of `===` and `!==`. The former try to coerce values
	 * before comparing them which can lead to some unexpected results. The latter don't do any coercion so they are
	 * generally safer. If you would like to learn more about type coercion in JavaScript, we recommend
	 * [Truth, Equality and JavaScript](http://javascriptweblog.wordpress.com/2011/02/07/truth-equality-and-javascript/)
	 * by Angus Croll.
	 * 
	 * Note: Even if this option is off, JSHint will check for unsafe comparisons like `!= null` unless option `eqnull`
	 * (see below) is turned on.
	 * @property eqeqeq
	 * @type boolean
	 * @default true
	 */
	"eqeqeq": true,
	
	/**
	 * This option requires all `for in` loops to filter object's items. The for in
	 * statement allows for looping through the names of all of the properties of an
	 * object including those inherited throught the prototype chain. This behavior can
	 * lead to unexpected items in your object so it is generally safer to always
	 * filter inherited properties out as shown in the example:
	 * 
	 * 	for (key in obj) {
	 * 		if (obj.hasOwnProperty(key)) {
	 * 			// We are sure that obj[key] belongs to the object and was not inherited.
	 * 		}
	 * 	}
	 * 
	 * For more in-depth understanding of `for in` loops in JavaScript, read
	 * [Exploring JavaScript for-in loops](http://javascriptweblog.wordpress.com/2011/01/04/exploring-javascript-for-in-loops/)
	 * by Angus Croll.
	 * @property forin
	 * @type boolean
	 * @default false
	 */
	"forin": false,
	
	/**
	 * This option prohibits the use of immediate function invocations without wrapping
	 * them in parentheses. Wrapping parentheses assists readers of your code in
	 * understanding that the expression is the result of a function, and not the
	 * function itself.
	 * @property immed
	 * @type boolean
	 * @default true
	 */
	"immed": true,
	
	/**
	 * This option enforces specific tab width for your code. For example, the
	 * following code will trigger a warning on line 4:
	 * 
	 * 	//jshint indent:4
	 * 	if (cond) {
	 * 	  doSomething(); // We used only two spaces for indentation here
	 * 	}
	 * @property indent
	 * @type integer
	 * @default undefined
	 */
	"indent": 4,
	
	/**
	 * This option prohibits the use of a variable before it was defined. JavaScript
	 * has function scope only and, in addition to that, all variables are always
	 * moved—or hoisted— to the top of the function. This behavior can lead to some
	 * very nasty bugs and that's why it is safer to always use variable only after
	 * they have been explicitly defined.
	 * 
	 * For more in-depth understanding of scoping and hoisting in JavaScript, read
	 * [JavaScript Scoping and Hoisting](http://www.adequatelygood.com/2010/2/JavaScript-Scoping-and-Hoisting)
	 * by Ben Cherry.
	 * @property latedef
	 * @type boolean
	 * @default true
	 */
	"latedef": true,
	
	/**
	 * This option requires you to capitalize names of constructor functions.
	 * Capitalizing functions that are intended to be used with `new` operator is just
	 * a convention that helps programmers to visually distinguish constructor functions
	 * from other types of functions to help spot mistakes when using `this`.
	 * 
	 * Not doing so won't break your code in any browsers or environments but it will
	 * be a bit harder to figure out—by reading the code—if the function was supposed
	 * to be used with or without new. And this is important because when the function
	 * that was intended to be used with `new` is used without it, `this` will point to
	 * the global object instead of a new object.
	 * @property newcap
	 * @type boolean
	 * @default true
	 */
	"newcap": true,
	
	/**
	 * This option prohibits the use of `arguments.caller` and `arguments.callee`.
	 * Both `.caller` and `.callee` make quite a few optimizations impossible so they
	 * were deprecated in future versions of JavaScript. In fact, ECMAScript 5 forbids
	 * the use of `arguments.callee` in strict mode.
	 * @property noarg
	 * @type boolean
	 * @default true
	 */
	"noarg": true,
	
	/**
	 * This option warns when you have an empty block in your code. JSLint was
	 * originally warning for all empty blocks and we simply made it optional.
	 * There were no studies reporting that empty blocks in JavaScript break your code
	 * in any way.
	 * @property noempty
	 * @type boolean
	 * @default true
	 */
	"noempty": true,
	
	/**
	 * This option prohibits the use of constructor functions for side-effects. Some
	 * people like to call constructor functions without assigning its result to any
	 * variable:
	 * 
	 * 	new MyConstructor();
	 * 
	 * There is no advantage in this approach over simply calling `MyConstructor` since
	 * the object that the operator `new` creates isn't used anywhere so you should
	 * generally avoid constructors like this one.
	 * 
	 * **smpl note**: The created object might stores itself for exemple by registering to events. Removing the `new`
	 * keyword is a bad idea as it will make `this` to be equal to the global object inside the constructor.
	 * 
	 * @property nonew
	 * @type boolean
	 * @default true
	 */
	"nonew": false,
	
	/**
	 * This option prohibits the use of unary increment and decrement operators.
	 * Some people think that `++` and `--` reduces the quality of their coding styles
	 * and there are programming languages—such as Python—that go completely without
	 * these operators.
	 * @property plusplus
	 * @type boolean
	 * @default false
	 */
	"plusplus": false,
	
	/**
	 * This option enforces the consistency of quotation marks used throughout your
	 * code. It accepts three values: `true` if you don't want to enforce one
	 * particular style but want some consistency, `"single"` if you want to allow only
	 * single quotes and `"double"` if you want to allow only double quotes.
	 * @property quotmark
	 * @type string
	 * @default 'single'
	 */
	"quotmark": "single",
	
	/**
	 * This option prohibits the use of unsafe . in regular expressions
	 * @property regexp
	 * @type boolean
	 * @default false
	 */
	"regexp": false,
	
	/**
	 * This option prohibits the use of explicitly undeclared variables. This option
	 * is very useful for spotting leaking and mistyped variables.
	 * 
	 * 	//jshint undef:true
	 * 	function test() {
	 * 		var myVar = 'Hello, World';
	 * 		console.log(myvar); // Oops, typoed here. JSHint with undef will complain
	 * 	}
	 * 
	 * If your variable is defined in another file, you can use `//global ...`
	 * directive to tell JSHint about it.
	 * @property undef
	 * @type boolean
	 * @default true
	 */
	"undef": true,
	
	/**
	 * This option warns when you define and never use your variables. It is very
	 * useful for general code cleanup, especially when used in addition to `undef`.
	 * 
	 * 	//jshint unused:true
	 * 	
	 * 	function test(a, b) {
	 * 		var c, d = 2;
	 * 		return a + d;
	 * 	}
	 * 	test(1, 2);
	 * 	
	 * 	// Line 3: 'b' was defined but never used.
	 * 	// Line 4: 'c' was defined but never used.
	 * 
	 * In addition to that, this option will warn you about unused global variables
	 * declared via `//global ... ` directive.
	 * @property unused
	 * @type boolean
	 * @default true
	 */
	"unused": true,
	
	/**
	 * This option requires all functions to run in ECMAScript 5's strict mode.
	 * [Strict mode](https://developer.mozilla.org/en/JavaScript/Strict_mode) is a way
	 * to opt in to a restricted variant of JavaScript. Strict mode eliminates some
	 * JavaScript pitfalls that didn't cause errors by changing them to produce errors.
	 * It also fixes mistakes that made it difficult for the JavaScript engines to
	 * perform certain optimizations.
	 * 
	 * *Note:* This option enables strict mode for function scope only. It *prohibits*
	 * the global scoped strict mode because it might break third-party widgets on your
	 * page. If you really want to use global strict mode, see the *globalstrict*
	 * option.
	 * @property strict
	 * @type boolean
	 * @default false
	 */
	"strict": false,
	
	/**
	 * This option makes it an error to leave a trailing whitespace in your code.
	 * Trailing whitespaces can be source of nasty bugs with multi-line strings in
	 * JavaScript:
	 * 
	 * 	// This otherwise perfectly valid string will error if
	 * 	// there is a whitespace after \
	 * 	var str = "Hello \
	 * 	World";
	 * 
	 * @property trailing
	 * @type boolean
	 * @default true
	 */
	"trailing": true,
	
	/**
	 * This option lets you set the max number of formal parameters allowed per
	 * function:
	 * 
	 * 	//jshint maxparams:3
	 * 	function login(request, onSuccess) {
	 * 		// ...
	 * 	}
	 * 	
	 * 	// JSHint: Too many parameters per function (4).
	 * 	function logout(request, isManual, whereAmI, onSuccess) {
	 * 		// ...
	 * 	}
	 * 
	 * @property maxparams
	 * @type integer
	 * @default undefined
	 */
//	"maxparams": 10,
	
	/**
	 * This option lets you control how nested do you want your blocks to be:
	 * 
	 * 	// jshint maxdepth:2
	 * 	function main(meaning) {
	 * 		var day = true;
	 * 		if (meaning === 42) {
	 * 			while (day) {
	 * 				shuffle();
	 * 				if (tired) { // JSHint: Blocks are nested too deeply (3).
	 * 					sleep();
	 * 				}
	 * 			}
	 * 		}
	 * 	}
	 * 
	 * @property maxdepth
	 * @type integer
	 * @default undefined
	 */
//	"maxdepth": 5,
	
	/**
	 * This option lets you set the max number of statements allowed per function:
	 * 
	 * 	// jshint maxstatements:4
	 * 	function main() {
	 * 		var i = 0;
	 * 		var j = 0;
	 * 		// Function declarations count as one statement. Their bodies
	 * 		// don't get taken into account for the outer function.
	 * 		function inner() {
	 * 			var i2 = 1;
	 * 			var j2 = 1;
	 * 			return i2 + j2;
	 * 		}
	 * 		j = i + j;
	 * 		return j; // JSHint: Too many statements per function. (5)
	 * 	}
	 * 
	 * @property maxstatements
	 * @type integer
	 * @default undefined
	 */
//	"maxstatements": 40,
	
	/**
	 * This option lets you control cyclomatic complexity throughout your code.
	 * Cyclomatic complexity measures the number of linearly independent paths through
	 * a program's source code. Read more about
	 * [cyclomatic complexity on Wikipedia](http://en.wikipedia.org/wiki/Cyclomatic_complexity).
	 * @property maxcomplexity
	 * @type integer
	 * @default undefined
	 */
//	"maxcomplexity": 20,
	
	/**
	 * This option lets you set the maximum length of a line
	 * @property maxlen
	 * @type integer
	 * @default 120
	 */
	"maxlen": 120,
	
	/**
	 * This option suppresses warnings about missing semicolons. There is a lot of
	 * FUD spread about semicolon spreaded by quite a few people in the community. The
	 * common myths are that semicolons are required all the time (they are not) and
	 * that they are unreliable. JavaScript has rules about semicolons which are
	 * followed by *all* browsers so it is up to you to decide whether you should or
	 * should not use semicolons in your code.
	 * 
	 * For more information about semicolons in JavaScript read 
	 * [An Open Letter to JavaScript Leaders Regarding Semicolons](http://blog.izs.me/post/2353458699/an-open-letter-to-javascript-leaders-regarding)
	 * by Isaac Schlueter and [JavaScript Semicolon Insertion](http://inimino.org/~inimino/blog/javascript_semicolons).
	 * @property asi
	 * @type boolean
	 * @default false
	 */
	"asi": false,
	
	/**
	 * This option suppresses warnings about the use of assignments in cases where
	 * comparisons are expected. More often than not, code like `if (a = 10) {}` is a
	 * typo. However, it can be useful in cases like this one:
	 * 
	 * 	for (var i = 0, person; person = people[i]; i++) {}
	 * 
	 * @property boss
	 * @type boolean
	 * @default false
	 */
	"boss": false,
	
	/**
	 * This option suppresses warnings about the `debugger` statements in your code.
	 * @property debug
	 * @type boolean
	 * @default false
	 */
	"debug": false,
	
	/**
	 * This option suppresses warnings about `== null` comparisons. Such comparisons
	 * are often useful when you want to check if a variable is `null` or `undefined`.
	 * @property eqnull
	 * @type boolean
	 * @default true
	 */
	"eqnull": true,
	
	/**
	 * This option tells JSHint that your code uses ECMAScript 5 specific syntax such
	 * as getters and setters. Note that not all browsers implement these features.
	 * 
	 * More info:
	 * 
	 * 1. [ES5 compatibility table](http://kangax.github.com/es5-compat-table/) by Juriy Zaytsev
	 * 2. [ECMAScript 5 support in Mozilla](https://developer.mozilla.org/En/javascript/ECMAScript_5_support_in_Mozilla)
	 * 
	 * Note: this option allows thinks like trailing commas in objects. It can be dangerous
	 * @property es5
	 * @type boolean
	 * @default false
	 */
	"es5": false,
	
	/**
	 * This option tells JSHint that your code uses ECMAScript 6 specific features such
	 * as `const`. Note that these features are not finalized yet and not all browsers
	 * implement them.
	 * 
	 * More info:
	 * 
	 * * [Draft Specification for ES.next (ECMA-262 Ed. 6)](http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts)
	 * 
	 * @property esnext
	 * @type boolean
	 * @default false
	 */
	"esnext": false,
	
	/**
	 * This option suppresses warnings about the use of `eval`. The use of `eval` is
	 * discouraged because it can make your code vulnerable to various injection
	 * attacks and it makes it hard for JavaScript interpreter to do certain
	 * optimizations.
	 * @property evil
	 * @type boolean
	 * @default false
	 */
	"evil": false,
	
	/**
	 * This option suppresses warnings about the use of expressions where normally you
	 * would expect to see assignments or function calls. Most of the time, such code
	 * is a typo. However, it is not forbidden by the spec and that's why this warning
	 * is optional.
	 * @property expr
	 * @type boolean
	 * @default false
	 */
	"expr": false,
	
	/**
	 * This option suppresses warnings about declaring variables inside of control
	 * structures while accessing them later from the outside. Even though JavaScript
	 * has only two real scopes—global and function—such practice leads to confusion
	 * among people new to the language and hard-to-debug bugs. This is way, by
	 * default, JSHint warns about variables that are used outside of their intended
	 * scope.
	 * 
	 * 	function test() {
	 * 		if (true) {
	 * 			var x = 0;
	 * 		}
	 * 		x += 1; // Default: 'x' used out of scope.
	 * 		        // No warning when funcscope:true
	 * 	}
	 * 
	 * @property funcscope
	 * @type boolean
	 * @default false
	 */
	"funcscope": false,
	
	/**
	 * This option suppresses warnings about the use of global strict mode. Global
	 * strict mode can break third-party widgets so it is not recommended.
	 * 
	 * For more info about strict mode see the `strict` option.
	 * @property globalstrict
	 * @type boolean
	 * @default false
	 */
	"globalstrict": false,
	
	/**
	 * This option suppresses warnings about the `__iterator__` property. This property
	 * is not supported by all browsers so use it carefully.
	 * @property iterator
	 * @type boolean
	 * @default false
	 */
	"iterator": false,
	
	/**
	 * This option suppresses warnings about missing semicolons, but only when the
	 * semicolon is omitted for the last statement in a one-line block:
	 * 
	 * 	var name = (function() { return 'Anton' }());
	 * 
	 * This is a very niche use case that is useful only when you use automatic
	 * JavaScript code generators.
	 * @property lastsemic
	 * @type boolean
	 * @default false
	 */
	"lastsemic": false,
	
	/**
	 * This option suppresses most of the warnings about possibly unsafe line breakings
	 * in your code. It doesn't suppress warnings about comma-first coding style. To
	 * suppress those you have to use `laxcomma` (see below).
	 * @property laxbreak
	 * @type boolean
	 * @default false
	 */
	"laxbreak": false,
	
	/**
	 * This option suppresses warnings about comma-first coding style:
	 * 
	 * 	var obj = {
	 * 	    name: 'Anton'
	 * 	  , handle: 'valueof'
	 * 	  , role: 'SW Engineer'
	 * 	};
	 * @property laxcomma
	 * @type boolean
	 * @default false
	 */
	"laxcomma": false,
	
	/**
	 * This option suppresses warnings about functions inside of loops. Defining
	 * functions inside of loops can lead to bugs such as this one:
	 * 
	 * 	var nums = [];
	 * 	for (var i = 0; i < 10; i++) {
	 * 		nums[i] = function (j) {
	 * 			return i + j;
	 * 		};
	 * 	}
	 * 	nums[0](2); // Prints 12 instead of 2
	 * 
	 * To fix the code above you need to copy the value of `i`:
	 * 
	 * 	var nums = [];
	 * 	for (var i = 0; i < 10; i++) {
	 * 		(function (i) {
	 * 			nums[i] = function (j) {
	 * 				return i + j;
	 * 			};
	 * 		}(i));
	 * 	}
	 * 
	 * @property loopfunc
	 * @type boolean
	 * @default false
	 */
	"loopfunc": false,
	
	/**
	 * This option suppresses warnings about multi-line strings. Multi-line strings
	 * can be dangerous in JavaScript because all hell breaks loose if you accidentally
	 * put a whitespace in between the escape character (`\`) and a new line.
	 * 
	 * Note that even though this option allows correct multi-line strings, it still
	 * warns about multi-line strings without escape characters or with anything in
	 * between the escape character and a whitespace.
	 * 
	 * 	//jshint multistr:true
	 * 	
	 * 	var text = "Hello\
	 * 	World"; // All good.
	 * 	
	 * 	text = "Hello
	 * 	World"; // Warning, no escape character.
	 * 	
	 * 	text = "Hello\ 
	 * 	World"; // Warning, there is a space after \
	 * 
	 * @property multistr
	 * @type boolean
	 * @default false
	 */
	"multistr": false,
	
	/**
	 * This option suppresses warnings about the `__proto__` property.
	 * @property proto
	 * @type boolean
	 * @default false
	 */
	"proto": false,
	
	/**
	 * This option suppresses warnings about the use of script-targeted URLs—such as
	 * `javascript:...`.
	 * @property scripturl
	 * @type boolean
	 * @default false
	 */
	"scripturl": false,
	
	/**
	 * This option suppresses warnings about mixed tabs and spaces when the latter are
	 * used for alignmnent only. The technique is called
	 * [SmartTabs](http://www.emacswiki.org/emacs/SmartTabs).
	 * @property smarttabs
	 * @type boolean
	 * @default true
	 */
	"smarttabs": true,
	
	/**
	 * This option suppresses warnings about variable shadowing i.e. declaring a
	 * variable that had been already declared somewhere in the outer scope.
	 * @property shadow
	 * @type boolean
	 * @default false
	 */
	"shadow": false,
	
	/**
	 * This option suppresses warnings about using `[]` notation when it can be
	 * expressed in dot notation: `person['name']` vs. `person.name`.
	 * @property sub
	 * @type boolean
	 * @default false
	 */
	"sub": false,
	
	/**
	 * This option suppresses warnings about "weird" constructions like
	 * `new function () { ... }` and `new Object;`. Such constructions are sometimes
	 * used to produce singletons in JavaScript:
	 * 
	 * 	var singleton = new function() {
	 * 		var privateVar;
	 * 		this.publicMethod  = function () {}
	 * 		this.publicMethod2 = function () {}
	 * 	};
	 * 
	 * @property supernew
	 * @type boolean
	 * @default false
	 */
	"supernew": false,
	
	/**
	 * This option make JSHint check your source code against Douglas Crockford's
	 * JavaScript coding style. Unfortunately, his “The Good Parts” book aside, the
	 * actual rules are not very well documented.
	 * 
	 * **JSHint addition**: We do not require spaces in the following places:
	 * 
	 * 	var a = function() {}; // JSHint normally require a space between `function` and `()`
	 * 
	 * 	while(i++); // JSHint normally require a space before the semicolon
	 * 
	 * @property white
	 * @type boolean
	 * @default true
	 */
	"white": true,

	"maxerr": 1000,
	
	/**
	 * This option suppresses warnings about unescaped - in the end of regular expressions.
	 * @property regexdash
	 * @type boolean
	 * @default false
	 */
	"regexdash": false,
	
	/**
	 * This option suppresses warnings about switches with just one case. Most of the time
	 * you want to use `if` instead of `switch` if there is only one case. However, some code
	 * generators prefer to generate `switch` statements.
	 * @property onecase
	 * @type boolean
	 * @default false
	 */
	"onecase": false
}
