Skip to content

Commit d153b93

Browse files
committed
Breaking: update no-unsupported-features/node-builtins rule
1 parent 5860795 commit d153b93

File tree

2 files changed

+40
-2
lines changed

2 files changed

+40
-2
lines changed

docs/rules/no-unsupported-features/node-builtins.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Editor integrations of ESLint would be useful to know it in real-time.
88

99
## Rule Details
1010

11-
This rule reports APIs of Node.js built-in APIs on the basis of [Node.js v10.6.0 Documentation](https://nodejs.org/docs/v10.6.0/api/).
11+
This rule reports APIs of Node.js built-in APIs on the basis of [Node.js v11.0.0 Documentation](https://nodejs.org/docs/v11.0.0/api/).
1212

1313
### Configured Node.js version range
1414

@@ -62,6 +62,8 @@ The `"ignores"` option accepts an array of the following strings.
6262
- `"Buffer.allocUnsafe"`
6363
- `"Buffer.allocUnsafeSlow"`
6464
- `"Buffer.from"`
65+
- `"TextDecoder"`
66+
- `"TextEncoder"`
6567
- `"URL"`
6668
- `"URLSearchParams"`
6769
- `"console.clear"`
@@ -76,6 +78,7 @@ The `"ignores"` option accepts an array of the following strings.
7678
- `"console.markTimeline"`
7779
- `"console.profile"`
7880
- `"console.profileEnd"`
81+
- `"console.timeLog"`
7982
- `"console.timeStamp"`
8083
- `"console.timeline"`
8184
- `"console.timelineEnd"`
@@ -86,11 +89,13 @@ The `"ignores"` option accepts an array of the following strings.
8689
- `"process.getegid"`
8790
- `"process.geteuid"`
8891
- `"process.hasUncaughtExceptionCaptureCallback"`
92+
- `"process.hrtime.bigint"`
8993
- `"process.ppid"`
9094
- `"process.release"`
9195
- `"process.setegid"`
9296
- `"process.seteuid"`
9397
- `"process.setUncaughtExceptionCaptureCallback"`
98+
- `"queueMicrotask"`
9499
- `"require.resolve.paths"`
95100

96101
**`assert` module:**
@@ -136,6 +141,7 @@ The `"ignores"` option accepts an array of the following strings.
136141
- `"console.markTimeline"`
137142
- `"console.profile"`
138143
- `"console.profileEnd"`
144+
- `"console.timeLog"`
139145
- `"console.timeStamp"`
140146
- `"console.timeline"`
141147
- `"console.timelineEnd"`
@@ -147,6 +153,8 @@ The `"ignores"` option accepts an array of the following strings.
147153
- `"crypto.Certificate.verifySpkac"`
148154
- `"crypto.constants"`
149155
- `"crypto.fips"`
156+
- `"crypto.generateKeyPair"`
157+
- `"crypto.generateKeyPairSync"`
150158
- `"crypto.getCurves"`
151159
- `"crypto.getFips"`
152160
- `"crypto.privateEncrypt"`
@@ -166,6 +174,7 @@ The `"ignores"` option accepts an array of the following strings.
166174

167175
**`fs` module:**
168176

177+
- `"fs.Dirent"`
169178
- `"fs.copyFile"`
170179
- `"fs.copyFileSync"`
171180
- `"fs.mkdtemp"`
@@ -189,7 +198,10 @@ The `"ignores"` option accepts an array of the following strings.
189198
**`os` module:**
190199

191200
- `"os.constants"`
201+
- `"os.constants.priority"`
202+
- `"os.getPriority"`
192203
- `"os.homedir"`
204+
- `"os.setPriority"`
193205
- `"os.userInfo"`
194206

195207
**`path` module:**
@@ -202,13 +214,15 @@ The `"ignores"` option accepts an array of the following strings.
202214

203215
**`process` module:**
204216

217+
- `"process.allowedNodeEnvironmentFlags"`
205218
- `"process.argv0"`
206219
- `"process.channel"`
207220
- `"process.cpuUsage"`
208221
- `"process.emitWarning"`
209222
- `"process.getegid"`
210223
- `"process.geteuid"`
211224
- `"process.hasUncaughtExceptionCaptureCallback"`
225+
- `"process.hrtime.bigint"`
212226
- `"process.ppid"`
213227
- `"process.release"`
214228
- `"process.setegid"`
@@ -243,6 +257,7 @@ The `"ignores"` option accepts an array of the following strings.
243257
- `"util.TextDecoder"`
244258
- `"util.TextEncoder"`
245259
- `"util.types"`
260+
- `"util.types.isBoxedPrimitive"`
246261

247262
**`v8` module:**
248263

@@ -259,6 +274,7 @@ The `"ignores"` option accepts an array of the following strings.
259274
**`vm` module:**
260275

261276
- `"vm.Module"`
277+
- `"vm.compileFunction"`
262278

263279
**`worker_threads` module:**
264280

lib/rules/no-unsupported-features/node-builtins.js

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const enumeratePropertyNames = require("../../util/enumerate-property-names")
1111
/*eslint-disable camelcase */
1212
const trackMap = {
1313
globals: {
14+
queueMicrotask: { [READ]: { supported: "11.0.0" } },
1415
require: {
1516
resolve: {
1617
paths: { [READ]: { supported: "8.9.0" } },
@@ -60,6 +61,7 @@ const trackMap = {
6061
markTimeline: { [READ]: { supported: "8.0.0" } },
6162
profile: { [READ]: { supported: "8.0.0" } },
6263
profileEnd: { [READ]: { supported: "8.0.0" } },
64+
timeLog: { [READ]: { supported: "10.7.0" } },
6365
timeStamp: { [READ]: { supported: "8.0.0" } },
6466
timeline: { [READ]: { supported: "8.0.0" } },
6567
timelineEnd: { [READ]: { supported: "8.0.0" } },
@@ -72,6 +74,8 @@ const trackMap = {
7274
},
7375
constants: { [READ]: { supported: "6.3.0" } },
7476
fips: { [READ]: { supported: "6.0.0" } },
77+
generateKeyPair: { [READ]: { supported: "10.12.0" } },
78+
generateKeyPairSync: { [READ]: { supported: "10.12.0" } },
7579
getCurves: { [READ]: { supported: "2.3.0" } },
7680
getFips: { [READ]: { supported: "10.0.0" } },
7781
privateEncrypt: { [READ]: { supported: "1.1.0" } },
@@ -91,6 +95,7 @@ const trackMap = {
9195
},
9296
},
9397
fs: {
98+
Dirent: { [READ]: { supported: "10.10.0" } },
9499
copyFile: { [READ]: { supported: "8.5.0" } },
95100
copyFileSync: { [READ]: { supported: "8.5.0" } },
96101
mkdtemp: { [READ]: { supported: "5.10.0" } },
@@ -115,8 +120,13 @@ const trackMap = {
115120
builtinModules: { [READ]: { supported: "9.3.0" } },
116121
},
117122
os: {
118-
constants: { [READ]: { supported: "6.3.0" } },
123+
constants: {
124+
[READ]: { supported: "6.3.0" },
125+
priority: { [READ]: { supported: "10.10.0" } },
126+
},
127+
getPriority: { [READ]: { supported: "10.10.0" } },
119128
homedir: { [READ]: { supported: "2.3.0" } },
129+
setPriority: { [READ]: { supported: "10.10.0" } },
120130
userInfo: { [READ]: { supported: "6.0.0" } },
121131
},
122132
path: {
@@ -126,6 +136,7 @@ const trackMap = {
126136
[READ]: { supported: "8.5.0" },
127137
},
128138
process: {
139+
allowedNodeEnvironmentFlags: { [READ]: { supported: "10.10.0" } },
129140
argv0: { [READ]: { supported: "6.4.0" } },
130141
channel: { [READ]: { supported: "7.1.0" } },
131142
cpuUsage: { [READ]: { supported: "6.1.0" } },
@@ -135,6 +146,9 @@ const trackMap = {
135146
hasUncaughtExceptionCaptureCallback: {
136147
[READ]: { supported: "9.3.0" },
137148
},
149+
hrtime: {
150+
bigint: { [READ]: { supported: "10.7.0" } },
151+
},
138152
ppid: { [READ]: { supported: "9.2.0" } },
139153
release: { [READ]: { supported: "3.0.0" } },
140154
setegid: { [READ]: { supported: "2.0.0" } },
@@ -170,6 +184,7 @@ const trackMap = {
170184
TextEncoder: { [READ]: { supported: "8.3.0" } },
171185
types: {
172186
[READ]: { supported: "10.0.0" },
187+
isBoxedPrimitive: { [READ]: { supported: "10.11.0" } },
173188
},
174189
},
175190
v8: {
@@ -185,6 +200,7 @@ const trackMap = {
185200
},
186201
vm: {
187202
Module: { [READ]: { supported: "9.6.0" } },
203+
compileFunction: { [READ]: { supported: "10.10.0" } },
188204
},
189205
worker_threads: {
190206
[READ]: { supported: "10.5.0" },
@@ -193,6 +209,12 @@ const trackMap = {
193209
}
194210
Object.assign(trackMap.globals, {
195211
Buffer: trackMap.modules.buffer.Buffer,
212+
TextDecoder: Object.assign({}, trackMap.modules.util.TextDecoder, {
213+
[READ]: { supported: "11.0.0" },
214+
}),
215+
TextEncoder: Object.assign({}, trackMap.modules.util.TextEncoder, {
216+
[READ]: { supported: "11.0.0" },
217+
}),
196218
URL: Object.assign({}, trackMap.modules.url.URL, {
197219
[READ]: { supported: "10.0.0" },
198220
}),

0 commit comments

Comments
 (0)