-
Notifications
You must be signed in to change notification settings - Fork 0
/
node.js
67 lines (61 loc) · 1.49 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
"use strict";
const nodeRules = require("./rules/node");
module.exports = {
env: { node: true },
globals: {
// ECMAScript
ArrayBuffer: "readonly",
Atomics: "readonly",
BigInt: "readonly",
BigInt64Array: "readonly",
BigUint64Array: "readonly",
DataView: "readonly",
Float32Array: "readonly",
Float64Array: "readonly",
Int16Array: "readonly",
Int32Array: "readonly",
Int8Array: "readonly",
Map: "readonly",
Promise: "readonly",
Proxy: "readonly",
Reflect: "readonly",
Set: "readonly",
SharedArrayBuffer: "readonly",
Symbol: "readonly",
Uint16Array: "readonly",
Uint32Array: "readonly",
Uint8Array: "readonly",
Uint8ClampedArray: "readonly",
WeakMap: "readonly",
WeakSet: "readonly",
// ECMAScript (experimental)
globalThis: "readonly",
// ECMA-404
Intl: "readonly",
// Web Standard
TextDecoder: "readonly",
TextEncoder: "readonly",
URL: "readonly",
URLSearchParams: "readonly",
WebAssembly: "readonly",
clearInterval: "readonly",
clearTimeout: "readonly",
console: "readonly",
queueMicrotask: "readonly",
setInterval: "readonly",
setTimeout: "readonly",
},
plugins: ["n", "unicorn"],
settings: {
node: {
tryExtensions: [".mjs", ".cjs", ".js", ".jsx", ".json", ".node"],
convertPath: {
"src/**": ["^src/(.+)$", "dist/$1"],
},
},
},
rules: {
...nodeRules,
"unicorn/no-process-exit": "error",
},
};