forked from cwilbur12/kin-web-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
79 lines (67 loc) · 2.17 KB
/
.eslintrc.js
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
module.exports = {
extends: ["airbnb", "prettier"],
parser: "babel-eslint",
parserOptions: {
ecmaVersion: 6,
sourceType: "module",
ecmaFeatures: {
impliedStrict: true,
jsx: true
}
},
env: {
browser: true
},
rules: {
// Both styles are awesome ;)
"arrow-body-style": "off",
// Forces class to use `this` or be `static`, making them arguably
// harder to update, thus decreasing the semantic meaning of `static`.
"class-methods-use-this": "off",
// with prettier, we get extra commas in function args which (still)
// creates issues in some JS parsers
"comma-dangle": "off",
// Autofocus can be useful to have more control in forms.
"jsx-a11y/no-autofocus": "off",
// FIXME: usages of handlers on static element, this would increase
// accessibility
"jsx-a11y/no-static-element-interactions": "off",
// Enable 100 chars lines, with a couple of exceptions
"max-len": [
"error",
100,
2,
{
ignoreUrls: true,
ignoreComments: true,
ignoreStrings: true,
ignoreTemplateLiterals: true
}
],
// Bitwise operations can be useful, confusing them with logical
// operators should be catch with unit tests, not a linter
"no-bitwise": "off",
// FIXME: no proper logging in the client, so `console` is used :/
"no-console": "off",
// Personal choice for Kin
"no-underscore-dangle": "off",
// Do not use half-indentation common in React projects
"react/jsx-indent": ["error", 4],
// (mostly) useless
"react/require-default-props": 0,
// Personal choice for Kin
camelcase: "off",
// Personal choice for Kin
indent: ["error", 4]
},
globals: {
// Those are both injected by webpack (see webpack config)
$: false,
KIN_ENV_NAME: false
},
settings: {
"import/resolver": {
"babel-module": {}
}
}
};