-
Notifications
You must be signed in to change notification settings - Fork 0
/
node.js
41 lines (37 loc) · 1.22 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
import eslintJsPlugin from '@eslint/js';
import nodePlugin from 'eslint-plugin-n';
import jsdocConfig from './jsdoc.js';
export default [
{
...eslintJsPlugin.configs.all,
files: ['**/*.js', '**/*.cjs', '**/*.mjs'],
},
...jsdocConfig,
nodePlugin.configs['flat/recommended-module'],
{
rules: {
'n/callback-return': 'error',
'n/exports-style': 'error',
'n/file-extension-in-import': 'error',
'n/global-require': 'error',
'n/handle-callback-err': ['error', '^.*(e|E)rror'],
'n/no-callback-literal': 'error',
'n/no-mixed-requires': 'error',
'n/no-new-require': 'error',
'n/no-path-concat': 'error',
'n/no-process-env': 'error',
'n/no-process-exit': 'error',
'n/no-sync': 'error',
'n/no-unpublished-import': ['error', { ignoreTypeImport: true }],
'n/prefer-global/buffer': 'error',
'n/prefer-global/console': 'error',
'n/prefer-global/process': 'error',
'n/prefer-global/text-decoder': 'error',
'n/prefer-global/text-encoder': 'error',
'n/prefer-global/url': 'error',
'n/prefer-global/url-search-params': 'error',
'n/prefer-promises/dns': 'error',
'n/prefer-promises/fs': 'error',
},
},
];