forked from postaljs/postal.xframe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.jshintrc
99 lines (90 loc) · 7 KB
/
.jshintrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
{
// http://www.jshint.com/docs/
// Based on [email protected]
// ENFORCING OPTIONS
// These options tell JSHint to be more strict towards your code. Use them if
// you want to allow only a safe subset of JavaScript—very useful when your
// codebase is shared with a big number of developers with different skill
// levels.
"bitwise" : true, //prohibits the use of bitwise operators such as ^ (XOR), | (OR) and others
"camelcase" : true, //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 !==
"forin" : true, //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" : true, //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
"regexp" : false, //prohibits the use of unsafe `.` in regular expressions
"undef" : true, //prohibits the use of explicitly undeclared variables
"unused" : true, //warns when you define and never use your variables
"strict" : false, //requires all functions to run in EcmaScript 5's strict mode
"trailing" : false, //makes it an error to leave a trailing whitespace in your code
// "maxparams": 0, //set the max number of formal parameters allowed per function,
// "maxdepth": 0, //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": 80, //set the maximum length of a line
// RELAXING OPTIONS
// These options allow you to suppress certain types of warnings. Use them
// only if you are absolutely positive that you know what you are doing.
"asi" : false, //suppresses warnings about missing semicolons
"boss" : true, //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
"es5" : false, //your code uses ECMAScript 5 specific features such as getters and setters
"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" : true, //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
"multistr" : false, //suppresses warnings about multi-line strings
"onecase" : false, //suppresses warnings about switches with just one case
"proto" : false, //suppresses warnings about the `__proto__` property
"regexdash" : true, //suppresses warnings about unescaped `-` in the end of regular expressions
"scripturl" : false, //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" : false, //suppresses warnings about possible strict violations when the code is running in strict mode and you use `this` in a non-constructor function
// ENVIRONMENTS
// These options pre-define global variables that are exposed by popular
// JavaScript libraries and runtime environments—such as browser or node.js.
// Essentially they are shortcuts for explicit declarations like
// /*global $:false, jQuery:false */
"browser" : true, //defines globals exposed by modern browsers
"couch" : false, //defines globals exposed by CouchDB
"devel" : true, //defines globals that are usually used for logging poor-man's debugging: `console`, `alert`, etc.
"dojo" : false, //defines globals exposed by the Dojo Toolkit
"jquery" : false, //defines globals exposed by the jQuery JavaScript library
"mootools" : false, //defines globals exposed by the MooTools JavaScript 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" : false, //defines globals exposed by the Prototype JavaScript framework
"rhino" : false, //defines globals available when your code is running inside of the Rhino runtime environment
"worker" : true, //defines globals available when your code is running inside of a Web Worker
"wsh" : false, //defines globals available when your code is running as a script for the Windows Script Host
"yui" : false, //defines globals exposed by the YUI JavaScript framework
"predef" : [ // Custom globals.
"_",
"define"
],
// LEGACY
// These options are legacy from JSLint. Aside from bug fixes they will not
// be improved in any way and might be removed at any point.
"nomen" : false, //disallows the use of dangling `_` in variables
"onevar" : false, //allows only one `var` statement per function
"passfail" : false, //makes JSHint stop on the first error or warning
"white" : false //make JSHint check your source code against Douglas Crockford's JavaScript coding style
}