-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathnode.js
41 lines (41 loc) · 1.45 KB
/
node.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
module.exports = {
env: {
node: true
},
extends: ['plugin:n/recommended'],
rules: {
// eslint-plugin-n Possible Errors
'n/handle-callback-err': 'error',
'n/no-new-require': 'error',
'n/no-path-concat': 'error',
// eslint-plugin-n Stylistic Issues
'n/callback-return': 'error',
'n/exports-style': 'error',
'n/file-extension-in-import': ['warn', 'never'],
'n/global-require': 'error',
'n/no-sync': 'error',
'n/prefer-promises/dns': 'error',
'n/prefer-promises/fs': 'error',
'n/no-sync': 'off'
},
overrides: [
{
files: ['*.ts', '*.tsx'],
rules: {
// eslint-plugin-n Possible Errors
'n/no-missing-import': 'off', // unnecessary for TypeScript
'n/no-unpublished-import': 'off', // doesn't support import types from devDependencies
'n/no-unsupported-features/es-syntax': 'off', // unnecessary for TypeScript
// eslint-plugin-n Stylistic Issues
'n/file-extension-in-import': 'off' // unnecessary for TypeScript
}
},
{
files: ['*{spec, test, tests}.*', '**/__tests__/**', '**/test/**'],
rules: {
// eslint-plugin-n Stylistic Issues
'n/no-sync': 'off' // allow sync methods in tests, e.g. when use factory.ts
}
}
]
};