-
Notifications
You must be signed in to change notification settings - Fork 0
/
node.js
40 lines (38 loc) · 1.19 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
module.exports = {
// Include node plugin
"plugins": [
"node",
],
// Extend default recommended Node.js shareable config
"extends": [
"plugin:node/recommended",
],
"rules": {
/*
ESLint rules
Supported rules: https://eslint.org/docs/rules/
*/
// Reason: unicorn implements a version ignoring hashbanged files
"no-process-exit": "off",
/*
Node rules
Supported rules: https://github.com/mysticatea/eslint-plugin-node#-rules
*/
// Reason: Syntax support isn't the same as support, and this syntax is often sugar on CommonJS
"node/no-unsupported-features/es-syntax": "off",
// Reason: Path concatenation errors
"node/no-path-concat": "error",
// Reason: Async/await and promises are usually easier to understand and use
"node/prefer-promises/fs": "warn",
"node/prefer-promises/dns": "warn",
// Reason: Avoid synchronous methods that can block the thread
"node/no-sync": "warn",
// Reason: the import plugin handles import errors better
"node/no-extraneous-import": "off",
"node/no-extraneous-require": "off",
"node/no-missing-import": "off",
"node/no-missing-require": "off",
"node/no-unpublished-import": "off",
"node/no-unpublished-require": "off",
},
};