UNPKG

5.84 kBPlain TextView Raw
1{
2
3 // Custom globals
4 "predef" : [
5 "define"
6 ],
7
8
9 // Environemnts
10 "browser" : true, // defines globals exposed by modern browsers:
11 "couch" : false, // defines globals exposed by CouchDB
12 "node" : true, // defines globals available when your code is running inside of Node.js
13 "rhino" : false, // defines globals available when your code is running inside of Rhino
14 "worker" : false, // defines globals available when your code is running inside of a Web Worker
15 "wsh" : false, // defines globals available when your code is running as a script for the Windows Script Host.
16
17 "devel" : false, // defines globals that are usually used for logging poor-man's debugging: console, alert
18 "es5" : false, // use ECMAScript 5 specific features such as getters and setters
19 "esnext" : false, // use ES.next specific features such as const
20 "nonstandard" : false, // defines non-standard but widely adopted globals such as escape and unescape
21
22
23 // Whitespace
24 "indent" : 4, // enforces specific tab width
25 "smarttabs" : true, // suppresses warnings about mixed tabs and spaces when the latter are used for alignmnent only
26 "trailing" : true, // error to leave a trailing whitespace in your code
27
28
29 // Code Complexity
30 "maxparams" : 5, // max number of formal parameters allowed per function
31 "maxdepth" : 3, // control how nested do you want your blocks to be
32 "maxstatements" : 40, // max number of statements allowed per function
33 "maxcomplexity" : 8, // control cyclomatic complexity throughout your code
34 "maxlen" : 0, // maximum length of a line
35
36
37 // Enforcing Options
38 "bitwise" : true, // prohibits the use of bitwise operators
39 "camelcase" : true, // force all variable names to use either camelCase style or UPPER_CASE with underscores
40 "curly" : true, // always put curly braces around blocks in loops and conditionals
41 "eqeqeq" : true, // prohibits the use of == and != in favor of === and !==
42 "forin" : true, // requires all for in loops to filter object's items
43 "immed" : true, // prohibits the use of immediate function invocations without wrapping them in parentheses
44 "latedef" : true, // prohibits the use of a variable before it was defined
45 "newcap" : true, // requires you to capitalize names of constructor functions
46 "noarg" : true, // prohibits the use of arguments.caller and arguments.callee
47 "noempty" : true, // warns when you have an empty block in your code
48 "nonew" : true, // prohibits the use of constructor functions for side-effects
49 "plusplus" : true, // prohibits the use of unary increment and decrement operators
50 "quotmark" : "single", // enforces the consistency of quotation marks used throughout your code
51 "regexp" : true, // prohibits the use of unsafe . in regular expressions
52 "undef" : true, // prohibits the use of explicitly undeclared variables
53 "unused" : true, // warns when you define and never use your variables
54 "strict" : false, // requires all functions to run in EcmaScript 5's strict mode
55
56
57 // Relaxing Options
58 "asi" : false, // suppresses warnings about missing semicolons
59 "boss" : false, // suppresses warnings about the use of assignments in cases where comparisons are expected
60 "debug" : false, // suppresses warnings about the debugger statements
61 "eqnull" : false, // suppresses warnings about == null comparisons
62 "evil" : false, // suppresses warnings about the use of eval
63 "expr" : false, // suppresses warnings about the use of expressions where normally you would expect to see assignments or function calls
64 "funcscope" : false, // suppresses warnings about declaring variables inside of control structures while accessing them later from the outside
65 "globalstrict" : false, // suppresses warnings about the use of global strict mode
66 "iterator" : false, // suppresses warnings about the __iterator__ property
67 "lastsemic" : false, // suppresses warnings about missing semicolon
68 "laxbreak" : false, // suppresses most of the warnings about possibly unsafe line breaking
69 "laxcomma" : false, // suppresses warnings about comma-first coding style
70 "loopfunc" : false, // suppresses warnings about functions inside of loops
71 "multistr" : false, // suppresses warnings about multi-line strings
72 "onecase" : false, // suppresses warnings about switches with just one case
73 "proto" : false, // suppresses warnings about the __proto__ property
74 "regexdash" : false, // suppresses warnings about unescaped - in the end of regular expressions
75 "scripturl" : false, // suppresses warnings about the use of script-targeted URLs—such as javascript:...
76 "shadow" : false, // suppresses warnings about variable shadowing
77 "sub" : false, // suppresses warnings about using [] notation when it can be expressed in dot notation: person['name'] vs. person.name
78 "supernew" : false, // suppresses warnings about "weird" constructions like new function () { ... } and new Object;
79 "validthis" : false // suppresses warnings about possible strict violations when the code is running in strict mode and you use this in a non-constructor function
80
81}