@@ -2,42 +2,59 @@ module.exports = {
22 'rules' : {
33 // enforces getter/setter pairs in objects
44 'accessor-pairs' : 0 ,
5+
56 // enforces return statements in callbacks of array's methods
67 // http://eslint.org/docs/rules/array-callback-return
78 'array-callback-return' : 2 ,
9+
810 // treat var statements as if they were block scoped
911 'block-scoped-var' : 2 ,
12+
1013 // specify the maximum cyclomatic complexity allowed in a program
1114 'complexity' : [ 0 , 11 ] ,
15+
1216 // require return statements to either always or never specify values
1317 'consistent-return' : 2 ,
18+
1419 // specify curly brace conventions for all control statements
1520 'curly' : [ 2 , 'multi-line' ] ,
21+
1622 // require default case in switch statements
1723 'default-case' : [ 2 , { 'commentPattern' : '^no default$' } ] ,
24+
1825 // encourages use of dot notation whenever possible
1926 'dot-notation' : [ 2 , { 'allowKeywords' : true } ] ,
27+
2028 // enforces consistent newlines before or after dots
2129 'dot-location' : 0 ,
30+
2231 // require the use of === and !==
2332 // http://eslint.org/docs/rules/eqeqeq
2433 'eqeqeq' : [ 2 , 'allow-null' ] ,
34+
2535 // make sure for-in loops have an if statement
2636 'guard-for-in' : 2 ,
37+
2738 // Blacklist certain identifiers to prevent them being used
2839 // http://eslint.org/docs/rules/id-blacklist
2940 'id-blacklist' : 0 ,
41+
3042 // disallow the use of alert, confirm, and prompt
3143 'no-alert' : 1 ,
44+
3245 // disallow use of arguments.caller or arguments.callee
3346 'no-caller' : 2 ,
47+
3448 // disallow lexical declarations in case/default clauses
3549 // http://eslint.org/docs/rules/no-case-declarations.html
3650 'no-case-declarations' : 2 ,
51+
3752 // disallow division operators explicitly at beginning of regular expression
3853 'no-div-regex' : 0 ,
54+
3955 // disallow else after a return in an if
4056 'no-else-return' : 2 ,
57+
4158 // disallow empty functions, except for standalone funcs/arrows
4259 // http://eslint.org/docs/rules/no-empty-function
4360 'no-empty-function' : [ 2 , {
@@ -47,38 +64,54 @@ module.exports = {
4764 'methods' ,
4865 ]
4966 } ] ,
67+
5068 // disallow empty destructuring patterns
5169 // http://eslint.org/docs/rules/no-empty-pattern
5270 'no-empty-pattern' : 2 ,
71+
5372 // disallow Unnecessary Labels
5473 // http://eslint.org/docs/rules/no-extra-label
5574 'no-extra-label' : 2 ,
75+
5676 // disallow comparisons to null without a type-checking operator
5777 'no-eq-null' : 0 ,
78+
5879 // disallow use of eval()
5980 'no-eval' : 2 ,
81+
6082 // disallow adding to native types
6183 'no-extend-native' : 2 ,
84+
6285 // disallow unnecessary function binding
6386 'no-extra-bind' : 2 ,
87+
6488 // disallow fallthrough of case statements
6589 'no-fallthrough' : 2 ,
90+
6691 // disallow the use of leading or trailing decimal points in numeric literals
6792 'no-floating-decimal' : 2 ,
93+
6894 // disallow the type conversions with shorter notations
6995 'no-implicit-coercion' : 0 ,
96+
7097 // disallow use of eval()-like methods
7198 'no-implied-eval' : 2 ,
99+
72100 // disallow this keywords outside of classes or class-like objects
73101 'no-invalid-this' : 0 ,
102+
74103 // disallow usage of __iterator__ property
75104 'no-iterator' : 2 ,
105+
76106 // disallow use of labels for anything other then loops and switches
77107 'no-labels' : [ 2 , { 'allowLoop' : false , 'allowSwitch' : false } ] ,
108+
78109 // disallow unnecessary nested blocks
79110 'no-lone-blocks' : 2 ,
111+
80112 // disallow creation of functions within loops
81113 'no-loop-func' : 2 ,
114+
82115 // disallow magic numbers
83116 // http://eslint.org/docs/rules/no-magic-numbers
84117 'no-magic-numbers' : [ 0 , {
@@ -87,33 +120,46 @@ module.exports = {
87120 'enforceConst' : true ,
88121 'detectObjects' : false ,
89122 } ] ,
123+
90124 // disallow use of multiple spaces
91125 'no-multi-spaces' : 2 ,
126+
92127 // disallow use of multiline strings
93128 'no-multi-str' : 2 ,
129+
94130 // disallow reassignments of native objects
95131 'no-native-reassign' : 2 ,
132+
96133 // disallow use of new operator when not part of the assignment or comparison
97134 'no-new' : 2 ,
135+
98136 // disallow use of new operator for Function object
99137 'no-new-func' : 2 ,
138+
100139 // disallows creating new instances of String, Number, and Boolean
101140 'no-new-wrappers' : 2 ,
141+
102142 // disallow use of (old style) octal literals
103143 'no-octal' : 2 ,
144+
104145 // disallow use of octal escape sequences in string literals, such as
105146 // var foo = 'Copyright \251';
106147 'no-octal-escape' : 2 ,
148+
107149 // disallow reassignment of function parameters
108150 // disallow parameter object manipulation
109151 // rule: http://eslint.org/docs/rules/no-param-reassign.html
110152 'no-param-reassign' : [ 2 , { 'props' : true } ] ,
153+
111154 // disallow use of process.env
112155 'no-process-env' : 0 ,
156+
113157 // disallow usage of __proto__ property
114158 'no-proto' : 2 ,
159+
115160 // disallow declaring the same variable more then once
116161 'no-redeclare' : 2 ,
162+
117163 // disallow certain syntax forms
118164 // http://eslint.org/docs/rules/no-restricted-syntax
119165 'no-restricted-syntax' : [
@@ -123,48 +169,67 @@ module.exports = {
123169 'LabeledStatement' ,
124170 'WithStatement' ,
125171 ] ,
172+
126173 // disallow use of assignment in return statement
127174 'no-return-assign' : 2 ,
175+
128176 // disallow use of `javascript:` urls.
129177 'no-script-url' : 2 ,
178+
130179 // disallow comparisons where both sides are exactly the same
131180 'no-self-compare' : 2 ,
181+
132182 // disallow use of comma operator
133183 'no-sequences' : 2 ,
184+
134185 // restrict what can be thrown as an exception
135186 'no-throw-literal' : 2 ,
187+
136188 // disallow unmodified conditions of loops
137189 // http://eslint.org/docs/rules/no-unmodified-loop-condition
138190 'no-unmodified-loop-condition' : 0 ,
191+
139192 // disallow return/throw/break/continue inside finally blocks
140193 // http://eslint.org/docs/rules/no-unsafe-finally
141194 'no-unsafe-finally' : 2 ,
195+
142196 // disallow usage of expressions in statement position
143197 'no-unused-expressions' : 2 ,
198+
144199 // disallow unused labels
145200 // http://eslint.org/docs/rules/no-unused-labels
146201 'no-unused-labels' : 2 ,
202+
147203 // disallow unnecessary .call() and .apply()
148204 'no-useless-call' : 0 ,
205+
149206 // disallow useless string concatenation
150207 // http://eslint.org/docs/rules/no-useless-concat
151208 'no-useless-concat' : 2 ,
209+
152210 // disallow unnecessary string escaping
153211 // http://eslint.org/docs/rules/no-useless-escape
154212 'no-useless-escape' : 2 ,
213+
155214 // disallow use of void operator
156215 'no-void' : 0 ,
216+
157217 // disallow usage of configurable warning terms in comments: e.g. todo
158218 'no-warning-comments' : [ 0 , { 'terms' : [ 'todo' , 'fixme' , 'xxx' ] , 'location' : 'start' } ] ,
219+
159220 // disallow use of the with statement
160221 'no-with' : 2 ,
222+
161223 // require use of the second argument for parseInt()
162224 'radix' : 2 ,
225+
163226 // requires to declare all vars on top of their containing scope
164227 'vars-on-top' : 2 ,
228+
165229 // require immediate function invocation to be wrapped in parentheses
166230 // http://eslint.org/docs/rules/wrap-iife.html
167231 'wrap-iife' : [ 2 , 'outside' ] ,
232+
168233 // require or disallow Yoda conditions
169234 'yoda' : 2
170235 }
0 commit comments