forked from Modernizr/Modernizr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.jshintrc
100 lines (79 loc) · 2.75 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
100
{
/*
* ENVIRONMENTS
* =================
*/
// Define globals exposed by modern browsers.
"browser": true,
/*
* TABS AND QUOTES
* ==================
*/
// Enforce tab width of 2 spaces.
"indent": 2,
// Enforce use of single quotation marks for strings.
"quotmark": "single",
/*
* ENFORCING OPTIONS
* =================
*/
// This option allows you to not put curly braces
// around blocks in loops and conditionals.
"curly": false,
// This option allows the use of immediate function
// invocations without wrapping them in parentheses.
"immed": false,
// 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.
"noarg": true,
// This option suppresses warnings about the use of
// assignments in cases where comparisons are expected
"boss": true,
// Allow use of == and != in favor of === and !==.
"eqeqeq": false,
// Suppress warnings about == null comparisons.
"eqnull": true,
// Does not require capitalized names for constructor functions.
"newcap": false,
// Prohibit trailing whitespace.
"trailing": true,
// Prohibit use of explicitly undeclared variables.
"undef": true,
// Warn when variables are defined but never used.
"unused": true,
// 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.
"expr": true,
// 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.
"evil": true,
// This option suppresses warnings about comma-first coding style.
"laxcomma": true,
// suppress object dot notation warnings, we know what we're doing
"sub": true,
// This option defines globals that are usually used for logging poor-man's
// debugging: console, alert, etc. It is usually a good idea to not ship
// them in production because, for example, console.log breaks in legacy
// versions of Internet Explorer.
"devel": true,
// This option suppresses warnings about mixed tabs and spaces when the
// latter are used for alignment only. The technique is called SmartTabs.
"smarttabs": true,
"globals": {
"Modernizr": true,
"DocumentTouch": true,
"TEST": true,
"SVGFEColorMatrixElement": true,
"Blob": true,
"define": true,
"require": true,
"$": true,
"QUnit": true
}
}