forked from victorporof/tofino
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
47 lines (44 loc) · 1.55 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
{
"parser": "babel-eslint",
"plugins": [
"import",
"react",
"babel",
"jsx-a11y"
],
"extends": [
"airbnb",
"plugin:react/recommended",
"plugin:import/errors",
"plugin:import/warnings"
],
"rules": {
"max-len": ["error", {
"code": 120,
"ignoreUrls": true
}],
// Allow underscore because we're using it to signal private class fields,
// enforced by the babel plugin `transform-private-underscore`.
"no-underscore-dangle": ["off"],
// Airbnb style has some highly opinionated syntax restrictions, such as
// preferring higher order functions instead of for..of loops.
"no-restricted-syntax": ["off"],
// Allow empty constructors in classes so that `transform-class-properties`
// works properly, and thus we can use auto-bound methods in components.
"no-useless-constructor": ["off"],
// Allow modules with a single named export. Since this is an ongoing WIP,
// it's often the case that modules are intended to export multiple symbols.
"import/prefer-default-export": ["off"],
// We prefer extending PureComponent instead of writing stateless functions.
"react/prefer-stateless-function": ["off"],
// We prefer writing stateless PureComponents.
"react/no-set-state": ["error"],
// React recommended rules allows arrow functions in component props. This
// is bad for PureComponents trying to avoid needless rerenders.
"react/jsx-no-bind": ["error", {
"ignoreRefs": false,
"allowArrowFunctions": false,
"allowBind": false
}]
}
}