From 9767fc95dac3ed47e8518a7df513d14725a50fac Mon Sep 17 00:00:00 2001 From: Danielle Adams Date: Tue, 1 Feb 2022 01:24:17 -0500 Subject: [PATCH 1/2] lib: fix linting warnings and errors --- lib/internal/bootstrap/node.js | 2 +- lib/internal/streams/utils.js | 9 --------- lib/readline.js | 6 +++++- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/lib/internal/bootstrap/node.js b/lib/internal/bootstrap/node.js index 3fe41cf1cf8d56..1393cc20f45db6 100644 --- a/lib/internal/bootstrap/node.js +++ b/lib/internal/bootstrap/node.js @@ -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(); diff --git a/lib/internal/streams/utils.js b/lib/internal/streams/utils.js index 67550553515911..1b317eeb7e5cb5 100644 --- a/lib/internal/streams/utils.js +++ b/lib/internal/streams/utils.js @@ -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); diff --git a/lib/readline.js b/lib/readline.js index 1b8b276a6d6db0..a6eecc763ae3a1 100644 --- a/lib/readline.js +++ b/lib/readline.js @@ -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 + * }} InterfaceAsyncIterator + * @returns {InterfaceAsyncIterator} */ Interface.prototype[SymbolAsyncIterator] = function() { if (this[kLineObjectStream] === undefined) { From 58f12009b647a768a714ef34310f31818d467cd0 Mon Sep 17 00:00:00 2001 From: Danielle Adams Date: Tue, 1 Feb 2022 08:01:01 -0500 Subject: [PATCH 2/2] test: add ignore for regex space rule --- test/parallel/test-v8-untrusted-code-mitigations.js | 1 + 1 file changed, 1 insertion(+) diff --git a/test/parallel/test-v8-untrusted-code-mitigations.js b/test/parallel/test-v8-untrusted-code-mitigations.js index c9d89cd5a66e18..cb6360beb74bb0 100644 --- a/test/parallel/test-v8-untrusted-code-mitigations.js +++ b/test/parallel/test-v8-untrusted-code-mitigations.js @@ -15,4 +15,5 @@ assert.notStrictEqual(untrustedFlag, -1); const nextFlag = v8Options.indexOf('--', untrustedFlag + 2); const slice = v8Options.substring(untrustedFlag, nextFlag); +// eslint-disable-next-line no-regex-spaces assert(slice.match(/type: bool default: false/));