-
Notifications
You must be signed in to change notification settings - Fork 4
/
.eslintrc
56 lines (55 loc) · 2.16 KB
/
.eslintrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
---
extends: "airbnb"
parser: "babel-eslint"
rules:
camelcase: off # require camel case names
prefer-template: off
object-shorthand: off
quotes: off # ', ", ` no one cares
max-len: off # be sensible
no-mixed-operators: off # allow 1 + 1 * 3
no-confusing-arrow: off # allow (a) => a ? 1 : 2;
no-useless-constructor: off
no-nested-ternary: off
object-curly-spacing: off # allow { a: 1 } and {a: 1}
block-spacing: off # same as above for function blocks on a single line
dot-notation: off # allows someObject["a"] as well as someObject.a
comma-dangle: ["error", "never"]
padded-blocks: off
no-plusplus: off # we are old enought to use i++
arrow-body-style: off
arrow-parens: ["error", "always"] # use brackets always, (a) => body // () => body // (a, b) => body
no-case-declarations: off # we don't surround case blocks with { } in our switch statements as we use fallthroughs deliberately
one-var: off
one-var-declaration-per-line: off
no-console: [1, { "allow": ["warn", "error"] }]
space-infix-ops: off
no-param-reassign: [1, { "props": false }]
no-underscore-dangle: off
no-unused-expressions: ['error', {"allowTernary": true }]
no-restricted-syntax: ['error', 'ForInStatement', 'WithStatement'] # allow ForOfStatement & LabeledStatement
class-methods-use-this: off
react/jsx-tag-spacing: ["error", { "closingSlash": "never", "beforeSelfClosing": "allow", "afterOpening": "never" }]
react/forbid-prop-types: off
react/jsx-filename-extension: [1, { "extensions": [".js", ".jsx"] }]
react/jsx-first-prop-new-line: off
react/no-did-mount-set-state: off
react/no-did-update-set-state: off
react/prop-types: off # possibly reinstate
react/sort-comp: off # possibly reinstate
jsx-a11y/no-static-element-interactions: off
import/prefer-default-export: off
no-labels: off
no-continue: off
no-unneeded-ternary: ["error", { "defaultAssignment": true }]
quote-props: ["error", "as-needed"]
prefer-const: ["error", {"destructuring": "all"}]
parserOptions:
ecmaVersion: 6
sourceType: module
ecmaFeatures:
modules: true
env:
es6: true
browser: true
# https://gist.github.com/odedw/cf14a55aa154adbc3bf7#file-eslintrc-yaml-L4