|
12 | 12 | * @see http://www.jshint.com/docs/ |
13 | 13 | */ |
14 | 14 | { |
15 | | - "jshint_options": |
16 | | - { |
17 | | - /* |
18 | | - * ENVIRONMENTS |
19 | | - * ================= |
20 | | - */ |
| 15 | + "jshint_options": |
| 16 | + { |
| 17 | + /* |
| 18 | + * ENVIRONMENTS |
| 19 | + * ================= |
| 20 | + */ |
21 | 21 |
|
22 | | - // Define globals exposed by modern browsers. |
23 | | - "browser": true, |
| 22 | + // Define globals exposed by modern browsers. |
| 23 | + "browser": true, |
24 | 24 |
|
25 | | - // Define globals exposed by jQuery. |
26 | | - "jquery": true, |
| 25 | + // Define globals exposed by jQuery. |
| 26 | + "jquery": true, |
27 | 27 |
|
28 | | - // Define globals exposed by Node.js. |
29 | | - "node": true, |
| 28 | + // Define globals exposed by Node.js. |
| 29 | + "node": true, |
30 | 30 |
|
31 | | - /* |
32 | | - * ENFORCING OPTIONS |
33 | | - * ================= |
34 | | - */ |
| 31 | + /* |
| 32 | + * ENFORCING OPTIONS |
| 33 | + * ================= |
| 34 | + */ |
35 | 35 |
|
36 | | - // Force all variable names to use either camelCase style or UPPER_CASE |
37 | | - // with underscores. |
38 | | - "camelcase": true, |
| 36 | + // Force all variable names to use either camelCase style or UPPER_CASE |
| 37 | + // with underscores. |
| 38 | + "camelcase": true, |
39 | 39 |
|
40 | | - // Prohibit use of == and != in favor of === and !==. |
41 | | - "eqeqeq": true, |
| 40 | + // Always require curly braces |
| 41 | + "curly" : true, |
42 | 42 |
|
43 | | - // Suppress warnings about == null comparisons. |
44 | | - "eqnull": true, |
| 43 | + // Prohibit use of == and != in favor of === and !==. |
| 44 | + "eqeqeq": true, |
45 | 45 |
|
46 | | - // Enforce tab width of 2 spaces. |
47 | | - "indent": 2, |
| 46 | + // Keep people from breaking JavaScript (no overwriting prototypes of native objects) |
| 47 | + "freeze": true, |
48 | 48 |
|
49 | | - // Prohibit use of a variable before it is defined. |
50 | | - "latedef": true, |
| 49 | + // Enforce tab width of 2 spaces. |
| 50 | + "indent": 4, |
51 | 51 |
|
52 | | - // Require capitalized names for constructor functions. |
53 | | - "newcap": true, |
| 52 | + // Prohibit use of a variable before it is defined. |
| 53 | + "latedef": true, |
54 | 54 |
|
55 | | - // Enforce use of single quotation marks for strings. |
56 | | - "quotmark": "single", |
| 55 | + // Require capitalized names for constructor functions. |
| 56 | + "newcap": true, |
57 | 57 |
|
58 | | - // Prohibit trailing whitespace. |
59 | | - "trailing": true, |
| 58 | + // Enforce use of single quotation marks for strings. |
| 59 | + "quotmark": "single", |
60 | 60 |
|
61 | | - // Prohibit use of explicitly undeclared variables. |
62 | | - "undef": true, |
| 61 | + // Prohibit use of explicitly undeclared variables. |
| 62 | + "undef": true, |
63 | 63 |
|
64 | | - // Warn when variables are defined but never used. |
65 | | - "unused": true |
66 | | - } |
| 64 | + // Warn when variables are defined but never used. |
| 65 | + "unused": true, |
| 66 | + |
| 67 | + // Enforce placing 'use strict' at the top function scope |
| 68 | + "strict": true, |
| 69 | + |
| 70 | + // Prohibit trailing whitespace. |
| 71 | + "trailing": true, |
| 72 | + |
| 73 | + |
| 74 | + /* |
| 75 | + * RELAXING OPTIONS |
| 76 | + * ================= |
| 77 | + */ |
| 78 | + |
| 79 | + // Suppress warnings about == null comparisons. |
| 80 | + "eqnull": true |
| 81 | + } |
67 | 82 | } |
0 commit comments