1 | {
|
2 | "env": {
|
3 | "browser": false,
|
4 | "node": true,
|
5 | "es6": true
|
6 | },
|
7 | "ecmaFeatures": {
|
8 | "arrowFunctions": true,
|
9 | "classes": true,
|
10 | "generators": false,
|
11 | "modules": false
|
12 | },
|
13 |
|
14 | "rules": {
|
15 | // require parens in arrow function arguments
|
16 | "arrow-parens": 0,
|
17 | // require space before/after arrow function's arrow
|
18 | "arrow-spacing": 0,
|
19 | // verify super() callings in constructors
|
20 | "constructor-super": 0,
|
21 | // enforce the spacing around the * in generator functions
|
22 | "generator-star-spacing": 0,
|
23 | // disallow modifying variables of class declarations
|
24 | "no-class-assign": 0,
|
25 | // disallow modifying variables that are declared using const
|
26 | "no-const-assign": 0,
|
27 | // disallow duplicate name in class members
|
28 | "no-dupe-class-members": 0,
|
29 | // disallow to use this/super before super() calling in constructors.
|
30 | "no-this-before-super": 0,
|
31 | // require let or const instead of var
|
32 | "no-var": 0,
|
33 | // require method and property shorthand syntax for object literals
|
34 | "object-shorthand": 0,
|
35 | // suggest using arrow functions as callbacks
|
36 | "prefer-arrow-callback": 0,
|
37 | // suggest using of const declaration for variables that are never modified after declared
|
38 | "prefer-const": 0,
|
39 | // suggest using the spread operator instead of .apply()
|
40 | "prefer-spread": 0,
|
41 | // suggest using Reflect methods where applicable
|
42 | "prefer-reflect": 0,
|
43 | // suggest using template literals instead of strings concatenation
|
44 | "prefer-template": 0,
|
45 | // disallow generator functions that do not have yield
|
46 | "require-yield": 0,
|
47 | // Enforces getter/setter pairs in objects
|
48 | "accessor-pairs": 0,
|
49 | // treat var statements as if they were block scoped
|
50 | "block-scoped-var": 0,
|
51 | // specify the maximum cyclomatic complexity allowed in a program
|
52 | "complexity": 0,
|
53 | // require return statements to either always or never specify values
|
54 | "consistent-return": 0,
|
55 | // specify curly brace conventions for all control statements
|
56 | "curly": [2, "all"],
|
57 | // require default case in switch statements
|
58 | "default-case": 2,
|
59 | // encourages use of dot notation whenever possible
|
60 | "dot-notation": 0,
|
61 | // enforces consistent newlines before or after dots
|
62 | "dot-location": [2, "object"],
|
63 | // require the use of === and !==
|
64 | "eqeqeq": 0,
|
65 | // make sure for-in loops have an if statement
|
66 | "guard-for-in": 0,
|
67 | // disallow the use of alert, confirm, and prompt
|
68 | "no-alert": 0,
|
69 | // disallow use of arguments.caller or arguments.callee
|
70 | "no-caller": 0,
|
71 | // disallow division operators explicitly at beginning of regular expression
|
72 | "no-div-regex": 0,
|
73 | // disallow else after a return in an if
|
74 | "no-else-return": 0,
|
75 | // disallow use of labels for anything other then loops and switches
|
76 | "no-empty-label": 0,
|
77 | // disallow comparisons to null without a type-checking operator
|
78 | "no-eq-null": 0,
|
79 | // disallow use of eval()
|
80 | "no-eval": 2,
|
81 | // disallow adding to native types
|
82 | "no-extend-native": 2,
|
83 | // disallow unnecessary function binding
|
84 | "no-extra-bind": 0,
|
85 | // disallow fallthrough of case statements
|
86 | "no-fallthrough": 0,
|
87 | // disallow the use of leading or trailing decimal points in numeric literals
|
88 | "no-floating-decimal": 0,
|
89 | // disallow the type conversions with shorter notations
|
90 | "no-implicit-coercion": 0,
|
91 | // disallow use of eval()-like methods
|
92 | "no-implied-eval": 0,
|
93 | // disallow this keywords outside of classes or class-like objects
|
94 | "no-invalid-this": 0,
|
95 | // disallow usage of __iterator__ property
|
96 | "no-iterator": 0,
|
97 | // disallow use of labeled statements
|
98 | "no-labels": 0,
|
99 | // disallow unnecessary nested blocks
|
100 | "no-lone-blocks": 0,
|
101 | // disallow creation of functions within loops
|
102 | "no-loop-func": 2,
|
103 | // disallow use of multiple spaces
|
104 | "no-multi-spaces": 0,
|
105 | // disallow use of multiline strings
|
106 | "no-multi-str": 2,
|
107 | // disallow reassignments of native objects
|
108 | "no-native-reassign": 0,
|
109 | // disallow use of new operator when not part of the assignment or comparison
|
110 | "no-new": 0,
|
111 | // disallow use of new operator for Function object
|
112 | "no-new-func": 0,
|
113 | // disallows creating new instances of String,Number, and Boolean
|
114 | "no-new-wrappers": 0,
|
115 | // disallow use of (old style) octal literals
|
116 | "no-octal": 0,
|
117 | // disallow use of octal escape sequences in string literals, such as
|
118 | // var foo = "Copyright \251";
|
119 | "no-octal-escape": 0,
|
120 | // disallow reassignment of function parameters
|
121 | "no-param-reassign": 0,
|
122 | // disallow use of process.env
|
123 | "no-process-env": 0,
|
124 | // disallow usage of __proto__ property
|
125 | "no-proto": 0,
|
126 | // disallow declaring the same variable more then once
|
127 | "no-redeclare": 0,
|
128 | // disallow use of assignment in return statement
|
129 | "no-return-assign": 0,
|
130 | // disallow use of `javascript:` urls.
|
131 | "no-script-url": 0,
|
132 | // disallow comparisons where both sides are exactly the same
|
133 | "no-self-compare": 0,
|
134 | // disallow use of comma operator
|
135 | "no-sequences": 0,
|
136 | // restrict what can be thrown as an exception
|
137 | "no-throw-literal": 0,
|
138 | // disallow usage of expressions in statement position
|
139 | "no-unused-expressions": 0,
|
140 | // disallow unnecessary .call() and .apply()
|
141 | "no-useless-call": 0,
|
142 | // disallow unnecessary concatenation of literals or template literals
|
143 | "no-useless-concat": 0,
|
144 | // disallow use of void operator
|
145 | "no-void": 0,
|
146 | // disallow usage of configurable warning terms in comments: e.g. todo
|
147 | "no-warning-comments": 0,
|
148 | // disallow use of the with statement
|
149 | "no-with": 2,
|
150 | // require use of the second argument for parseInt()
|
151 | "radix": 0,
|
152 | // requires to declare all vars on top of their containing scope
|
153 | "vars-on-top": 0,
|
154 | // require immediate function invocation to be wrapped in parentheses
|
155 | "wrap-iife": 0,
|
156 | // require or disallow Yoda conditions
|
157 | "yoda": 0
|
158 | }
|
159 | }
|