forked from nextstrain/auspice
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc
74 lines (74 loc) · 2.78 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
---
extends: "airbnb"
plugins: ["react-hooks"]
parser: "babel-eslint"
globals:
page: true
browser: true
context: true
jestPuppeteer: true
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-multi-spaces: ["error", { ignoreEOLComments: true }]
no-labels: off
no-unused-labels: off
no-continue: off
no-unneeded-ternary: ["error", { "defaultAssignment": true }]
quote-props: ["error", "as-needed"]
prefer-const: ["error", {"destructuring": "all"}]
indent: ["error", 2, {"MemberExpression": "off", "SwitchCase": 1}]
react-hooks/rules-of-hooks: "error"
react-hooks/exhaustive-deps: "warn"
object-curly-newline: off
operator-linebreak: ["error", "after", { "overrides": { "?": "ignore", ":": "ignore" } }]
react/destructuring-assignment: off
prefer-destructuring: off
implicit-arrow-linebreak: off
jsx-quotes: off
no-use-before-define: ["error", { "functions": false }]
parserOptions:
ecmaVersion: 6
sourceType: module
ecmaFeatures:
modules: true
env:
es6: true
browser: true
jest: true
# https://gist.github.com/odedw/cf14a55aa154adbc3bf7#file-eslintrc-yaml-L4