Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 286c358

Browse filesBrowse files
aduh95MoLow
authored andcommitted
lib: do not disable linter for entire files
Disabling linter for single lines is less error prone. PR-URL: #48299 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Debadree Chatterjee <debadree333@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it>
1 parent ce7e6c6 commit 286c358
Copy full SHA for 286c358

File tree

Expand file treeCollapse file tree

3 files changed

+8
-12
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

3 files changed

+8
-12
lines changed
Open diff view settings
Collapse file

‎lib/internal/http2/core.js‎

Copy file name to clipboardExpand all lines: lib/internal/http2/core.js
+3-4Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
'use strict';
22

3-
/* eslint-disable no-use-before-define */
4-
53
const {
64
ArrayFrom,
75
ArrayIsArray,
@@ -363,6 +361,7 @@ function onSessionHeaders(handle, id, cat, flags, headers, sensitiveHeaders) {
363361
}
364362
// session[kType] can be only one of two possible values
365363
if (type === NGHTTP2_SESSION_SERVER) {
364+
// eslint-disable-next-line no-use-before-define
366365
stream = new ServerHttp2Stream(session, handle, id, {}, obj);
367366
if (endOfStream) {
368367
stream.push(null);
@@ -374,6 +373,7 @@ function onSessionHeaders(handle, id, cat, flags, headers, sensitiveHeaders) {
374373
stream[kState].flags |= STREAM_FLAGS_HEAD_REQUEST;
375374
}
376375
} else {
376+
// eslint-disable-next-line no-use-before-define
377377
stream = new ClientHttp2Stream(session, handle, id, {});
378378
if (endOfStream) {
379379
stream.push(null);
@@ -1788,6 +1788,7 @@ class ClientHttp2Session extends Http2Session {
17881788

17891789
const headersList = mapToHeaders(headers);
17901790

1791+
// eslint-disable-next-line no-use-before-define
17911792
const stream = new ClientHttp2Stream(this, undefined, undefined, {});
17921793
stream[kSentHeaders] = headers;
17931794
stream[kOrigin] = `${headers[HTTP2_HEADER_SCHEME]}://` +
@@ -3412,5 +3413,3 @@ module.exports = {
34123413
Http2ServerRequest,
34133414
Http2ServerResponse,
34143415
};
3415-
3416-
/* eslint-enable no-use-before-define */
Collapse file

‎lib/internal/webstreams/readablestream.js‎

Copy file name to clipboardExpand all lines: lib/internal/webstreams/readablestream.js
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
'use strict';
22

3-
/* eslint-disable no-use-before-define */
4-
53
const {
64
ArrayBuffer,
75
ArrayBufferPrototypeGetByteLength,
@@ -343,10 +341,12 @@ class ReadableStream {
343341
const mode = options?.mode;
344342

345343
if (mode === undefined)
344+
// eslint-disable-next-line no-use-before-define
346345
return new ReadableStreamDefaultReader(this);
347346

348347
if (`${mode}` !== 'byob')
349348
throw new ERR_INVALID_ARG_VALUE('options.mode', mode);
349+
// eslint-disable-next-line no-use-before-define
350350
return new ReadableStreamBYOBReader(this);
351351
}
352352

@@ -466,6 +466,7 @@ class ReadableStream {
466466
preventCancel = false,
467467
} = options;
468468

469+
// eslint-disable-next-line no-use-before-define
469470
const reader = new ReadableStreamDefaultReader(this);
470471
let done = false;
471472
let started = false;
@@ -576,6 +577,7 @@ class ReadableStream {
576577
locked: this.locked,
577578
state: this[kState].state,
578579
supportsBYOB:
580+
// eslint-disable-next-line no-use-before-define
579581
this[kState].controller instanceof ReadableByteStreamController,
580582
});
581583
}
@@ -3259,5 +3261,3 @@ module.exports = {
32593261
setupReadableByteStreamController,
32603262
setupReadableByteStreamControllerFromSource,
32613263
};
3262-
3263-
/* eslint-enable no-use-before-define */
Collapse file

‎lib/internal/webstreams/writablestream.js‎

Copy file name to clipboardExpand all lines: lib/internal/webstreams/writablestream.js
+1-4Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
'use strict';
22

3-
/* eslint-disable no-use-before-define */
4-
53
const {
64
ArrayPrototypePush,
75
ArrayPrototypeShift,
@@ -262,6 +260,7 @@ class WritableStream {
262260
getWriter() {
263261
if (!isWritableStream(this))
264262
throw new ERR_INVALID_THIS('WritableStream');
263+
// eslint-disable-next-line no-use-before-define
265264
return new WritableStreamDefaultWriter(this);
266265
}
267266

@@ -1360,5 +1359,3 @@ module.exports = {
13601359
setupWritableStreamDefaultControllerFromSink,
13611360
setupWritableStreamDefaultController,
13621361
};
1363-
1364-
/* eslint-enable no-use-before-define */

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.