eslint-plugin-n 17.11.0 → 17.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/configs/_commons.js +5 -2
- package/lib/eslint-utils.d.ts +1 -4
- package/lib/index.js +34 -34
- package/lib/rules/callback-return.js +4 -8
- package/lib/rules/exports-style.js +49 -42
- package/lib/rules/file-extension-in-import.js +23 -19
- package/lib/rules/global-require.js +2 -2
- package/lib/rules/no-callback-literal.js +4 -6
- package/lib/rules/no-deprecated-api.js +10 -18
- package/lib/rules/no-hide-core-modules.js +0 -3
- package/lib/rules/no-mixed-requires.js +12 -16
- package/lib/rules/no-path-concat.js +37 -29
- package/lib/rules/no-unsupported-features/es-syntax.js +16 -7
- package/lib/rules/prefer-node-protocol.js +11 -14
- package/lib/rules/prefer-promises/dns.js +32 -22
- package/lib/rules/prefer-promises/fs.js +5 -1
- package/lib/unsupported-features/node-builtins-modules/assert.js +7 -2
- package/lib/unsupported-features/node-builtins-modules/async_hooks.js +6 -2
- package/lib/unsupported-features/node-builtins-modules/buffer.js +6 -2
- package/lib/unsupported-features/node-builtins-modules/child_process.js +6 -2
- package/lib/unsupported-features/node-builtins-modules/cluster.js +6 -2
- package/lib/unsupported-features/node-builtins-modules/console.js +6 -2
- package/lib/unsupported-features/node-builtins-modules/crypto.js +9 -3
- package/lib/unsupported-features/node-builtins-modules/dgram.js +6 -2
- package/lib/unsupported-features/node-builtins-modules/diagnostics_channel.js +6 -2
- package/lib/unsupported-features/node-builtins-modules/dns.js +6 -2
- package/lib/unsupported-features/node-builtins-modules/domain.js +6 -2
- package/lib/unsupported-features/node-builtins-modules/events.js +9 -3
- package/lib/unsupported-features/node-builtins-modules/fs.js +15 -5
- package/lib/unsupported-features/node-builtins-modules/http.js +6 -2
- package/lib/unsupported-features/node-builtins-modules/http2.js +6 -2
- package/lib/unsupported-features/node-builtins-modules/https.js +6 -2
- package/lib/unsupported-features/node-builtins-modules/inspector.js +12 -4
- package/lib/unsupported-features/node-builtins-modules/module.js +8 -2
- package/lib/unsupported-features/node-builtins-modules/net.js +6 -2
- package/lib/unsupported-features/node-builtins-modules/os.js +6 -2
- package/lib/unsupported-features/node-builtins-modules/path.js +6 -2
- package/lib/unsupported-features/node-builtins-modules/perf_hooks.js +6 -2
- package/lib/unsupported-features/node-builtins-modules/process.js +19 -2
- package/lib/unsupported-features/node-builtins-modules/punycode.js +6 -2
- package/lib/unsupported-features/node-builtins-modules/querystring.js +6 -2
- package/lib/unsupported-features/node-builtins-modules/readline.js +9 -3
- package/lib/unsupported-features/node-builtins-modules/repl.js +6 -2
- package/lib/unsupported-features/node-builtins-modules/sea.js +10 -5
- package/lib/unsupported-features/node-builtins-modules/sqlite.js +6 -2
- package/lib/unsupported-features/node-builtins-modules/stream.js +21 -9
- package/lib/unsupported-features/node-builtins-modules/string_decoder.js +6 -2
- package/lib/unsupported-features/node-builtins-modules/test.js +8 -3
- package/lib/unsupported-features/node-builtins-modules/timers.js +9 -3
- package/lib/unsupported-features/node-builtins-modules/tls.js +6 -2
- package/lib/unsupported-features/node-builtins-modules/trace_events.js +6 -2
- package/lib/unsupported-features/node-builtins-modules/tty.js +6 -2
- package/lib/unsupported-features/node-builtins-modules/url.js +6 -2
- package/lib/unsupported-features/node-builtins-modules/util.js +14 -5
- package/lib/unsupported-features/node-builtins-modules/v8.js +6 -2
- package/lib/unsupported-features/node-builtins-modules/vm.js +6 -2
- package/lib/unsupported-features/node-builtins-modules/wasi.js +6 -2
- package/lib/unsupported-features/node-builtins-modules/worker_threads.js +7 -2
- package/lib/unsupported-features/node-builtins-modules/zlib.js +6 -2
- package/lib/unsupported-features/node-builtins.js +3 -2
- package/lib/unsupported-features/node-globals.js +14 -6
- package/lib/util/check-existence.js +0 -3
- package/lib/util/check-extraneous.js +5 -7
- package/lib/util/check-publish.js +0 -3
- package/lib/util/extend-trackmap-with-node-prefix.js +1 -1
- package/lib/util/get-configured-node-version.js +12 -5
- package/lib/util/has-parent-node.js +18 -0
- package/lib/util/import-target.js +20 -19
- package/lib/util/map-typescript-extension.js +12 -2
- package/lib/util/merge-visitors-in-place.js +1 -2
- package/lib/util/visit-import.js +2 -1
- package/lib/util/visit-require.js +4 -0
- package/package.json +28 -28
- package/types/index.d.ts +14 -37
|
@@ -10,6 +10,7 @@ const {
|
|
|
10
10
|
ReferenceTracker,
|
|
11
11
|
getStringIfConstant,
|
|
12
12
|
} = require("@eslint-community/eslint-utils")
|
|
13
|
+
const { hasParentNode } = require("../util/has-parent-node.js")
|
|
13
14
|
|
|
14
15
|
/**
|
|
15
16
|
* Get the first char of the specified template element.
|
|
@@ -27,18 +28,21 @@ function collectFirstCharsOfTemplateElement(
|
|
|
27
28
|
globalScope,
|
|
28
29
|
outNextChars
|
|
29
30
|
) {
|
|
30
|
-
const element = node.quasis[i]
|
|
31
|
+
const element = node.quasis[i]?.value.cooked
|
|
31
32
|
|
|
32
33
|
if (element == null) {
|
|
33
34
|
return
|
|
34
35
|
}
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
|
|
37
|
+
const first = element[0]
|
|
38
|
+
if (first) {
|
|
39
|
+
outNextChars.push(first)
|
|
37
40
|
return
|
|
38
41
|
}
|
|
42
|
+
|
|
39
43
|
if (node.expressions.length > i) {
|
|
40
44
|
collectFirstChars(
|
|
41
|
-
node.expressions
|
|
45
|
+
node.expressions.at(i),
|
|
42
46
|
sepNodes,
|
|
43
47
|
globalScope,
|
|
44
48
|
outNextChars
|
|
@@ -48,14 +52,14 @@ function collectFirstCharsOfTemplateElement(
|
|
|
48
52
|
|
|
49
53
|
/**
|
|
50
54
|
* Get the first char of a given node.
|
|
51
|
-
* @param {import('estree').Node} node The `TemplateLiteral` node to get.
|
|
55
|
+
* @param {import('estree').Node | undefined} node The `TemplateLiteral` node to get.
|
|
52
56
|
* @param {Set<import('estree').Node>} sepNodes The nodes of `path.sep`.
|
|
53
57
|
* @param {import("eslint").Scope.Scope} globalScope The global scope object.
|
|
54
58
|
* @param {string[]} outNextChars The array to collect chars.
|
|
55
59
|
* @returns {void}
|
|
56
60
|
*/
|
|
57
61
|
function collectFirstChars(node, sepNodes, globalScope, outNextChars) {
|
|
58
|
-
switch (node
|
|
62
|
+
switch (node?.type) {
|
|
59
63
|
case "AssignmentExpression":
|
|
60
64
|
collectFirstChars(node.right, sepNodes, globalScope, outNextChars)
|
|
61
65
|
break
|
|
@@ -102,13 +106,19 @@ function collectFirstChars(node, sepNodes, globalScope, outNextChars) {
|
|
|
102
106
|
case "MemberExpression":
|
|
103
107
|
if (sepNodes.has(node)) {
|
|
104
108
|
outNextChars.push(path.sep)
|
|
105
|
-
|
|
109
|
+
} else {
|
|
110
|
+
const str = getStringIfConstant(node, globalScope)?.at(0)
|
|
111
|
+
if (str) {
|
|
112
|
+
outNextChars.push(str)
|
|
113
|
+
}
|
|
106
114
|
}
|
|
107
|
-
|
|
115
|
+
break
|
|
108
116
|
default: {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
117
|
+
if (node) {
|
|
118
|
+
const str = getStringIfConstant(node, globalScope)?.at(0)
|
|
119
|
+
if (str) {
|
|
120
|
+
outNextChars.push(str)
|
|
121
|
+
}
|
|
112
122
|
}
|
|
113
123
|
}
|
|
114
124
|
}
|
|
@@ -122,37 +132,39 @@ function collectFirstChars(node, sepNodes, globalScope, outNextChars) {
|
|
|
122
132
|
function isPathSeparator(c) {
|
|
123
133
|
return c === "/" || c === path.sep
|
|
124
134
|
}
|
|
125
|
-
/** @typedef {import('estree').Identifier & { parent: import('estree').Node }} Identifier */
|
|
126
135
|
|
|
127
136
|
/**
|
|
128
137
|
* Check if the given Identifier node is followed by string concatenation with a
|
|
129
138
|
* path separator.
|
|
130
|
-
* @param {Identifier} node The `__dirname` or `__filename` node to check.
|
|
139
|
+
* @param {import('estree').Identifier} node The `__dirname` or `__filename` node to check.
|
|
131
140
|
* @param {Set<import('estree').Node>} sepNodes The nodes of `path.sep`.
|
|
132
141
|
* @param {import("eslint").Scope.Scope} globalScope The global scope object.
|
|
133
142
|
* @returns {boolean} `true` if the given Identifier node is followed by string
|
|
134
143
|
* concatenation with a path separator.
|
|
135
144
|
*/
|
|
136
145
|
function isConcat(node, sepNodes, globalScope) {
|
|
137
|
-
|
|
146
|
+
if (!hasParentNode(node)) {
|
|
147
|
+
return false
|
|
148
|
+
}
|
|
149
|
+
|
|
138
150
|
/** @type {string[]} */
|
|
139
151
|
const nextChars = []
|
|
140
152
|
|
|
141
153
|
if (
|
|
142
|
-
parent.type === "BinaryExpression" &&
|
|
143
|
-
parent.operator === "+" &&
|
|
144
|
-
parent.left === node
|
|
154
|
+
node.parent.type === "BinaryExpression" &&
|
|
155
|
+
node.parent.operator === "+" &&
|
|
156
|
+
node.parent.left === node
|
|
145
157
|
) {
|
|
146
158
|
collectFirstChars(
|
|
147
|
-
parent.right,
|
|
159
|
+
node.parent.right,
|
|
148
160
|
sepNodes,
|
|
149
161
|
globalScope,
|
|
150
162
|
/* out */ nextChars
|
|
151
163
|
)
|
|
152
|
-
} else if (parent.type === "TemplateLiteral") {
|
|
164
|
+
} else if (node.parent.type === "TemplateLiteral") {
|
|
153
165
|
collectFirstCharsOfTemplateElement(
|
|
154
|
-
parent,
|
|
155
|
-
parent.expressions.indexOf(node) + 1,
|
|
166
|
+
node.parent,
|
|
167
|
+
node.parent.expressions.indexOf(node) + 1,
|
|
156
168
|
sepNodes,
|
|
157
169
|
globalScope,
|
|
158
170
|
/* out */ nextChars
|
|
@@ -208,16 +220,12 @@ module.exports = {
|
|
|
208
220
|
__filename: { [READ]: true },
|
|
209
221
|
})) {
|
|
210
222
|
if (
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
globalScope
|
|
215
|
-
)
|
|
223
|
+
node.type === "Identifier" &&
|
|
224
|
+
hasParentNode(node) &&
|
|
225
|
+
isConcat(node, sepNodes, globalScope)
|
|
216
226
|
) {
|
|
217
227
|
context.report({
|
|
218
|
-
node:
|
|
219
|
-
node
|
|
220
|
-
).parent,
|
|
228
|
+
node: node.parent,
|
|
221
229
|
messageId: "usePathFunctions",
|
|
222
230
|
})
|
|
223
231
|
}
|
|
@@ -54,18 +54,27 @@ const ruleMap = Object.entries(features).map(([ruleId, meta]) => {
|
|
|
54
54
|
ignoreKeys.add(ignoreName)
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
const supported = getSemverRange(meta.supported ?? "<0")
|
|
58
|
+
if (supported == null) {
|
|
59
|
+
throw new Error(`Invalid semver Range: "${meta.supported}"`)
|
|
60
|
+
}
|
|
61
|
+
/** @type {RuleMap} */
|
|
62
|
+
const rule = {
|
|
58
63
|
ruleId: ruleId,
|
|
59
64
|
feature: ruleIdNegated,
|
|
60
65
|
ignoreNames: ignoreNames,
|
|
61
|
-
supported:
|
|
62
|
-
getSemverRange(meta.supported ?? "<0")
|
|
63
|
-
),
|
|
64
|
-
strictMode: meta.strictMode
|
|
65
|
-
? getSemverRange(meta.strictMode)
|
|
66
|
-
: undefined,
|
|
66
|
+
supported: supported,
|
|
67
67
|
deprecated: Boolean(meta.deprecated),
|
|
68
68
|
}
|
|
69
|
+
|
|
70
|
+
if (meta.strictMode) {
|
|
71
|
+
const range = getSemverRange(meta.strictMode)
|
|
72
|
+
if (range) {
|
|
73
|
+
rule.strictMode = range
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return rule
|
|
69
78
|
})
|
|
70
79
|
|
|
71
80
|
/**
|
|
@@ -4,8 +4,9 @@
|
|
|
4
4
|
*/
|
|
5
5
|
"use strict"
|
|
6
6
|
|
|
7
|
+
const { Range } = require("semver")
|
|
8
|
+
|
|
7
9
|
const getConfiguredNodeVersion = require("../util/get-configured-node-version")
|
|
8
|
-
const getSemverRange = require("../util/get-semver-range")
|
|
9
10
|
const visitImport = require("../util/visit-import")
|
|
10
11
|
const visitRequire = require("../util/visit-require")
|
|
11
12
|
const mergeVisitorsInPlace = require("../util/merge-visitors-in-place")
|
|
@@ -23,12 +24,8 @@ function isBuiltin(name) {
|
|
|
23
24
|
|
|
24
25
|
const messageId = "preferNodeProtocol"
|
|
25
26
|
|
|
26
|
-
const supportedRangeForEsm =
|
|
27
|
-
|
|
28
|
-
)
|
|
29
|
-
const supportedRangeForCjs = /** @type {import('semver').Range} */ (
|
|
30
|
-
getSemverRange("^14.18.0 || >= 16.0.0")
|
|
31
|
-
)
|
|
27
|
+
const supportedRangeForEsm = new Range("^12.20.0 || >= 14.13.1")
|
|
28
|
+
const supportedRangeForCjs = new Range("^14.18.0 || >= 16.0.0")
|
|
32
29
|
|
|
33
30
|
/** @type {import('eslint').Rule.RuleModule} */
|
|
34
31
|
module.exports = {
|
|
@@ -86,7 +83,7 @@ module.exports = {
|
|
|
86
83
|
}
|
|
87
84
|
|
|
88
85
|
/**
|
|
89
|
-
* @param {import('estree').Node} node
|
|
86
|
+
* @param {import('estree').Node} [node]
|
|
90
87
|
* @returns {node is import('estree').Literal}
|
|
91
88
|
*/
|
|
92
89
|
function isStringLiteral(node) {
|
|
@@ -156,12 +153,12 @@ module.exports = {
|
|
|
156
153
|
continue
|
|
157
154
|
}
|
|
158
155
|
|
|
159
|
-
const { value } = /** @type {{ value: string }}*/ (node)
|
|
160
156
|
if (
|
|
161
|
-
|
|
162
|
-
value
|
|
163
|
-
|
|
164
|
-
!isBuiltin(
|
|
157
|
+
!("value" in node) ||
|
|
158
|
+
typeof node.value !== "string" ||
|
|
159
|
+
node.value.startsWith("node:") ||
|
|
160
|
+
!isBuiltin(node.value) ||
|
|
161
|
+
!isBuiltin(`node:${node.value}`)
|
|
165
162
|
) {
|
|
166
163
|
continue
|
|
167
164
|
}
|
|
@@ -170,7 +167,7 @@ module.exports = {
|
|
|
170
167
|
node,
|
|
171
168
|
messageId,
|
|
172
169
|
data: {
|
|
173
|
-
moduleName: value,
|
|
170
|
+
moduleName: node.value,
|
|
174
171
|
},
|
|
175
172
|
fix(fixer) {
|
|
176
173
|
const firstCharacterIndex =
|
|
@@ -10,30 +10,33 @@ const {
|
|
|
10
10
|
ReferenceTracker,
|
|
11
11
|
} = require("@eslint-community/eslint-utils")
|
|
12
12
|
|
|
13
|
+
/** @type {import('@eslint-community/eslint-utils').TraceMap<boolean>} */
|
|
14
|
+
const dns = {
|
|
15
|
+
lookup: { [CALL]: true },
|
|
16
|
+
lookupService: { [CALL]: true },
|
|
17
|
+
Resolver: { [CONSTRUCT]: true },
|
|
18
|
+
getServers: { [CALL]: true },
|
|
19
|
+
resolve: { [CALL]: true },
|
|
20
|
+
resolve4: { [CALL]: true },
|
|
21
|
+
resolve6: { [CALL]: true },
|
|
22
|
+
resolveAny: { [CALL]: true },
|
|
23
|
+
resolveCname: { [CALL]: true },
|
|
24
|
+
resolveMx: { [CALL]: true },
|
|
25
|
+
resolveNaptr: { [CALL]: true },
|
|
26
|
+
resolveNs: { [CALL]: true },
|
|
27
|
+
resolvePtr: { [CALL]: true },
|
|
28
|
+
resolveSoa: { [CALL]: true },
|
|
29
|
+
resolveSrv: { [CALL]: true },
|
|
30
|
+
resolveTxt: { [CALL]: true },
|
|
31
|
+
reverse: { [CALL]: true },
|
|
32
|
+
setServers: { [CALL]: true },
|
|
33
|
+
}
|
|
34
|
+
|
|
13
35
|
/** @type {import('@eslint-community/eslint-utils').TraceMap<boolean>} */
|
|
14
36
|
const traceMap = {
|
|
15
|
-
dns:
|
|
16
|
-
|
|
17
|
-
lookupService: { [CALL]: true },
|
|
18
|
-
Resolver: { [CONSTRUCT]: true },
|
|
19
|
-
getServers: { [CALL]: true },
|
|
20
|
-
resolve: { [CALL]: true },
|
|
21
|
-
resolve4: { [CALL]: true },
|
|
22
|
-
resolve6: { [CALL]: true },
|
|
23
|
-
resolveAny: { [CALL]: true },
|
|
24
|
-
resolveCname: { [CALL]: true },
|
|
25
|
-
resolveMx: { [CALL]: true },
|
|
26
|
-
resolveNaptr: { [CALL]: true },
|
|
27
|
-
resolveNs: { [CALL]: true },
|
|
28
|
-
resolvePtr: { [CALL]: true },
|
|
29
|
-
resolveSoa: { [CALL]: true },
|
|
30
|
-
resolveSrv: { [CALL]: true },
|
|
31
|
-
resolveTxt: { [CALL]: true },
|
|
32
|
-
reverse: { [CALL]: true },
|
|
33
|
-
setServers: { [CALL]: true },
|
|
34
|
-
},
|
|
37
|
+
dns: dns,
|
|
38
|
+
"node:dns": dns,
|
|
35
39
|
}
|
|
36
|
-
traceMap["node:dns"] = traceMap.dns
|
|
37
40
|
|
|
38
41
|
/** @type {import('eslint').Rule.RuleModule} */
|
|
39
42
|
module.exports = {
|
|
@@ -65,7 +68,14 @@ module.exports = {
|
|
|
65
68
|
|
|
66
69
|
for (const { node, path } of references) {
|
|
67
70
|
const name = path[path.length - 1]
|
|
68
|
-
|
|
71
|
+
if (name == null) {
|
|
72
|
+
continue
|
|
73
|
+
}
|
|
74
|
+
const firstLetter = name[0]
|
|
75
|
+
if (firstLetter == null) {
|
|
76
|
+
continue
|
|
77
|
+
}
|
|
78
|
+
const isClass = firstLetter === firstLetter.toUpperCase()
|
|
69
79
|
context.report({
|
|
70
80
|
node,
|
|
71
81
|
messageId: isClass
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
const { READ } = require("@eslint-community/eslint-utils")
|
|
4
4
|
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* @satisfies {import('../types.js').SupportVersionTraceMap}
|
|
7
|
+
*/
|
|
6
8
|
const assert = {
|
|
7
9
|
assert: { [READ]: { supported: ["0.5.9"] } },
|
|
8
10
|
deepEqual: { [READ]: { supported: ["0.1.21"] } },
|
|
@@ -38,6 +40,7 @@ const assert = {
|
|
|
38
40
|
deprecated: ["20.1.0"],
|
|
39
41
|
},
|
|
40
42
|
},
|
|
43
|
+
strict: {},
|
|
41
44
|
}
|
|
42
45
|
|
|
43
46
|
assert.strict = {
|
|
@@ -45,7 +48,9 @@ assert.strict = {
|
|
|
45
48
|
[READ]: { supported: ["9.9.0", "8.13.0"] },
|
|
46
49
|
}
|
|
47
50
|
|
|
48
|
-
/**
|
|
51
|
+
/**
|
|
52
|
+
* @satisfies {import('../types.js').SupportVersionTraceMap}
|
|
53
|
+
*/
|
|
49
54
|
module.exports = {
|
|
50
55
|
assert: {
|
|
51
56
|
...assert,
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
const { READ } = require("@eslint-community/eslint-utils")
|
|
4
4
|
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* @satisfies {import('../types.js').SupportVersionTraceMap}
|
|
7
|
+
*/
|
|
6
8
|
const async_hooks = {
|
|
7
9
|
createHook: { [READ]: { experimental: ["8.1.0"] } },
|
|
8
10
|
executionAsyncResource: { [READ]: { experimental: ["13.9.0", "12.17.0"] } },
|
|
@@ -25,7 +27,9 @@ const async_hooks = {
|
|
|
25
27
|
},
|
|
26
28
|
}
|
|
27
29
|
|
|
28
|
-
/**
|
|
30
|
+
/**
|
|
31
|
+
* @satisfies {import('../types.js').SupportVersionTraceMap}
|
|
32
|
+
*/
|
|
29
33
|
module.exports = {
|
|
30
34
|
async_hooks: {
|
|
31
35
|
[READ]: {
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
const { CONSTRUCT, READ } = require("@eslint-community/eslint-utils")
|
|
4
4
|
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* @satisfies {import('../types.js').SupportVersionTraceMap}
|
|
7
|
+
*/
|
|
6
8
|
const buffer = {
|
|
7
9
|
constants: { [READ]: { supported: ["8.2.0"] } },
|
|
8
10
|
INSPECT_MAX_BYTES: { [READ]: { supported: ["0.5.4"] } },
|
|
@@ -43,7 +45,9 @@ const buffer = {
|
|
|
43
45
|
},
|
|
44
46
|
}
|
|
45
47
|
|
|
46
|
-
/**
|
|
48
|
+
/**
|
|
49
|
+
* @satisfies {import('../types.js').SupportVersionTraceMap}
|
|
50
|
+
*/
|
|
47
51
|
module.exports = {
|
|
48
52
|
buffer: {
|
|
49
53
|
[READ]: { supported: ["0.1.90"] },
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
const { READ } = require("@eslint-community/eslint-utils")
|
|
4
4
|
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* @satisfies {import('../types.js').SupportVersionTraceMap}
|
|
7
|
+
*/
|
|
6
8
|
const child_process = {
|
|
7
9
|
exec: { [READ]: { supported: ["0.1.90"] } },
|
|
8
10
|
execFile: { [READ]: { supported: ["0.1.91"] } },
|
|
@@ -14,7 +16,9 @@ const child_process = {
|
|
|
14
16
|
ChildProcess: { [READ]: { supported: ["2.2.0"] } },
|
|
15
17
|
}
|
|
16
18
|
|
|
17
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* @satisfies {import('../types.js').SupportVersionTraceMap}
|
|
21
|
+
*/
|
|
18
22
|
module.exports = {
|
|
19
23
|
child_process: {
|
|
20
24
|
[READ]: { supported: ["0.1.90"] },
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
const { READ } = require("@eslint-community/eslint-utils")
|
|
4
4
|
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* @satisfies {import('../types.js').SupportVersionTraceMap}
|
|
7
|
+
*/
|
|
6
8
|
const cluster = {
|
|
7
9
|
isMaster: { [READ]: { supported: ["0.8.1"], deprecated: ["16.0.0"] } },
|
|
8
10
|
isPrimary: { [READ]: { supported: ["16.0.0"] } },
|
|
@@ -18,7 +20,9 @@ const cluster = {
|
|
|
18
20
|
Worker: { [READ]: { supported: ["0.7.0"] } },
|
|
19
21
|
}
|
|
20
22
|
|
|
21
|
-
/**
|
|
23
|
+
/**
|
|
24
|
+
* @satisfies {import('../types.js').SupportVersionTraceMap}
|
|
25
|
+
*/
|
|
22
26
|
module.exports = {
|
|
23
27
|
cluster: {
|
|
24
28
|
[READ]: { supported: ["0.7.0"] },
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
const { READ } = require("@eslint-community/eslint-utils")
|
|
4
4
|
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* @satisfies {import('../types.js').SupportVersionTraceMap}
|
|
7
|
+
*/
|
|
6
8
|
const console = {
|
|
7
9
|
profile: { [READ]: { supported: ["8.0.0"] } },
|
|
8
10
|
profileEnd: { [READ]: { supported: ["8.0.0"] } },
|
|
@@ -34,7 +36,9 @@ const console = {
|
|
|
34
36
|
// timelineEnd: { [READ]: { supported: ["8.0.0"] } },
|
|
35
37
|
}
|
|
36
38
|
|
|
37
|
-
/**
|
|
39
|
+
/**
|
|
40
|
+
* @satisfies {import('../types.js').SupportVersionTraceMap}
|
|
41
|
+
*/
|
|
38
42
|
module.exports = {
|
|
39
43
|
console: {
|
|
40
44
|
[READ]: { supported: ["0.1.100"] },
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
const { CALL, CONSTRUCT, READ } = require("@eslint-community/eslint-utils")
|
|
4
4
|
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* @satisfies {import('../types.js').SupportVersionTraceMap}
|
|
7
|
+
*/
|
|
6
8
|
const WebCrypto = {
|
|
7
9
|
[READ]: { experimental: ["15.0.0"], supported: ["19.0.0"] },
|
|
8
10
|
subtle: {
|
|
@@ -24,7 +26,9 @@ const WebCrypto = {
|
|
|
24
26
|
randomUUID: { [READ]: { supported: ["16.7.0"] } },
|
|
25
27
|
}
|
|
26
28
|
|
|
27
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* @satisfies {import('../types.js').SupportVersionTraceMap}
|
|
31
|
+
*/
|
|
28
32
|
const crypto = {
|
|
29
33
|
constants: { [READ]: { supported: ["6.3.0"] } },
|
|
30
34
|
fips: { [READ]: { supported: ["6.0.0"], deprecated: ["10.0.0"] } },
|
|
@@ -125,7 +129,9 @@ const crypto = {
|
|
|
125
129
|
X509Certificate: { [READ]: { supported: ["15.6.0"] } },
|
|
126
130
|
}
|
|
127
131
|
|
|
128
|
-
/**
|
|
132
|
+
/**
|
|
133
|
+
* @satisfies {import('../types.js').SupportVersionTraceMap}
|
|
134
|
+
*/
|
|
129
135
|
module.exports = {
|
|
130
136
|
crypto: {
|
|
131
137
|
[READ]: { supported: ["0.1.92"] },
|
|
@@ -2,13 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
const { READ } = require("@eslint-community/eslint-utils")
|
|
4
4
|
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* @satisfies {import('../types.js').SupportVersionTraceMap}
|
|
7
|
+
*/
|
|
6
8
|
const dgram = {
|
|
7
9
|
createSocket: { [READ]: { supported: ["0.1.99"] } },
|
|
8
10
|
Socket: { [READ]: { supported: ["0.1.99"] } },
|
|
9
11
|
}
|
|
10
12
|
|
|
11
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* @satisfies {import('../types.js').SupportVersionTraceMap}
|
|
15
|
+
*/
|
|
12
16
|
module.exports = {
|
|
13
17
|
dgram: {
|
|
14
18
|
[READ]: { supported: ["0.1.99"] },
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
const { READ } = require("@eslint-community/eslint-utils")
|
|
4
4
|
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* @satisfies {import('../types.js').SupportVersionTraceMap}
|
|
7
|
+
*/
|
|
6
8
|
const diagnostics_channel = {
|
|
7
9
|
hasSubscribers: { [READ]: { supported: ["15.1.0", "14.17.0"] } },
|
|
8
10
|
channel: { [READ]: { supported: ["15.1.0", "14.17.0"] } },
|
|
@@ -13,7 +15,9 @@ const diagnostics_channel = {
|
|
|
13
15
|
TracingChannel: { [READ]: { experimental: ["19.9.0"] } },
|
|
14
16
|
}
|
|
15
17
|
|
|
16
|
-
/**
|
|
18
|
+
/**
|
|
19
|
+
* @satisfies {import('../types.js').SupportVersionTraceMap}
|
|
20
|
+
*/
|
|
17
21
|
module.exports = {
|
|
18
22
|
diagnostics_channel: {
|
|
19
23
|
[READ]: {
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
const { READ } = require("@eslint-community/eslint-utils")
|
|
4
4
|
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* @satisfies {import('../types.js').SupportVersionTraceMap}
|
|
7
|
+
*/
|
|
6
8
|
const dns = {
|
|
7
9
|
Resolver: { [READ]: { supported: ["8.3.0"] } },
|
|
8
10
|
getServers: { [READ]: { supported: ["0.11.3"] } },
|
|
@@ -56,7 +58,9 @@ const dns = {
|
|
|
56
58
|
},
|
|
57
59
|
}
|
|
58
60
|
|
|
59
|
-
/**
|
|
61
|
+
/**
|
|
62
|
+
* @satisfies {import('../types.js').SupportVersionTraceMap}
|
|
63
|
+
*/
|
|
60
64
|
module.exports = {
|
|
61
65
|
dns: { ...dns, [READ]: { supported: ["0.1.16"] } },
|
|
62
66
|
"node:dns": { ...dns, [READ]: { supported: ["14.13.1", "12.20.0"] } },
|
|
@@ -2,13 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
const { READ } = require("@eslint-community/eslint-utils")
|
|
4
4
|
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* @satisfies {import('../types.js').SupportVersionTraceMap}
|
|
7
|
+
*/
|
|
6
8
|
const domain = {
|
|
7
9
|
create: { [READ]: { supported: ["0.7.8"] } },
|
|
8
10
|
Domain: { [READ]: { supported: ["0.7.8"] } },
|
|
9
11
|
}
|
|
10
12
|
|
|
11
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* @satisfies {import('../types.js').SupportVersionTraceMap}
|
|
15
|
+
*/
|
|
12
16
|
module.exports = {
|
|
13
17
|
domain: {
|
|
14
18
|
[READ]: {
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
const { READ } = require("@eslint-community/eslint-utils")
|
|
4
4
|
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* @satisfies {import('../types.js').SupportVersionTraceMap}
|
|
7
|
+
*/
|
|
6
8
|
const EventEmitterStatic = {
|
|
7
9
|
defaultMaxListeners: { [READ]: { supported: ["0.11.2"] } },
|
|
8
10
|
errorMonitor: { [READ]: { supported: ["13.6.0", "12.17.0"] } },
|
|
@@ -27,7 +29,9 @@ const EventEmitterStatic = {
|
|
|
27
29
|
addAbortListener: { [READ]: { experimental: ["20.5.0", "18.18.0"] } },
|
|
28
30
|
}
|
|
29
31
|
|
|
30
|
-
/**
|
|
32
|
+
/**
|
|
33
|
+
* @satisfies {import('../types.js').SupportVersionTraceMap}
|
|
34
|
+
*/
|
|
31
35
|
const events = {
|
|
32
36
|
Event: { [READ]: { experimental: ["14.5.0"], supported: ["15.4.0"] } },
|
|
33
37
|
EventTarget: {
|
|
@@ -59,7 +63,9 @@ const events = {
|
|
|
59
63
|
...EventEmitterStatic,
|
|
60
64
|
}
|
|
61
65
|
|
|
62
|
-
/**
|
|
66
|
+
/**
|
|
67
|
+
* @satisfies {import('../types.js').SupportVersionTraceMap}
|
|
68
|
+
*/
|
|
63
69
|
module.exports = {
|
|
64
70
|
events: {
|
|
65
71
|
[READ]: { supported: ["0.1.26"] },
|