-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
67 lines (55 loc) · 1.53 KB
/
index.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
63
64
65
66
67
/**
* .eslintrc.js
* https://eslint.org/docs/user-guide/configuring
*
* Why do I need a linter?
* http://www.sublimelinter.com/en/latest/about.html#why-do-i-need-a-linter
*
* How do I disable linting for a line?
* Add a comment: // eslint-disable-line
*/
module.exports = {
extends: 'airbnb-base',
parser: 'babel-eslint',
env: {
es6: true, // this automatically sets the ecmaVersion parser option to 6
browser: true,
node: true,
mocha: true,
},
globals: {
before: false,
describe: false,
it: false,
},
plugins: [
'import',
],
rules: {
// Overly restrictive
'arrow-body-style': 'off',
// Overly restrictive
'class-methods-use-this': 'off',
// Overly restrictive
'consistent-return': 'off',
// Advantage arguably doesn't outweigh the costs
'func-names': ['off', 'as-needed'],
// JS seems to be moving away from export default as a best-practice
'import/prefer-default-export': 'off',
// Adds friction to debugging
'no-console': 'off',
// Overly restrictive
'no-param-reassign': 'off',
// Little advantage
'no-plusplus': 'off',
// Overly restrictive
'no-underscore-dangle': 'off',
// Un-used arguments can help remind us of function signatures
'no-unused-vars': ['error', { 'args': 'none' }],
// Disagree with convention
'padded-blocks': 'off',
// Object destructuring = mandatory
// Array destructuring = optional
'prefer-destructuring': ['error', {'object': true, 'array': false}],
}
}