1
+ var OFF = 0 , WARN = 1 , ERROR = 2 ;
2
+
3
+ module . exports = exports = {
4
+ "env" : {
5
+ "es6" : true
6
+ } ,
7
+
8
+ "ecmaFeatures" : {
9
+ // env=es6 doesn't include modules, which we are using
10
+ "modules" : true
11
+ } ,
12
+
13
+ "extends" : "eslint:recommended" ,
14
+
15
+ "rules" : {
16
+ // Possible Errors (overrides from recommended set)
17
+ "no-extra-parens" : ERROR ,
18
+ "no-unexpected-multiline" : ERROR ,
19
+ // All JSDoc comments must be valid
20
+ "valid-jsdoc" : [ ERROR , {
21
+ "requireReturn" : false ,
22
+ "requireReturnDescription" : false ,
23
+ "requireParamDescription" : true ,
24
+ "prefer" : {
25
+ "return" : "returns"
26
+ }
27
+ } ] ,
28
+
29
+ // Best Practices
30
+
31
+ // Allowed a getter without setter, but all setters require getters
32
+ "accessor-pairs" : [ ERROR , {
33
+ "getWithoutSet" : false ,
34
+ "setWithoutGet" : true
35
+ } ] ,
36
+ "block-scoped-var" : WARN ,
37
+ "consistent-return" : ERROR ,
38
+ "curly" : ERROR ,
39
+ "default-case" : WARN ,
40
+ // the dot goes with the property when doing multiline
41
+ "dot-location" : [ WARN , "property" ] ,
42
+ "dot-notation" : WARN ,
43
+ "eqeqeq" : [ ERROR , "smart" ] ,
44
+ "guard-for-in" : WARN ,
45
+ "no-alert" : ERROR ,
46
+ "no-caller" : ERROR ,
47
+ "no-case-declarations" : WARN ,
48
+ "no-div-regex" : WARN ,
49
+ "no-else-return" : WARN ,
50
+ "no-empty-label" : WARN ,
51
+ "no-empty-pattern" : WARN ,
52
+ "no-eq-null" : WARN ,
53
+ "no-eval" : ERROR ,
54
+ "no-extend-native" : ERROR ,
55
+ "no-extra-bind" : WARN ,
56
+ "no-floating-decimal" : WARN ,
57
+ "no-implicit-coercion" : [ WARN , {
58
+ "boolean" : true ,
59
+ "number" : true ,
60
+ "string" : true
61
+ } ] ,
62
+ "no-implied-eval" : ERROR ,
63
+ "no-invalid-this" : ERROR ,
64
+ "no-iterator" : ERROR ,
65
+ "no-labels" : WARN ,
66
+ "no-lone-blocks" : WARN ,
67
+ "no-loop-func" : ERROR ,
68
+ "no-magic-numbers" : WARN ,
69
+ "no-multi-spaces" : ERROR ,
70
+ "no-multi-str" : WARN ,
71
+ "no-native-reassign" : ERROR ,
72
+ "no-new-func" : ERROR ,
73
+ "no-new-wrappers" : ERROR ,
74
+ "no-new" : ERROR ,
75
+ "no-octal-escape" : ERROR ,
76
+ "no-param-reassign" : ERROR ,
77
+ "no-process-env" : WARN ,
78
+ "no-proto" : ERROR ,
79
+ "no-redeclare" : ERROR ,
80
+ "no-return-assign" : ERROR ,
81
+ "no-script-url" : ERROR ,
82
+ "no-self-compare" : ERROR ,
83
+ "no-throw-literal" : ERROR ,
84
+ "no-unused-expressions" : ERROR ,
85
+ "no-useless-call" : ERROR ,
86
+ "no-useless-concat" : ERROR ,
87
+ "no-void" : WARN ,
88
+ // Produce warnings when something is commented as TODO or FIXME
89
+ "no-warning-comments" : [ WARN , {
90
+ "terms" : [ "TODO" , "FIXME" ] ,
91
+ "location" : "start"
92
+ } ] ,
93
+ "no-with" : WARN ,
94
+ "radix" : WARN ,
95
+ "vars-on-top" : ERROR ,
96
+ // Enforces the style of wrapped functions
97
+ "wrap-iife" : [ ERROR , "outside" ] ,
98
+ "yoda" : ERROR ,
99
+
100
+ // Strict Mode - for ES6, never use strict.
101
+ "strict" : [ ERROR , "never" ] ,
102
+
103
+ // Variables
104
+ "init-declarations" : [ ERROR , "always" ] ,
105
+ "no-catch-shadow" : WARN ,
106
+ "no-delete-var" : ERROR ,
107
+ "no-label-var" : ERROR ,
108
+ "no-shadow-restricted-names" : ERROR ,
109
+ "no-shadow" : WARN ,
110
+ // We require all vars to be initialized (see init-declarations)
111
+ // If we NEED a var to be initialized to undefined, it needs to be explicit
112
+ "no-undef-init" : OFF ,
113
+ "no-undef" : ERROR ,
114
+ "no-undefined" : OFF ,
115
+ "no-unused-vars" : WARN ,
116
+ // Disallow hoisting - let & const don't allow hoisting anyhow
117
+ "no-use-before-define" : ERROR ,
118
+
119
+ // Node.js and CommonJS
120
+ "callback-return" : [ WARN , [ "callback" , "next" ] ] ,
121
+ "global-require" : ERROR ,
122
+ "handle-callback-err" : WARN ,
123
+ "no-mixed-requires" : WARN ,
124
+ "no-new-require" : ERROR ,
125
+ // Use path.concat instead
126
+ "no-path-concat" : ERROR ,
127
+ "no-process-exit" : ERROR ,
128
+ "no-restricted-modules" : OFF ,
129
+ "no-sync" : WARN ,
130
+
131
+ // ECMAScript 6 support
132
+ "arrow-body-style" : [ ERROR , "always" ] ,
133
+ "arrow-parens" : [ ERROR , "always" ] ,
134
+ "arrow-spacing" : [ ERROR , { "before" : true , "after" : true } ] ,
135
+ "constructor-super" : ERROR ,
136
+ "generator-star-spacing" : [ ERROR , "before" ] ,
137
+ "no-arrow-condition" : ERROR ,
138
+ "no-class-assign" : ERROR ,
139
+ "no-const-assign" : ERROR ,
140
+ "no-dupe-class-members" : ERROR ,
141
+ "no-this-before-super" : ERROR ,
142
+ "no-var" : WARN ,
143
+ "object-shorthand" : [ WARN , "never" ] ,
144
+ "prefer-arrow-callback" : WARN ,
145
+ "prefer-spread" : WARN ,
146
+ "prefer-template" : WARN ,
147
+ "require-yield" : ERROR ,
148
+
149
+ // Stylistic - everything here is a warning because of style.
150
+ "array-bracket-spacing" : [ WARN , "always" ] ,
151
+ "block-spacing" : [ WARN , "always" ] ,
152
+ "brace-style" : [ WARN , "1tbs" , { "allowSingleLine" : false } ] ,
153
+ "camelcase" : WARN ,
154
+ "comma-spacing" : [ WARN , { "before" : false , "after" : true } ] ,
155
+ "comma-style" : [ WARN , "last" ] ,
156
+ "computed-property-spacing" : [ WARN , "never" ] ,
157
+ "consistent-this" : [ WARN , "self" ] ,
158
+ "eol-last" : WARN ,
159
+ "func-names" : WARN ,
160
+ "func-style" : [ WARN , "declaration" ] ,
161
+ "id-length" : [ WARN , { "min" : 2 , "max" : 32 } ] ,
162
+ "indent" : [ ERROR , 'tab' ] ,
163
+ "jsx-quotes" : [ WARN , "prefer-double" ] ,
164
+ "linebreak-style" : [ WARN , "unix" ] ,
165
+ "lines-around-comment" : [ WARN , { "beforeBlockComment" : true } ] ,
166
+ "max-depth" : [ WARN , 8 ] ,
167
+ "max-len" : [ WARN , 132 ] ,
168
+ "max-nested-callbacks" : [ WARN , 8 ] ,
169
+ "max-params" : [ WARN , 8 ] ,
170
+ "new-cap" : WARN ,
171
+ "new-parens" : WARN ,
172
+ "no-array-constructor" : WARN ,
173
+ "no-bitwise" : OFF ,
174
+ "no-continue" : OFF ,
175
+ "no-inline-comments" : OFF ,
176
+ "no-lonely-if" : WARN ,
177
+ "no-mixed-spaces-and-tabs" : WARN ,
178
+ "no-multiple-empty-lines" : WARN ,
179
+ "no-negated-condition" : OFF ,
180
+ "no-nested-ternary" : WARN ,
181
+ "no-new-object" : WARN ,
182
+ "no-plusplus" : OFF ,
183
+ "no-spaced-func" : WARN ,
184
+ "no-ternary" : OFF ,
185
+ "no-trailing-spaces" : WARN ,
186
+ "no-underscore-dangle" : WARN ,
187
+ "no-unneeded-ternary" : WARN ,
188
+ "object-curly-spacing" : [ WARN , "always" ] ,
189
+ "one-var" : OFF ,
190
+ "operator-assignment" : [ WARN , "never" ] ,
191
+ "operator-linebreak" : [ WARN , "after" ] ,
192
+ "padded-blocks" : [ WARN , "never" ] ,
193
+ "quote-props" : [ WARN , "consistent-as-needed" ] ,
194
+ "quotes" : [ WARN , "single" ] ,
195
+ "require-jsdoc" : [ WARN , {
196
+ "require" : {
197
+ "FunctionDeclaration" : true ,
198
+ "MethodDefinition" : true ,
199
+ "ClassDeclaration" : false
200
+ }
201
+ } ] ,
202
+ "semi-spacing" : [ WARN , { "before" : false , "after" : true } ] ,
203
+ "semi" : [ ERROR , "always" ] ,
204
+ "sort-vars" : OFF ,
205
+ "space-after-keywords" : [ WARN , "always" ] ,
206
+ "space-before-blocks" : [ WARN , "always" ] ,
207
+ "space-before-function-paren" : [ WARN , "never" ] ,
208
+ "space-before-keywords" : [ WARN , "always" ] ,
209
+ "space-in-parens" : [ WARN , "never" ] ,
210
+ "space-infix-ops" : [ WARN , { "int32Hint" : true } ] ,
211
+ "space-return-throw-case" : ERROR ,
212
+ "space-unary-ops" : ERROR ,
213
+ "spaced-comment" : [ WARN , "always" ] ,
214
+ "wrap-regex" : WARN
215
+ }
216
+ } ;
0 commit comments