-
Notifications
You must be signed in to change notification settings - Fork 5
/
.jshintrc
64 lines (56 loc) · 3.42 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
{
// Documentation: http://www.jshint.com/docs/options/
// Predefined globals who JSHint will ignore.
"browser": true, // Standard browser globals e.g. `window`, `document`.
"node": true,
"rhino": false,
"couch": false,
"wsh": false, // Windows Scripting Host.
"jquery": true,
"prototypejs": false,
"mootools": false,
"dojo": false,
"predef": [ // Extra globals.
"require",
"define"
],
// Development.
"debug": false, // Allow debugger statements e.g. browser breakpoints, debugger.
"devel": true, // Allow development statements e.g. `console.log();`.
// EcmaScript 5.
"strict": false, // Require `use strict` pragma in every file.
"globalstrict": false, // Allow global "use strict" (also enables 'strict').
// Ensure The Good Parts of Javascript.
"asi": false, // Tolerate Automatic Semicolon Insertion (no semicolons).
"boss": true, // Tolerate assignments inside if, for & while. Usually conditions & loops are for comparison, not assignments.
"sub": true, // This option suppresses warnings about using [] notation when it can be expressed in dot notation.
"evil": false, // Tolerate use of `eval`.
"camelcase": true, // This option allows you to force all variable names to use either camelCase style or UPPER_CASE with underscores.
"expr": true, // Tolerate `ExpressionStatement` as Programs.
"funcscope": false, // Allow declaring variables inside of control structures while accessing them later from the outside.
"bitwise": true, // Prohibit bitwise operators (&, |, ^, etc.).
"latedef": "nofunc", // Prohibit variable use before definition.
"curly": true, // Require {} for every new block or scope.
"newcap": true, // Require capitalize names of constructor functions.
"noarg": true, // Prohibit use of `arguments.caller` and `arguments.callee`.
"indent": 2, // Require n number of indentation
"eqeqeq": true, // Require triple equals i.e. `===`.
"eqnull": true, // Tolerate use of `== null`.
"esnext": true, // Allow EcmaScript 6 syntax.
"lastsemic": false, // Allow omit semicolon for the last statement in a one-line block.
"immed": true, // Require immediate invocations to be wrapped in parens e.g. `( function(){}() );
//"quotmark": true, // Don't force any particular style of quotes, values can be `true`, `single`, `double`
"laxbreak": false, // Tolerate unsafe line breaks e.g. `return [\n] x` without semicolons.
"forin": true, // Tolerate `for in` loops without `hasOwnPrototype`.
"loopfunc": false, // Allow functions to be defined within loops.
"regexp": true, // Prohibit `.` and `[^...]` in regular expressions.
"regexdash": false, // Tolerate unescaped last dash i.e. `[-...]`.
"scripturl": true, // Tolerate script-targeted URLs.
"shadow": false, // Allows re-define variables later in code e.g. `var x=1; x=2;`.
"supernew": false, // Tolerate `new function () { ... };` and `new Object;`.
"undef": true, // Require all non-global variables be declared before they are used.
"unused": true, // This option warns when you define and never use your variables.
"trailing": true, // This option makes it an error to leave a trailing whitespace in your code.
"smarttabs": true, // This option suppresses warnings about mixed tabs and spaces when the latter are used for alignmnent only.
"maxcomplexity": 18
}