@@ -227,22 +227,20 @@ function percentDecode (input) {
227227 // 1. If byte is not 0x25 (%), then append byte to output.
228228 if (byte !== 0x25) {
229229 output.push(byte)
230- }
231230
232231 // 2. Otherwise, if byte is 0x25 (%) and the next two bytes
233232 // after byte in input are not in the ranges
234233 // 0x30 (0) to 0x39 (9), 0x41 (A) to 0x46 (F),
235234 // and 0x61 (a) to 0x66 (f), all inclusive, append byte
236235 // to output.
237- else if (
236+ } else if (
238237 byte === 0x25 &&
239238 !/^[0-9A-Fa-f]{2}$/i.test(String.fromCharCode(input[i + 1], input[i + 2]))
240239 ) {
241240 output.push(0x25)
242- }
243241
244242 // 3. Otherwise:
245- else {
243+ } else {
246244 // 1. Let bytePoint be the two bytes after byte in input,
247245 // decoded, and then interpreted as hexadecimal number.
248246 const nextTwoBytes = String.fromCharCode(input[i + 1], input[i + 2])
@@ -334,7 +332,7 @@ function parseMIMEType (input) {
334332 // whitespace from input given position.
335333 collectASequenceOfCodePoints(
336334 // https://fetch.spec.whatwg.org/#http-whitespace
337- (char) => /(\u000A|\u000D|\u0009|\u0020)/.test(char),
335+ (char) => /(\u000A|\u000D|\u0009|\u0020)/.test(char), // eslint-disable-line
338336 input,
339337 position
340338 )
@@ -389,10 +387,9 @@ function parseMIMEType (input) {
389387 input,
390388 position
391389 )
392- }
393390
394391 // 9. Otherwise:
395- else {
392+ } else {
396393 // 1. Set parameterValue to the result of collecting
397394 // a sequence of code points that are not U+003B (;)
398395 // from input, given position.
@@ -421,7 +418,7 @@ function parseMIMEType (input) {
421418 parameterName.length !== 0 &&
422419 /^[!#$%&'*+-.^_|~A-z0-9]+$/.test(parameterName) &&
423420 // https://mimesniff.spec.whatwg.org/#http-quoted-string-token-code-point
424- !/^(\u0009|\x{0020}-\x{007E}|\x{0080}-\x{00FF})+$/.test(parameterValue) &&
421+ !/^(\u0009|\x{0020}-\x{007E}|\x{0080}-\x{00FF})+$/.test(parameterValue) && // eslint-disable-line
425422 !mimeType.parameters.has(parameterName)
426423 ) {
427424 mimeType.parameters.set(parameterName, parameterValue)
@@ -436,7 +433,7 @@ function parseMIMEType (input) {
436433/** @param {string} data */
437434function forgivingBase64 (data) {
438435 // 1. Remove all ASCII whitespace from data.
439- data = data.replace(/[\u0009\u000A\u000C\u000D\u0020]/g, '')
436+ data = data.replace(/[\u0009\u000A\u000C\u000D\u0020]/g, '') // eslint-disable-line
440437
441438 // 2. If data’s code point length divides by 4 leaving
442439 // no remainder, then:
@@ -529,10 +526,9 @@ function collectAnHTTPQuotedString (input, position, extractValue) {
529526
530527 // 3. Advance position by 1.
531528 position.position++
532- }
533529
534530 // 6. Otherwise:
535- else {
531+ } else {
536532 // 1. Assert: quoteOrBackslash is U+0022 (").
537533 assert(quoteOrBackslash === '"')
538534
0 commit comments