forked from kstafford3/ssh2-shell-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
40 lines (39 loc) · 1.24 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
// http://eslint.org/docs/user-guide/configuring
module.exports = {
root: true,
parserOptions: {
sourceType: 'module'
},
env: {
node: true,
},
// https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style
extends: 'standard',
// required to lint *.vue files
plugins: [
'node'
],
// add your custom rules here
'rules': {
// enforce 2 spaces for indentation
'indent': ['error', 2],
// allow paren-less arrow functions
'arrow-parens': 'off',
// allow async-await
'generator-star-spacing': 'off',
// allow debugger during development
'no-debugger': (process.env.NODE_ENV === 'production' ? 'error' : 'off'),
// require semicolons
'semi': [ 'error', 'always' ],
// require trailing commas
'comma-dangle': ['error', 'always-multiline'],
// require space before function paren, only for anonymous and arrow methods
'space-before-function-paren': [ 'error', {'anonymous': 'never', 'named': 'never', 'asyncArrow': 'always'} ],
// put linebreak before the operator
'operator-linebreak': ['error', 'before'],
// let me shortcut out of forEaches
'no-useless-return': 'off',
// let me create objects without handles
'no-new': 'off',
}
}