Skip to content

Commit 48328ca

Browse files
committed
A small hint!
1 parent f249b27 commit 48328ca

File tree

1 file changed

+68
-0
lines changed

1 file changed

+68
-0
lines changed

Diff for: .jshintrc

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
{
2+
// Settings
3+
"passfail" : false, // Stop on first error.
4+
"maxerr" : 50, // Maximum error before stopping.
5+
6+
7+
// Predefined globals whom JSHint will ignore.
8+
"browser" : true, // Standard browser globals e.g. `window`, `document`.
9+
"couch" : false,
10+
"dojo" : false,
11+
"jquery" : true,
12+
"mootools" : false,
13+
"node" : false,
14+
"prototypejs" : false,
15+
"rhino" : false,
16+
"wsh" : false,
17+
18+
// Custom globals.
19+
"predef" : [
20+
"requirejs"
21+
],
22+
23+
24+
// Development.
25+
"debug" : false, // Allow debugger statements e.g. browser breakpoints.
26+
"devel" : false, // Allow developments statements e.g. `console.log();`.
27+
28+
29+
// EcmaScript 5.
30+
"es5" : false, // Allow EcmaScript 5 syntax.
31+
"globalstrict" : false, // Allow global "use strict" (also enables 'strict').
32+
"strict" : false, // Require `use strict` pragma in every file.
33+
34+
35+
// The Good Parts.
36+
"asi" : false, // Tolerate Automatic Semicolon Insertion (no semicolons).
37+
"bitwise" : false, // Prohibit bitwise operators (&, |, ^, etc.).
38+
"boss" : true, // Tolerate assignments inside if, for & while. Usually conditions & loops are for comparison, not assignments.
39+
"curly" : false, // Require {} for every new block or scope.
40+
"eqeqeq" : true, // Require triple equals i.e. `===`.
41+
"eqnull" : true, // Tolerate use of `== null`.
42+
"evil" : false, // Tolerate use of `eval`.
43+
"expr" : false, // Tolerate `ExpressionStatement` as Programs.
44+
"forin" : false, // Tolerate `for in` loops without `hasOwnPrototype`.
45+
"immed" : true, // Require immediate invocations to be wrapped in parens e.g. `( function(){}() );`
46+
"latedef" : false, // Prohibit variable use before definition.
47+
"laxbreak" : false, // Tolerate unsafe line breaks e.g. `return [\n] x` without semicolons.
48+
"loopfunc" : false, // Allow functions to be defined within loops.
49+
"noarg" : true, // Prohibit use of `arguments.caller` and `arguments.callee`.
50+
"regexdash" : true, // Tolerate unescaped last dash i.e. `[-...]`.
51+
"regexp" : false, // Prohibit `.` and `[^...]` in regular expressions.
52+
"scripturl" : false, // Tolerate script-targeted URLs.
53+
"shadow" : false, // Allows re-define variables later in code e.g. `var x=1; x=2;`.
54+
"supernew" : false, // Tolerate `new function () { ... };` and `new Object;`.
55+
"undef" : false, // Require all non-global variables be declared before they are used.
56+
57+
58+
// Personal styling prefrences.
59+
"newcap" : true, // Require capitalization of all constructor functions e.g. `new F()`.
60+
"noempty" : true, // Prohipit use of empty blocks.
61+
"nomen" : false, // Prohibit use of initial or trailing underbars in names.
62+
"nonew" : true, // Prohibit use of constructors for side-effects.
63+
"onevar" : false, // Allow only one `var` statement per function.
64+
"plusplus" : false, // Prohibit use of `++` & `--`.
65+
"sub" : false, // Tolerate all forms of subscript notation besides dot notation e.g. `dict['key']` instead of `dict.key`.
66+
"trailing" : true, // Prohibit trailing whitespaces.
67+
"white" : false // Check against strict whitespace and indentation rules.
68+
}

0 commit comments

Comments
 (0)