-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
52 lines (47 loc) · 918 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
48
49
50
51
52
module.exports = {
root: true,
parserOptions: {
parser: 'babel-eslint',
sourceType: 'module'
},
env: {
node: true,
'jest/globals': true
},
extends: [
'standard',
'standard-jsx',
'plugin:import/errors',
'plugin:import/warnings'
],
plugins: [
'jest'
],
rules: {
// Enforce import order
'import/order': 2,
'import/first': 2,
// Prefer const over let
'prefer-const': [2, {
'destructuring': 'any',
'ignoreReadBeforeAssign': false
}],
// No single if in an "else" block
'no-lonely-if': 2,
// Force curly braces for control flow
curly: 2,
// No async function without await
'require-await': 2,
'space-before-function-paren': [2, {
anonymous: 'always',
named: 'never'
}],
'no-console': 2
},
overrides: [{
files: [ 'bin/*' ],
rules: {
'no-console': 0
}
}]
}