-
Notifications
You must be signed in to change notification settings - Fork 312
/
.eslintrc
83 lines (80 loc) · 3.03 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
75
76
77
78
79
80
81
82
83
{
"parser": "@babel/eslint-parser",
"parserOptions": {
"sourceType": "module"
},
"env": {
"browser": true,
"node": true,
"es6": true
},
"extends": "airbnb",
"rules": {
"array-bracket-spacing": [1, "never"],
"camelcase": [1],
"class-methods-use-this": 0, // We want to allow helper functions that don't use 'this' in classes
"jsx-a11y/alt-text": 0,
"jsx-a11y/anchor-has-content": 1,
"jsx-a11y/anchor-is-valid": 1,
"jsx-a11y/click-events-have-key-events": 0,
"jsx-a11y/heading-has-content": 1,
"jsx-a11y/iframe-has-title": 1,
"jsx-a11y/label-has-associated-control": 1,
"jsx-a11y/label-has-for": 0, // Deprecated in favor of 'label-has-associated-control'
"jsx-a11y/mouse-events-have-key-events": 1,
"jsx-a11y/no-autofocus": 1,
"jsx-a11y/no-noninteractive-element-interactions": 1,
"jsx-a11y/no-static-element-interactions": 0,
"jsx-quotes": 2,
"linebreak-style": 0,
"max-len": [0, 80, 4],
"no-console": [0],
"no-else-return": [0],
"no-multi-spaces": [0],
"no-multiple-empty-lines": [0], // allow indented comments (like this one)
"no-plusplus": [0],
"no-underscore-dangle": [0],
"object-curly-newline": 0,
"object-curly-spacing": [1,
"always", {
"arraysInObjects": false,
"objectsInObjects": true
}
],
"operator-linebreak": [1, "after"],
"padded-blocks": [1],
"prefer-destructuring": 1,
"quotes": [1, "single", "avoid-escape"],
"radix": 0, // Dec 2018: We always use base 10, so specifying it each time seems excessive
"react-hooks/exhaustive-deps": "warn", // Checks effect dependencies
"react-hooks/rules-of-hooks": "error", // Checks rules of Hooks
"react/button-has-type": 1,
"react/destructuring-assignment": 0, // Dec 2018: We should do this! But right now we have 3990 warnings/errors if enabled.
"react/forbid-prop-types": 0, // Dec 2018: Should consider someday
"react/indent-prop": 0,
"react/jsx-first-prop-new-line": 0,
"react/jsx-indent-props": 0,
"react/jsx-no-bind": 1, // Dec 2018: Should these be errors?
"react/jsx-props-no-spreading": 1,
"react/no-access-state-in-setstate": 1,
"react/no-array-index-key": 1,
"react/no-children-prop": 1,
"react/no-did-mount-set-state": 0,
"react/no-did-update-set-state": 0,
"react/no-string-refs": 1,
"react/no-unused-prop-types": 1,
"react/no-unused-state": 1,
"react/prefer-stateless-function": 0,
"react/prop-types": 1,
"react/require-default-props": 0, // Dec 2018: Might have value someday
"react/sort-comp": 1,
"space-before-function-paren": [1, {"anonymous": "always", "named": "always"}],
"space-in-parens": [1],
"template-curly-spacing": ["warn", "never"],
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }]
},
"plugins": [
"react",
"react-hooks"
]
}