-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
55 lines (48 loc) · 1.16 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
const WARN = 1;
const ERROR = 2;
const DISABLE = 0;
module.exports = {
extends: ['eslint:recommended', 'airbnb-base'],
env: {
es6: true,
node: true,
browser: true,
},
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 2017,
sourceType: 'module',
},
rules: {
'no-case-declarations': ERROR,
'no-console': ERROR,
'no-constant-condition': ERROR,
'no-empty-function': ERROR,
'no-func-assign': ERROR,
'no-self-compare': ERROR,
'no-throw-literal': ERROR,
'no-unused-vars': ERROR,
'no-useless-call': ERROR,
'no-useless-constructor': ERROR,
'no-useless-return': ERROR,
'no-var': ERROR,
'no-undef': ERROR,
'no-underscore-dangle': DISABLE,
// This patterns is very convenient in reduce:
// result[k] = v, result
'no-sequences': DISABLE,
'no-return-assign': DISABLE,
'no-param-reassign': DISABLE,
'arrow-parens': [ERROR, 'as-needed'],
'comma-dangle': [
ERROR,
{
arrays: 'always-multiline',
objects: 'always-multiline',
imports: 'always-multiline',
exports: 'always-multiline',
functions: 'ignore',
},
],
},
};