Skip to content

Commit 0a315a2

Browse files
author
Shakeel Mohamed
committed
Add jshintrc file
0 parents  commit 0a315a2

File tree

1 file changed

+72
-0
lines changed

1 file changed

+72
-0
lines changed

.jshintrc

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

0 commit comments

Comments
 (0)