forked from gajus/eslint-config-canonical
-
Notifications
You must be signed in to change notification settings - Fork 0
/
node.js
62 lines (61 loc) · 1.7 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
const globals = require('globals');
module.exports.recommended = {
languageOptions: {
globals: {
...globals.node,
},
},
plugins: {
import: require('eslint-plugin-import'),
// eslint-disable-next-line id-length
n: require('eslint-plugin-n'),
unicorn: require('eslint-plugin-unicorn'),
},
rules: {
'n/callback-return': 2,
'n/exports-style': [2, 'module.exports'],
'n/file-extension-in-import': 0,
'n/global-require': 2,
'n/handle-callback-err': 2,
'n/no-callback-literal': 2,
'n/no-deprecated-api': 2,
'n/no-exports-assign': 2,
'n/no-extraneous-import': 2,
'n/no-extraneous-require': 2,
'n/no-missing-import': 0,
'n/no-missing-require': 0,
'n/no-mixed-requires': 0,
'n/no-new-require': 2,
'n/no-path-concat': 2,
'n/no-process-env': 2,
'n/no-process-exit': 2,
'n/no-restricted-import': 0,
'n/no-restricted-require': 0,
'n/no-sync': 0,
'n/no-unpublished-bin': 2,
'n/no-unpublished-import': 0,
'n/no-unpublished-require': 0,
'n/no-unsupported-features/es-builtins': 0,
'n/no-unsupported-features/es-syntax': 0,
'n/no-unsupported-features/node-builtins': 0,
'n/prefer-global/buffer': 2,
'n/prefer-global/console': 2,
'n/prefer-global/process': 2,
'n/prefer-global/text-decoder': 2,
'n/prefer-global/text-encoder': 2,
'n/prefer-global/url': 2,
'n/prefer-global/url-search-params': 2,
'n/prefer-promises/dns': 2,
'n/prefer-promises/fs': 2,
'n/process-exit-as-throw': 2,
'n/shebang': [
2,
{
convertPath: {
'src/**/*.js': ['^src/(.+?)\\.js$', 'dist/$1.js'],
},
},
],
'unicorn/prefer-node-protocol': 2,
},
};