-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
62 lines (61 loc) · 2.01 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
module.exports = {
root: true,
parserOptions: {
ecmascript: 6,
sourceType: 'module',
},
parser: "babel-eslint",
env: {
browser: true,
node: true,
mocha: true,
},
plugins: [
"flowtype"
],
extends: [
"airbnb",
"plugin:flowtype/recommended"
],
rules: {
indent: ["error", 4],
'react/jsx-indent': ['error', 4],
'react/jsx-filename-extension': ['error', { 'extensions': ['.js'] }],
'react/prop-types': ['error', { ignore: ['dispatch'], customValidators: [] }],
'no-param-reassign': ['warn', {
props: true,
ignorePropertyModificationsFor: [
'acc', // for reduce accumulators
'e', // for e.returnvalue
'ctx', // for Koa routing
'req', // for Express requests
'request', // for Express requests
'res', // for Express responses
'response', // for Express responses
'$scope', // for Angular 1 scopes
],
},
],
'consistent-return': 'off',
'react/prefer-stateless-function': 'off',
'react/jsx-indent-props': [1, 4],
'react/no-array-index-key': 'off',
'react/react-in-jsx-scope': 'off',
'jsx-a11y/label-has-for': 'off',
// Expected literal to be on the left side of ==
'yoda': [2, 'always'],
// disallow dangling underscores in identifiers (no-underscore-dangle)
'no-underscore-dangle': 0,
// Prefer destructuring from arrays and objects (prefer-destructuring)
'prefer-destructuring': ["error", {
"array": false,
"object": false
}, {
"enforceForRenamedProperties": false,
}],
'no-console': 'off',
'max-len': ["error", 120],
// Expected an assignment or function call and instead saw an expression
'no-unused-expressions': [2, { allowShortCircuit: true }],
},
};