From 8e914be7420715620cad74fbb020c5e87ac875a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Tue, 3 Nov 2020 16:19:29 +0100 Subject: build: migrate to dlint (#8176) This commit migrates repository from using "eslint" to "dlint" for linting JavaScript code. --- op_crates/fetch/11_streams.js | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) (limited to 'op_crates/fetch/11_streams.js') diff --git a/op_crates/fetch/11_streams.js b/op_crates/fetch/11_streams.js index b182a96ed..1c1889e09 100644 --- a/op_crates/fetch/11_streams.js +++ b/op_crates/fetch/11_streams.js @@ -7,10 +7,23 @@ // comments which point to steps of the specification that are not implemented. ((window) => { - /* eslint-disable @typescript-eslint/no-explicit-any,require-await */ - const customInspect = Symbol.for("Deno.customInspect"); + function cloneArrayBuffer( + srcBuffer, + srcByteOffset, + srcLength, + _cloneConstructor, + ) { + // this function fudges the return type but SharedArrayBuffer is disabled for a while anyway + return srcBuffer.slice( + srcByteOffset, + srcByteOffset + srcLength, + ); + } + + const objectCloneMemo = new WeakMap(); + /** Clone a value in a similar way to structured cloning. It is similar to a * StructureDeserialize(StructuredSerialize(...)). */ function cloneValue(value) { @@ -88,6 +101,7 @@ } case "symbol": case "function": + // fallthrough default: throw new DOMException("Uncloneable value in stream", "DataCloneError"); } @@ -2151,10 +2165,10 @@ let canceled2 = false; let reason1 = undefined; let reason2 = undefined; - /* eslint-disable prefer-const */ + // deno-lint-ignore prefer-const let branch1; + // deno-lint-ignore prefer-const let branch2; - /* eslint-enable prefer-const */ const cancelPromise = getDeferred(); const pullAlgorithm = () => { if (reading) { @@ -3365,7 +3379,6 @@ } stream[sym.backpressure] = backpressure; } - /* eslint-enable */ class CountQueuingStrategy { constructor({ highWaterMark }) { -- cgit v1.2.3