64 lines
4.5 KiB
Plaintext
64 lines
4.5 KiB
Plaintext
{
|
|
// http://www.jshint.com/docs/
|
|
// Based on node-jshint@2.x.x
|
|
|
|
"bitwise": true, //prohibits the use of bitwise operators such as ^ (XOR), | (OR) and others
|
|
"camelcase": false, //force all variable names to use either camelCase style or UPPER_CASE with underscores
|
|
"curly": true, //requires you to always put curly braces around blocks in loops and conditionals
|
|
"eqeqeq": true, //prohibits the use of == and != in favor of === and !==
|
|
"es3": false, //tells JSHint that your code needs to adhere to ECMAScript 3 specification
|
|
"forin": false, //requires all `for in` loops to filter object's items with `hasOwnProperty()`
|
|
"immed": true, //prohibits the use of immediate function invocations without wrapping them in parentheses
|
|
"indent": 4, //enforces specific tab width
|
|
"latedef": false, //prohibits the use of a variable before it was defined
|
|
"newcap": true, //requires you to capitalize names of constructor functions
|
|
"noarg": true, //prohibits the use of `arguments.caller` and `arguments.callee`
|
|
"noempty": true, //warns when you have an empty block in your code
|
|
"nonew": true, //prohibits the use of constructor functions for side-effects
|
|
"plusplus": false, //prohibits the use of unary increment and decrement operators
|
|
"quotmark": true, //enforces the consistency of quotation marks used throughout your code
|
|
"undef": true, //prohibits the use of explicitly undeclared variables
|
|
"unused": true, //warns when you define and never use your variables
|
|
"strict": true, //requires all functions to run in ECMAScript 5's strict mode
|
|
"trailing": true, //makes it an error to leave a trailing whitespace in your code
|
|
"maxparams": 10, //set the max number of formal parameters allowed per function
|
|
"maxdepth": 3, //control how nested do you want your blocks to be
|
|
//"maxstatements": 0, //set the max number of statements allowed per function
|
|
//"maxcomplexity": 0, //control cyclomatic complexity throughout your code
|
|
"maxlen": 140, //set the maximum length of a line
|
|
|
|
"asi": false, //suppresses warnings about missing semicolons
|
|
"boss": false, //suppresses warnings about the use of assignments in cases where comparisons are expected
|
|
"debug": false, //suppresses warnings about the debugger statements in your code
|
|
"eqnull": false, //suppresses warnings about == null comparisons
|
|
"esnext": false, //your code uses ES.next specific features such as const
|
|
"evil": false, //suppresses warnings about the use of eval
|
|
"expr": false, //suppresses warnings about the use of expressions where normally you would expect to see assignments or function calls
|
|
"funcscope": false, //suppresses warnings about declaring variables inside of control structures while accessing them later from the outside
|
|
"globalstrict": false, //suppresses warnings about the use of global strict mode
|
|
"iterator": false, //suppresses warnings about the `__iterator__` property
|
|
"lastsemic": false, //suppresses warnings about missing semicolons, but only when the semicolon is omitted for the last statement in a one-line block
|
|
"laxbreak": false, //suppresses most of the warnings about possibly unsafe line breakings in your code
|
|
"laxcomma": false, //suppresses warnings about comma-first coding style
|
|
"loopfunc": false, //suppresses warnings about functions inside of loops
|
|
"moz": false, //tells JSHint that your code uses Mozilla JavaScript extensions
|
|
"multistr": false, //suppresses warnings about multi-line strings
|
|
"proto": false, //suppresses warnings about the `__proto__` property
|
|
"scripturl": true, //suppresses warnings about the use of script-targeted URLs—such as `javascript:...`
|
|
"smarttabs": true, //suppresses warnings about mixed tabs and spaces when the latter are used for alignmnent only
|
|
"shadow": false, //suppresses warnings about variable shadowing
|
|
"sub": false, //suppresses warnings about using `[]` notation when it can be expressed in dot notation
|
|
"supernew": false, //suppresses warnings about "weird" constructions like `new function () { ... }` and `new Object;`
|
|
"validthis": true, //suppresses warnings about possible strict violations when the code is running in strict mode and you use `this` in a non-constructor function
|
|
|
|
// ENVIRONMENTS / GLOBALS
|
|
|
|
"browser": true,
|
|
"jquery": true,
|
|
"node": true,
|
|
"globals": {
|
|
"define": true,
|
|
"ActiveXObject": true
|
|
}
|
|
}
|