forked from torto/mediawiki-extensions-WikibaseJavaScriptApi
/
.jshintrc
63 lines (60 loc) · 3.67 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
{
"bitwise": true, // Prohibit bitwise operators (&, |, ^, etc.).
"camelcase": true, // Force variable names to be camelcase
"curly": true, // Require {} for every new block or scope.
"eqeqeq": true, // Require triple equals i.e. `===`.
"es3": true, // Prohibit trailing comma in object literals (breaks older versions of IE)
"forin": false, // Don't expect `for in` loops to call `hasOwnPrototype`.
"freeze": true, // Prohibit overwriting prototypes of native objects such as Array, Date and so on.
"immed": true, // Require immediate invocations to be wrapped in parens e.g. `( function(){}() );`
"latedef": true, // Prohibit variable use before definition.
"newcap": true, // Require capitalization of all constructor functions e.g. `new F()`.
"noarg": true, // Prohibit use of `arguments.caller` and `arguments.callee`.
"noempty": true, // Prohibit use of empty blocks.
"nonbsp": true, // Prohibit nbsp
"nonew": true, // Prohibit use of constructors for side-effects.
"plusplus": false, // Allow use of `++` & `--`.
"regexp": true, // Prohibit `.` and `[^...]` in regular expressions.
"undef": true, // Require all non-global variables be declared before they are used.
"unused": false, // Don't warn about unused variables
"strict": true, // Require `use strict` pragma in every file.
"trailing": true, // Prohibit trailing whitespaces.
"asi": false, // Don't tolerate Automatic Semicolon Insertion (no semicolons).
"boss": false, // Don't tolerate assignments inside if, for & while. Usually conditions & loops are for comparison, not assignments.
"debug": false, // Don't allow debugger statements e.g. browser breakpoints.
"eqnull": false, // Don't tolerate use of `== null`.
"es5": false, // Don't allow EcmaScript 5 syntax.
"esnext": false, // Don't allow ES.next specific features such as `const` and `let`.
"evil": false, // Don't tolerate use of `eval`.
"expr": false, // Don't tolerate `ExpressionStatement` as Programs.
"funcscope": false, // Don't tolerate declarations of variables inside of control structures while accessing them later from the outside.
"globalstrict": false, // Don't allow global "use strict" (also enables 'strict').
"iterator": false, // Don't allow usage of __iterator__ property.
"lastsemic": false, // Don't tolerat missing semicolons when the it is omitted for the last statement in a one-line block.
"laxbreak": true, // Tolerate unsafe line breaks e.g. `return [\n] x` without semicolons.
"laxcomma": false, // Don't suppress warnings about comma-first coding style.
"loopfunc": false, // Don't allow functions to be defined within loops.
"multistr": false, // Don't tolerate multi-line strings.
"onecase": false, // Don't tolerate switches with just one case.
"proto": false, // Don't tolerate __proto__ property. This property is deprecated.
"regexdash": false, // Don't tolerate unescaped last dash i.e. `[-...]`.
"scripturl": false, // Don't tolerate script-targeted URLs.
"smarttabs": false, // Don't tolerate mixed tabs and spaces when the latter are used for alignmnent only.
"shadow": false, // Don't allows re-define variables later in code e.g. `var x=1; x=2;`.
"sub": false, // Don't tolerate all forms of subscript notation besides dot notation e.g. `dict['key']` instead of `dict.key`.
"supernew": false, // Don't tolerate `new function () { ... };` and `new Object;`.
"validthis": false, // Don't tolerate strict violations when the code is running in strict mode and you use this in a non-constructor function.
"browser": true, // Standard browser globals e.g. `window`, `document`.
"quotmark": false,
"maxlen": 100,
"maxparams": 7,
"maxdepth": 4,
"maxstatements": 19,
"predef": [
"jQuery",
"mediaWiki",
"util",
"wikibase",
"JSON"
]
}