UNPKG

4.79 kBPlain TextView Raw
1{
2 // Enforcing Options /////////////////////////////////////////////////////////
3
4 "bitwise" : true, // Prohibit bitwise operators (&, |, ^, etc.).
5 "curly" : true, // Require {} for every new block or scope.
6 "eqeqeq" : true, // Require triple equals i.e. `===`.
7 "forin" : false, // Tolerate `for in` loops without `hasOwnPrototype`.
8 "immed" : true, // Require immediate invocations to be wrapped in parens e.g. `( function(){}() );`
9 "latedef" : true, // Prohibit hariable use before definition.
10 "newcap" : true, // Require capitalization of all constructor functions e.g. `new F()`.
11 "noarg" : true, // Prohibit use of `arguments.caller` and `arguments.callee`.
12 "noempty" : true, // Prohibit use of empty blocks.
13 "nonew" : true, // Prohibit use of constructors for side-effects.
14 "plusplus" : true, // Prohibit use of `++` & `--`.
15 "regexp" : false, // Prohibit `.` and `[^...]` in regular expressions.
16 "undef" : true, // Require all non-global variables be declared before they are used.
17 "strict" : true, // Require `use strict` pragma in every file.
18 "trailing" : true, // Prohibit trailing whitespaces.
19
20 // Relaxing Options //////////////////////////////////////////////////////////
21
22 "asi" : false, // Tolerate Automatic Semicolon Insertion (no semicolons).
23 "boss" : false, // Tolerate assignments inside if, for & while. Usually conditions & loops are for comparison, not assignments.
24 "debug" : false, // Allow debugger statements e.g. browser breakpoints.
25 "eqnull" : false, // Tolerate use of `== null`.
26 "es5" : true, // Allow ECMAScript 5 syntax.
27 "esnext" : false, // Allow ES.next specific features such as const and let
28 "evil" : false, // Tolerate use of `eval`.
29 "expr" : false, // Tolerate `ExpressionStatement` as Programs.
30 "funcscope" : false, // Tolerate declaring variables inside of control structures while accessing them later
31 "globalstrict" : true, // Allow global "use strict" (also enables 'strict').
32 "iterator" : false, // Allow usage of __iterator__ property.
33 "lastsemic" : false, // Tolerate semicolon omited for the last statement.
34 "laxbreak" : false, // Tolerate unsafe line breaks e.g. `return [\n] x` without semicolons.
35 "loopfunc" : false, // Allow functions to be defined within loops.
36 "multistr" : false, // Tolerate multi-line strings.
37 "onecase" : false, // Tolerate swithes with only one case.
38 "proto" : false, // Allow usage of __proto__ property.
39 "regexdash" : false, // Tolerate unescaped last dash i.e. `[-...]`.
40 "scripturl" : true, // Tolerate script-targeted URLs.
41 "smarttabs" : false, // Allow mixed tabs and spaces when the latter are used for alignmnent only.
42 "shadow" : false, // Allows re-define variables later in code e.g. `var x=1; x=2;`.
43 "sub" : true, // Tolerate all forms of subscript notation besides dot notation e.g. `dict['key']` instead of `dict.key`.
44 "supernew" : true, // Tolerate `new function () { ... };` and `new Object;`.
45
46 // Environments //////////////////////////////////////////////////////////////
47
48 "browser" : false, // Defines globals exposed by modern browsers
49 "couch" : false, // Defines globals exposed by CouchDB
50 "devel" : false, // Allow developments statements e.g. `console.log();`.
51 "dojo" : false, // Defines globals exposed by the Dojo Toolkit
52 "jquery" : false, // Defines globals exposed by the jQuery
53 "mootools" : false, // Defines globals exposed by the MooTools
54 "node" : true, // Defines globals exposed when running under Node.JS
55 "nonstandard" : false, // Defines non-standard but widely adopted globals such as escape and unescape
56 "prototypejs" : false, // Defines globals exposed by the Prototype
57 "rhino" : false, // Defines globals exposed when running under Rhino
58 "wsh" : false, // Defines globals exposed when running under WSH
59
60 // Legacy ////////////////////////////////////////////////////////////////////
61
62 "nomen" : false, // Prohibit use of initial or trailing underbars in names.
63 "onevar" : false, // Allow only one `var` statement per function.
64 "passfail" : false, // Stop on first error.
65 "white" : false, // Check against strict whitespace and indentation rules.
66
67 // Undocumented //////////////////////////////////////////////////////////////
68
69 "maxerr" : 100, // Maximum error before stopping.
70 "indent" : 2 // Specify indentation spacing
71}