-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy path.eslintrc.js
47 lines (40 loc) · 842 Bytes
/
.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
const { NODE_ENV } = process.env;
module.exports = {
root: true,
extends: ['airbnb-base'],
parserOptions: {
ecmaVersion: 2018,
sourceType: "module"
},
parser: "babel-eslint",
env: {
es6: true,
node: true,
browser: true
},
globals: {
window: false,
document: false,
navigator: false
},
rules: {
'no-console': NODE_ENV === 'production'
? ['error', { allow: ['warn', 'error'] }]
: 'off',
'no-debugger': NODE_ENV === 'production'
? 'error'
: 'off',
'linebreak-style': ['error', 'unix'],
'max-len': ['error', { code: 120 }],
'no-param-reassign': 'off',
'func-names': 'off',
'space-before-function-paren': [
'error',
{
anonymous: 'always',
named: 'always',
asyncArrow: 'always',
},
]
}
};