-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
42 lines (42 loc) · 1.19 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
module.exports = {
parser: 'babel-eslint',
extends: 'airbnb',
env: {
// https://github.com/eslint/eslint/issues/1827
// using the node environment disables no-console
'node': true,
},
rules: {
'semi': [2, 'never'],
'indent': ['error', 2, {'SwitchCase': 1}],
'strict': [0],
'no-shadow': 'off',
'arrow-parens': [2, 'always'],
'no-unused-expressions': [2, {'allowShortCircuit': true, 'allowTernary': true}],
'no-mixed-operators': [
2,
{
'groups': [
['&', '|', '^', '~', '<<', '>>', '>>>'],
['==', '!=', '===', '!==', '>', '>=', '<', '<='],
['&&', '||'],
['in', 'instanceof']
],
'allowSamePrecedence': true
}
],
'no-plusplus': [2, { 'allowForLoopAfterthoughts': true }],
'class-methods-use-this': 0,
'import/no-extraneous-dependencies': 0,
// reference https://medium.com/@paulwithap/the-most-important-eslint-rule-for-redux-applications-c10f6aeff61d
'import/named': 2,
'no-console': ['error', { 'allow': ['log', 'error'] }],
'no-multi-assign': 'off',
},
'globals': {
'window': false,
'document': false,
'exec': false,
'cp': false,
}
}