lib: fix linting warnings and errors

PR-URL: https://github.com/nodejs/node/pull/41805
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
Danielle Adams committed 2022-02-05 18:20:45 -05:00
1 parent ebc370cac8
commit 283f1e8721
3 files changed
+6 -11

No files matched your search

+1 -1
View File
@@ -56,7 +56,7 @@ const {
} = primordials;
const config = internalBinding('config');
const internalTimers = require('internal/timers');
const { deprecate, lazyDOMExceptionClass } = require('internal/util');
const { deprecate } = require('internal/util');
setupProcessObject();
-9
View File
@@ -6,7 +6,6 @@ const {
SymbolIterator,
} = primordials;
const kDestroyed = Symbol('kDestroyed');
const kIsErrored = Symbol('kIsErrored');
const kIsReadable = Symbol('kIsReadable');
const kIsDisturbed = Symbol('kIsDisturbed');
@@ -112,14 +111,6 @@ function isReadableFinished(stream, strict) {
);
}
function isDisturbed(stream) {
return !!(stream && (
stream.readableDidRead ||
stream.readableAborted ||
stream[kIsDisturbed]
));
}
function isReadable(stream) {
if (stream && stream[kIsReadable] != null) return stream[kIsReadable];
const r = isReadableNodeStream(stream);
+5 -1
View File
@@ -1283,7 +1283,11 @@ Interface.prototype._ttyWrite = function(s, key) {
/**
* Creates an `AsyncIterator` object that iterates through
* each line in the input stream as a string.
* @returns {Symbol.AsyncIterator}
* @typedef {{
* [Symbol.asyncIterator]: () => InterfaceAsyncIterator,
* next: () => Promise<string>
* }} InterfaceAsyncIterator
* @returns {InterfaceAsyncIterator}
*/
Interface.prototype[SymbolAsyncIterator] = function() {
if (this[kLineObjectStream] === undefined) {