-
Notifications
You must be signed in to change notification settings - Fork 0
/
node.js
90 lines (81 loc) · 2.09 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
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
module.exports = {
plugins: ['node'],
extends: [
'plugin:node/recommended'
],
rules: {
'no-process-exit': 'error',
// Disabled because it causes too much churn and will be moot when we switch to ES2015 modules
// 'node/exports-style': [
// 'error',
// 'module.exports'
// ]
'node/file-extension-in-import': 0,
'node/no-deprecated-api': 'error',
// Redundant with import/no-extraneous-dependencies
// 'node/no-extraneous-import': 'error',
// 'node/no-extraneous-require': 'error',
// Redundant with import/no-unresolved
// 'node/no-missing-import': 'error',
// 'node/no-missing-require': 'error',
'node/no-unpublished-bin': 'error',
// Disabled because they're too annoying, see:
// https://github.com/mysticatea/eslint-plugin-node/issues/105
// 'node/no-unpublished-import': [
// 'error',
// {
// allowModules: [
// 'electron',
// 'atom'
// ]
// }
// ],
// 'node/no-unpublished-require': [
// 'error',
// {
// allowModules: [
// 'electron',
// 'atom'
// ]
// }
// ],
// Disabled as the rule doesn't allow to exclude compiled sources
// 'node/no-unsupported-features': 'error',
// "node/no-unsupported-features/es-builtins": "error",
// "node/no-unsupported-features/es-syntax": ["error", { ignores: [] }],
// "node/no-unsupported-features/node-builtins": "error",
'node/prefer-global/buffer': [
'error',
'always'
],
'node/prefer-global/console': [
'error',
'always'
],
'node/prefer-global/process': [
'error',
'always'
],
'node/prefer-global/text-decoder': [
'error',
'always'
],
'node/prefer-global/text-encoder': [
'error',
'always'
],
'node/prefer-global/url-search-params': [
'error',
'always'
],
'node/prefer-global/url': [
'error',
'always'
],
'node/prefer-promises/dns': 0,
'node/prefer-promises/fs': 0,
'node/process-exit-as-throw': 'error'
// Disabled as the rule doesn't exclude scripts executed with `node` but not referenced in 'bin'. See https://github.com/mysticatea/eslint-plugin-node/issues/96
// 'node/shebang': '2'
}
};