-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
45 lines (43 loc) 路 1.07 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
module.exports = {
plugins: ['node'],
extends: ['plugin:node/recommended'],
rules: {
/////////////////////
// disabled rules //
/////////////////////
// 'node/no-missing-import': 'off',
'node/no-process-env': 'off',
//////////////////////////////
// eslint-plugin-node rules //
//////////////////////////////
'node/global-require': 'warn',
'node/callback-return': [
'error',
[
// The following variables will be considered callbacks. More can be added as necessary.
'cb',
'callback',
// 'next', // koa uses next()
'done',
],
],
'node/handle-callback-err': ['error', '^.*(e|E)rr(or)?'],
'node/no-callback-literal': 'warn',
'node/no-new-require': 'error',
'node/no-path-concat': 'error',
'node/no-process-exit': 'error',
'node/no-sync': [
'warn',
{
allowAtRootLevel: true,
},
],
// ignored 'modules' because we use typescript modules ??
'node/no-unsupported-features/es-syntax': [
'error',
{ ignores: ['modules'] },
],
'node/no-missing-import': 'off',
'node/no-extraneous-import': 'off',
},
}