1{
2  "parserOptions": {
3    "ecmaVersion": 5
4  },
5  "env": {
6    "browser": true
7  },
8  "globals": {
9    "$": true,
10    "window": true,
11    "document": true
12  },
13  "rules": {
14    "max-len": ["error", 800],
15    "vars-on-top": "off",
16    "prefer-template": "off",
17    "no-var": "off",
18    /**
19     * Strict mode
20     */
21    "strict": 0,
22    // http://eslint.org/docs/rules/strict
23
24    /**
25     * Variables
26     */
27    "no-shadow": "error",
28    // http://eslint.org/docs/rules/no-shadow
29    "no-shadow-restricted-names": "error",
30    // http://eslint.org/docs/rules/no-shadow-restricted-names
31    "no-unused-vars": [
32      "error",
33      {
34        // http://eslint.org/docs/rules/no-unused-vars
35        "vars": "local",
36        "args": "after-used"
37      }
38    ],
39    /**
40     * Possible errors
41     */
42    "comma-dangle": 0,
43    // http://eslint.org/docs/rules/comma-dangle
44    "no-cond-assign": [
45      "error",
46      "always"
47    ],
48    // http://eslint.org/docs/rules/no-cond-assign
49    "no-console": "warn",
50    // http://eslint.org/docs/rules/no-console
51    "no-debugger": "warn",
52    // http://eslint.org/docs/rules/no-debugger
53    "no-alert": "warn",
54    "no-continue": "off",
55    "prefer-rest-params": 0,
56    // http://eslint.org/docs/rules/no-alert
57    "no-constant-condition": "warn",
58    // http://eslint.org/docs/rules/no-constant-condition
59    "no-dupe-keys": "error",
60    // http://eslint.org/docs/rules/no-dupe-keys
61    "no-duplicate-case": "error",
62    // http://eslint.org/docs/rules/no-duplicate-case
63    "no-empty": "error",
64    // http://eslint.org/docs/rules/no-empty
65    "no-empty-character-class": "error",
66    // http://eslint.org/docs/rules/no-empty-character-class
67    "no-ex-assign": "error",
68    // http://eslint.org/docs/rules/no-ex-assign
69    "no-extra-semi": "error",
70    // http://eslint.org/docs/rules/no-extra-semi
71    "no-func-assign": "error",
72    // http://eslint.org/docs/rules/no-func-assign
73    "no-inner-declarations": "error",
74    // http://eslint.org/docs/rules/no-inner-declarations
75    "no-invalid-regexp": "error",
76    // http://eslint.org/docs/rules/no-invalid-regexp
77    "no-irregular-whitespace": "error",
78    // http://eslint.org/docs/rules/no-irregular-whitespace
79    "no-negated-in-lhs": "error",
80    // http://eslint.org/docs/rules/no-negated-in-lhs
81    "no-new-require": "error",
82    // http://eslint.org/docs/rules/no-new-require
83    "no-obj-calls": "error",
84    // http://eslint.org/docs/rules/no-obj-calls
85    "no-path-concat": "error",
86    // http://eslint.org/docs/rules/no-path-concat
87    "no-regex-spaces": "error",
88    // http://eslint.org/docs/rules/no-regex-spaces
89    "no-sparse-arrays": "error",
90    // http://eslint.org/docs/rules/no-sparse-arrays
91    "no-unreachable": "error",
92    // http://eslint.org/docs/rules/no-unreachable
93    "use-isnan": "error",
94    // http://eslint.org/docs/rules/use-isnan
95    "valid-jsdoc": "error",
96    // http://eslint.org/docs/rules/valid-jsdoc
97    "valid-typeof": "error",
98    // http://eslint.org/docs/rules/valid-typeof
99    "no-restricted-syntax": "off",
100
101    /**
102     * Best practices
103     */
104    "consistent-return": "error",
105    // http://eslint.org/docs/rules/consistent-return
106    "curly": [
107      "error",
108      "multi-line"
109    ],
110    // http://eslint.org/docs/rules/curly
111    "default-case": "error",
112    // http://eslint.org/docs/rules/default-case
113    "dot-notation": [
114      "error",
115      {
116        // http://eslint.org/docs/rules/dot-notation
117        "allowKeywords": true
118      }
119    ],
120    "eqeqeq": "error",
121    // http://eslint.org/docs/rules/eqeqeq
122    "guard-for-in": "error",
123    // http://eslint.org/docs/rules/guard-for-in
124    "no-caller": "error",
125    // http://eslint.org/docs/rules/no-caller
126    "no-div-regex": "error",
127    // http://eslint.org/docs/rules/no-div-regex
128    "no-else-return": "error",
129    // http://eslint.org/docs/rules/no-else-return
130    "no-labels": "error",
131    // http://eslint.org/docs/rules/no-labels
132    "no-eq-null": "error",
133    // http://eslint.org/docs/rules/no-eq-null
134    "no-eval": 0,
135    // http://eslint.org/docs/rules/no-eval
136    "no-extend-native": "error",
137    // http://eslint.org/docs/rules/no-extend-native
138    "no-extra-bind": "error",
139    // http://eslint.org/docs/rules/no-extra-bind
140    "no-fallthrough": "error",
141    // http://eslint.org/docs/rules/no-fallthrough
142    "no-floating-decimal": "error",
143    // http://eslint.org/docs/rules/no-floating-decimal
144    "no-implied-eval": "error",
145    // http://eslint.org/docs/rules/no-implied-eval
146    "no-lone-blocks": "error",
147    // http://eslint.org/docs/rules/no-lone-blocks
148    "no-loop-func": "error",
149    // http://eslint.org/docs/rules/no-loop-func
150    "no-multi-str": "error",
151    // http://eslint.org/docs/rules/no-multi-str
152    "no-native-reassign": "error",
153    // http://eslint.org/docs/rules/no-native-reassign
154    "no-new": "error",
155    // http://eslint.org/docs/rules/no-new
156    "no-new-func": "error",
157    // http://eslint.org/docs/rules/no-new-func
158    "no-new-wrappers": "error",
159    // http://eslint.org/docs/rules/no-new-wrappers
160    "no-octal": "error",
161    // http://eslint.org/docs/rules/no-octal
162    "no-octal-escape": "error",
163    // http://eslint.org/docs/rules/no-octal-escape
164    "no-param-reassign": "off",
165    // http://eslint.org/docs/rules/no-param-reassign
166    "no-process-exit": "error",
167    // http://eslint.org/docs/rules/no-process-exit
168    "no-proto": "error",
169    // http://eslint.org/docs/rules/no-proto
170    "no-redeclare": "error",
171    // http://eslint.org/docs/rules/no-redeclare
172    "no-return-assign": "error",
173    // http://eslint.org/docs/rules/no-return-assign
174    "no-script-url": "error",
175    // http://eslint.org/docs/rules/no-script-url
176    "no-self-compare": "error",
177    // http://eslint.org/docs/rules/no-self-compare
178    "no-sequences": "error",
179    // http://eslint.org/docs/rules/no-sequences
180    "no-throw-literal": "error",
181    // http://eslint.org/docs/rules/no-throw-literal
182    "no-undef": "error",
183    // http://eslint.org/docs/rules/no-undef
184    "no-undef-init": "error",
185    // http://eslint.org/docs/rules/no-undef-init
186    "no-undefined": "warn",
187    // http://eslint.org/docs/rules/no-undefined
188    "no-underscore-dangle": 0,
189    "no-with": "error",
190    // http://eslint.org/docs/rules/no-with
191    "handle-callback-err": "warn",
192    // http://eslint.org/docs/rules/handle-callback-err
193    "radix": "error",
194    // http://eslint.org/docs/rules/radix
195    "wrap-iife": [
196      "error",
197      "any"
198    ],
199    // http://eslint.org/docs/rules/wrap-iife
200    "yoda": "error",
201    // http://eslint.org/docs/rules/yoda
202
203    /**
204     * Style
205     */
206    "indent": [
207      "error",
208      2
209    ],
210    // http://eslint.org/docs/rules/indent
211    "brace-style": [
212      "error",
213      // http://eslint.org/docs/rules/brace-style
214      "1tbs",
215      {
216        "allowSingleLine": true
217      }
218    ],
219    "quotes": [
220      // http://eslint.org/docs/rules/quotes
221      "error",
222      "single",
223      "avoid-escape"
224    ],
225    "camelcase": [
226      "warn",
227      {
228        // http://eslint.org/docs/rules/camelcase
229        "properties": "never"
230      }
231    ],
232    "comma-spacing": [
233      "error",
234      {
235        // http://eslint.org/docs/rules/comma-spacing
236        "before": false,
237        "after": true
238      }
239    ],
240    "comma-style": [
241      "error",
242      "last"
243    ],
244    // http://eslint.org/docs/rules/comma-style
245    "eol-last": "error",
246    // http://eslint.org/docs/rules/eol-last
247    "func-names": 0,
248    "prefer-arrow-callback": 0,
249    "object-shorthand": 0,
250    // http://eslint.org/docs/rules/func-names
251    "key-spacing": [
252      "error",
253      {
254        // http://eslint.org/docs/rules/key-spacing
255        "beforeColon": false,
256        "afterColon": true
257      }
258    ],
259    "new-cap": [
260      "error",
261      {
262        // http://eslint.org/docs/rules/new-cap
263        "newIsCap": true
264      }
265    ],
266    "new-parens": "error",
267    // http://eslint.org/docs/rules/new-parens
268    "no-array-constructor": "error",
269    // http://eslint.org/docs/rules/no-array-constructor
270    "no-lonely-if": "warn",
271    // http://eslint.org/docs/rules/no-lonely-if
272    "no-mixed-spaces-and-tabs": "warn",
273    // http://eslint.org/docs/rules/no-mixed-spaces-and-tabs
274    "no-multiple-empty-lines": [
275      "error",
276      {
277        // http://eslint.org/docs/rules/no-multiple-empty-lines
278        "max": 2
279      }
280    ],
281    "no-nested-ternary": "error",
282    // http://eslint.org/docs/rules/no-nested-ternary
283    "no-new-object": "error",
284    // http://eslint.org/docs/rules/no-new-object
285    "no-spaced-func": "error",
286    // http://eslint.org/docs/rules/no-spaced-func
287    "no-trailing-spaces": "error",
288    // http://eslint.org/docs/rules/no-trailing-spaces
289    "no-extra-parens": [
290      "error",
291      "functions"
292    ],
293    // http://eslint.org/docs/rules/no-extra-params
294    "one-var": [
295      "error",
296      "never"
297    ],
298    // http://eslint.org/docs/rules/one-var
299    "padded-blocks": [
300      "error",
301      "never"
302    ],
303    // http://eslint.org/docs/rules/padded-blocks
304    "semi": [
305      "error",
306      "always"
307    ],
308    // http://eslint.org/docs/rules/semi
309    "semi-spacing": [
310      "error",
311      {
312        // http://eslint.org/docs/rules/semi-spacing
313        "before": false,
314        "after": true
315      }
316    ],
317    "keyword-spacing": "error",
318    // http://eslint.org/docs/rules/keyword-spacing
319    "space-before-blocks": "error",
320    // http://eslint.org/docs/rules/space-before-blocks
321    "space-before-function-paren": [
322      "error",
323      {
324        "anonymous": "always",
325        "named": "never"
326      }
327    ],
328    // http://eslint.org/docs/rules/space-before-function-paren
329    "space-infix-ops": "error",
330    // http://eslint.org/docs/rules/space-infix-ops
331    "space-unary-ops": "error",
332    // http://eslint.org/docs/rules/space-unary-ops
333    "spaced-comment": [
334      "error",
335      "always",
336      {
337        // http://eslint.org/docs/rules/spaced-comment
338        "exceptions": [
339          "-",
340          "+"
341        ],
342        "markers": [
343          "=",
344          "!"
345        ]
346        // space here to support sprockets directives
347      }
348    ]
349  }
350}
351