diff --git a/tools/lint-md/lint-md.mjs b/tools/lint-md/lint-md.mjs index 5d4584197dcf06..5a6ab56740ffb0 100644 --- a/tools/lint-md/lint-md.mjs +++ b/tools/lint-md/lint-md.mjs @@ -10026,14 +10026,17 @@ const emailDomainDotTrail = { partial: true }; const wwwAutolink = { + name: 'wwwAutolink', tokenize: tokenizeWwwAutolink, previous: previousWww }; const protocolAutolink = { + name: 'protocolAutolink', tokenize: tokenizeProtocolAutolink, previous: previousProtocol }; const emailAutolink = { + name: 'emailAutolink', tokenize: tokenizeEmailAutolink, previous: previousEmail }; @@ -10041,14 +10044,13 @@ const text = {}; function gfmAutolinkLiteral() { return { text - } + }; } let code = 48; while (code < 123) { text[code] = emailAutolink; code++; - if (code === 58) code = 65; - else if (code === 91) code = 97; + if (code === 58) code = 65;else if (code === 91) code = 97; } text[43] = emailAutolink; text[45] = emailAutolink; @@ -10062,183 +10064,152 @@ function tokenizeEmailAutolink(effects, ok, nok) { const self = this; let dot; let data; - return start + return start; function start(code) { - if ( - !gfmAtext(code) || - !previousEmail.call(self, self.previous) || - previousUnbalanced(self.events) - ) { - return nok(code) + if (!gfmAtext(code) || !previousEmail.call(self, self.previous) || previousUnbalanced(self.events)) { + return nok(code); } effects.enter('literalAutolink'); effects.enter('literalAutolinkEmail'); - return atext(code) + return atext(code); } function atext(code) { if (gfmAtext(code)) { effects.consume(code); - return atext + return atext; } if (code === 64) { effects.consume(code); - return emailDomain + return emailDomain; } - return nok(code) + return nok(code); } function emailDomain(code) { if (code === 46) { - return effects.check( - emailDomainDotTrail, - emailDomainAfter, - emailDomainDot - )(code) + return effects.check(emailDomainDotTrail, emailDomainAfter, emailDomainDot)(code); } if (code === 45 || code === 95 || asciiAlphanumeric(code)) { data = true; effects.consume(code); - return emailDomain + return emailDomain; } - return emailDomainAfter(code) + return emailDomainAfter(code); } function emailDomainDot(code) { effects.consume(code); dot = true; - return emailDomain + return emailDomain; } function emailDomainAfter(code) { if (data && dot && asciiAlpha(self.previous)) { effects.exit('literalAutolinkEmail'); effects.exit('literalAutolink'); - return ok(code) + return ok(code); } - return nok(code) + return nok(code); } } function tokenizeWwwAutolink(effects, ok, nok) { const self = this; - return wwwStart + return wwwStart; function wwwStart(code) { - if ( - (code !== 87 && code !== 119) || - !previousWww.call(self, self.previous) || - previousUnbalanced(self.events) - ) { - return nok(code) + if (code !== 87 && code !== 119 || !previousWww.call(self, self.previous) || previousUnbalanced(self.events)) { + return nok(code); } effects.enter('literalAutolink'); effects.enter('literalAutolinkWww'); - return effects.check( - wwwPrefix, - effects.attempt(domain, effects.attempt(path, wwwAfter), nok), - nok - )(code) + return effects.check(wwwPrefix, effects.attempt(domain, effects.attempt(path, wwwAfter), nok), nok)(code); } function wwwAfter(code) { effects.exit('literalAutolinkWww'); effects.exit('literalAutolink'); - return ok(code) + return ok(code); } } function tokenizeProtocolAutolink(effects, ok, nok) { const self = this; let buffer = ''; let seen = false; - return protocolStart + return protocolStart; function protocolStart(code) { - if ( - (code === 72 || code === 104) && - previousProtocol.call(self, self.previous) && - !previousUnbalanced(self.events) - ) { + if ((code === 72 || code === 104) && previousProtocol.call(self, self.previous) && !previousUnbalanced(self.events)) { effects.enter('literalAutolink'); effects.enter('literalAutolinkHttp'); buffer += String.fromCodePoint(code); effects.consume(code); - return protocolPrefixInside + return protocolPrefixInside; } - return nok(code) + return nok(code); } function protocolPrefixInside(code) { if (asciiAlpha(code) && buffer.length < 5) { buffer += String.fromCodePoint(code); effects.consume(code); - return protocolPrefixInside + return protocolPrefixInside; } if (code === 58) { const protocol = buffer.toLowerCase(); if (protocol === 'http' || protocol === 'https') { effects.consume(code); - return protocolSlashesInside + return protocolSlashesInside; } } - return nok(code) + return nok(code); } function protocolSlashesInside(code) { if (code === 47) { effects.consume(code); if (seen) { - return afterProtocol + return afterProtocol; } seen = true; - return protocolSlashesInside + return protocolSlashesInside; } - return nok(code) + return nok(code); } function afterProtocol(code) { - return code === null || - asciiControl(code) || - markdownLineEndingOrSpace(code) || - unicodeWhitespace(code) || - unicodePunctuation(code) - ? nok(code) - : effects.attempt(domain, effects.attempt(path, protocolAfter), nok)(code) + return code === null || asciiControl(code) || markdownLineEndingOrSpace(code) || unicodeWhitespace(code) || unicodePunctuation(code) ? nok(code) : effects.attempt(domain, effects.attempt(path, protocolAfter), nok)(code); } function protocolAfter(code) { effects.exit('literalAutolinkHttp'); effects.exit('literalAutolink'); - return ok(code) + return ok(code); } } function tokenizeWwwPrefix(effects, ok, nok) { let size = 0; - return wwwPrefixInside + return wwwPrefixInside; function wwwPrefixInside(code) { if ((code === 87 || code === 119) && size < 3) { size++; effects.consume(code); - return wwwPrefixInside + return wwwPrefixInside; } if (code === 46 && size === 3) { effects.consume(code); - return wwwPrefixAfter + return wwwPrefixAfter; } - return nok(code) + return nok(code); } function wwwPrefixAfter(code) { - return code === null ? nok(code) : ok(code) + return code === null ? nok(code) : ok(code); } } function tokenizeDomain(effects, ok, nok) { let underscoreInLastSegment; let underscoreInLastLastSegment; let seen; - return domainInside + return domainInside; function domainInside(code) { if (code === 46 || code === 95) { - return effects.check(trail, domainAfter, domainAtPunctuation)(code) + return effects.check(trail, domainAfter, domainAtPunctuation)(code); } - if ( - code === null || - markdownLineEndingOrSpace(code) || - unicodeWhitespace(code) || - (code !== 45 && unicodePunctuation(code)) - ) { - return domainAfter(code) + if (code === null || markdownLineEndingOrSpace(code) || unicodeWhitespace(code) || code !== 45 && unicodePunctuation(code)) { + return domainAfter(code); } seen = true; effects.consume(code); - return domainInside + return domainInside; } function domainAtPunctuation(code) { if (code === 95) { @@ -10249,188 +10220,128 @@ function tokenizeDomain(effects, ok, nok) { underscoreInLastSegment = undefined; } effects.consume(code); - return domainInside + return domainInside; } function domainAfter(code) { if (underscoreInLastLastSegment || underscoreInLastSegment || !seen) { - return nok(code) + return nok(code); } - return ok(code) + return ok(code); } } function tokenizePath(effects, ok) { let sizeOpen = 0; let sizeClose = 0; - return pathInside + return pathInside; function pathInside(code) { if (code === 40) { sizeOpen++; effects.consume(code); - return pathInside + return pathInside; } if (code === 41 && sizeClose < sizeOpen) { - return pathAtPunctuation(code) + return pathAtPunctuation(code); } - if ( - code === 33 || - code === 34 || - code === 38 || - code === 39 || - code === 41 || - code === 42 || - code === 44 || - code === 46 || - code === 58 || - code === 59 || - code === 60 || - code === 63 || - code === 93 || - code === 95 || - code === 126 - ) { - return effects.check(trail, ok, pathAtPunctuation)(code) + if (code === 33 || code === 34 || code === 38 || code === 39 || code === 41 || code === 42 || code === 44 || code === 46 || code === 58 || code === 59 || code === 60 || code === 63 || code === 93 || code === 95 || code === 126) { + return effects.check(trail, ok, pathAtPunctuation)(code); } - if ( - code === null || - markdownLineEndingOrSpace(code) || - unicodeWhitespace(code) - ) { - return ok(code) + if (code === null || markdownLineEndingOrSpace(code) || unicodeWhitespace(code)) { + return ok(code); } effects.consume(code); - return pathInside + return pathInside; } function pathAtPunctuation(code) { if (code === 41) { sizeClose++; } effects.consume(code); - return pathInside + return pathInside; } } function tokenizeTrail(effects, ok, nok) { - return trail + return trail; function trail(code) { - if ( - code === 33 || - code === 34 || - code === 39 || - code === 41 || - code === 42 || - code === 44 || - code === 46 || - code === 58 || - code === 59 || - code === 63 || - code === 95 || - code === 126 - ) { + if (code === 33 || code === 34 || code === 39 || code === 41 || code === 42 || code === 44 || code === 46 || code === 58 || code === 59 || code === 63 || code === 95 || code === 126) { effects.consume(code); - return trail + return trail; } if (code === 38) { effects.consume(code); - return trailCharRefStart + return trailCharacterReferenceStart; } if (code === 93) { effects.consume(code); - return trailBracketAfter + return trailBracketAfter; } if ( - code === 60 || - code === null || - markdownLineEndingOrSpace(code) || - unicodeWhitespace(code) - ) { - return ok(code) + code === 60 || + code === null || markdownLineEndingOrSpace(code) || unicodeWhitespace(code)) { + return ok(code); } - return nok(code) + return nok(code); } function trailBracketAfter(code) { - if ( - code === null || - code === 40 || - code === 91 || - markdownLineEndingOrSpace(code) || - unicodeWhitespace(code) - ) { - return ok(code) + if (code === null || code === 40 || code === 91 || markdownLineEndingOrSpace(code) || unicodeWhitespace(code)) { + return ok(code); } - return trail(code) + return trail(code); } - function trailCharRefStart(code) { - return asciiAlpha(code) ? trailCharRefInside(code) : nok(code) + function trailCharacterReferenceStart(code) { + return asciiAlpha(code) ? trailCharacterReferenceInside(code) : nok(code); } - function trailCharRefInside(code) { + function trailCharacterReferenceInside(code) { if (code === 59) { effects.consume(code); - return trail + return trail; } if (asciiAlpha(code)) { effects.consume(code); - return trailCharRefInside + return trailCharacterReferenceInside; } - return nok(code) + return nok(code); } } function tokenizeEmailDomainDotTrail(effects, ok, nok) { - return start + return start; function start(code) { effects.consume(code); - return after + return after; } function after(code) { - return asciiAlphanumeric(code) ? nok(code) : ok(code) + return asciiAlphanumeric(code) ? nok(code) : ok(code); } } function previousWww(code) { - return ( - code === null || - code === 40 || - code === 42 || - code === 95 || - code === 91 || - code === 93 || - code === 126 || - markdownLineEndingOrSpace(code) - ) + return code === null || code === 40 || code === 42 || code === 95 || code === 91 || code === 93 || code === 126 || markdownLineEndingOrSpace(code); } function previousProtocol(code) { - return !asciiAlpha(code) + return !asciiAlpha(code); } function previousEmail(code) { - return !(code === 47 || gfmAtext(code)) + return !(code === 47 || gfmAtext(code)); } function gfmAtext(code) { - return ( - code === 43 || - code === 45 || - code === 46 || - code === 95 || - asciiAlphanumeric(code) - ) + return code === 43 || code === 45 || code === 46 || code === 95 || asciiAlphanumeric(code); } function previousUnbalanced(events) { let index = events.length; let result = false; while (index--) { const token = events[index][1]; - if ( - (token.type === 'labelLink' || token.type === 'labelImage') && - !token._balanced - ) { + if ((token.type === 'labelLink' || token.type === 'labelImage') && !token._balanced) { result = true; - break + break; } if (token._gfmAutolinkLiteralWalkedInto) { result = false; - break + break; } } if (events.length > 0 && !result) { events[events.length - 1][1]._gfmAutolinkLiteralWalkedInto = true; } - return result + return result; } const indent = { @@ -10441,6 +10352,7 @@ function gfmFootnote() { return { document: { [91]: { + name: 'gfmFootnoteDefinition', tokenize: tokenizeDefinitionStart, continuation: { tokenize: tokenizeDefinitionContinuation @@ -10450,15 +10362,17 @@ function gfmFootnote() { }, text: { [91]: { + name: 'gfmFootnoteCall', tokenize: tokenizeGfmFootnoteCall }, [93]: { + name: 'gfmPotentialFootnoteCall', add: 'after', tokenize: tokenizePotentialGfmFootnoteCall, resolveTo: resolveToPotentialGfmFootnoteCall } } - } + }; } function tokenizePotentialGfmFootnoteCall(effects, ok, nok) { const self = this; @@ -10467,52 +10381,41 @@ function tokenizePotentialGfmFootnoteCall(effects, ok, nok) { let labelStart; while (index--) { const token = self.events[index][1]; - if (token.type === 'labelImage') { + if (token.type === "labelImage") { labelStart = token; - break + break; } - if ( - token.type === 'gfmFootnoteCall' || - token.type === 'labelLink' || - token.type === 'label' || - token.type === 'image' || - token.type === 'link' - ) { - break + if (token.type === 'gfmFootnoteCall' || token.type === "labelLink" || token.type === "label" || token.type === "image" || token.type === "link") { + break; } } - return start + return start; function start(code) { if (!labelStart || !labelStart._balanced) { - return nok(code) + return nok(code); } - const id = normalizeIdentifier( - self.sliceSerialize({ - start: labelStart.end, - end: self.now() - }) - ); + const id = normalizeIdentifier(self.sliceSerialize({ + start: labelStart.end, + end: self.now() + })); if (id.codePointAt(0) !== 94 || !defined.includes(id.slice(1))) { - return nok(code) + return nok(code); } effects.enter('gfmFootnoteCallLabelMarker'); effects.consume(code); effects.exit('gfmFootnoteCallLabelMarker'); - return ok(code) + return ok(code); } } function resolveToPotentialGfmFootnoteCall(events, context) { let index = events.length; while (index--) { - if ( - events[index][1].type === 'labelImage' && - events[index][0] === 'enter' - ) { + if (events[index][1].type === "labelImage" && events[index][0] === 'enter') { events[index][1]; - break + break; } } - events[index + 1][1].type = 'data'; + events[index + 1][1].type = "data"; events[index + 3][1].type = 'gfmFootnoteCallLabelMarker'; const call = { type: 'gfmFootnoteCall', @@ -10533,88 +10436,75 @@ function resolveToPotentialGfmFootnoteCall(events, context) { end: Object.assign({}, events[events.length - 1][1].start) }; const chunk = { - type: 'chunkString', + type: "chunkString", contentType: 'string', start: Object.assign({}, string.start), end: Object.assign({}, string.end) }; const replacement = [ - events[index + 1], - events[index + 2], - ['enter', call, context], - events[index + 3], - events[index + 4], - ['enter', marker, context], - ['exit', marker, context], - ['enter', string, context], - ['enter', chunk, context], - ['exit', chunk, context], - ['exit', string, context], - events[events.length - 2], - events[events.length - 1], - ['exit', call, context] - ]; + events[index + 1], events[index + 2], ['enter', call, context], + events[index + 3], events[index + 4], + ['enter', marker, context], ['exit', marker, context], + ['enter', string, context], ['enter', chunk, context], ['exit', chunk, context], ['exit', string, context], + events[events.length - 2], events[events.length - 1], ['exit', call, context]]; events.splice(index, events.length - index + 1, ...replacement); - return events + return events; } function tokenizeGfmFootnoteCall(effects, ok, nok) { const self = this; const defined = self.parser.gfmFootnotes || (self.parser.gfmFootnotes = []); let size = 0; let data; - return start + return start; function start(code) { effects.enter('gfmFootnoteCall'); effects.enter('gfmFootnoteCallLabelMarker'); effects.consume(code); effects.exit('gfmFootnoteCallLabelMarker'); - return callStart + return callStart; } function callStart(code) { - if (code !== 94) return nok(code) + if (code !== 94) return nok(code); effects.enter('gfmFootnoteCallMarker'); effects.consume(code); effects.exit('gfmFootnoteCallMarker'); effects.enter('gfmFootnoteCallString'); effects.enter('chunkString').contentType = 'string'; - return callData + return callData; } function callData(code) { if ( - size > 999 || - (code === 93 && !data) || - code === null || - code === 91 || - markdownLineEndingOrSpace(code) - ) { - return nok(code) + size > 999 || + code === 93 && !data || + code === null || code === 91 || markdownLineEndingOrSpace(code)) { + return nok(code); } if (code === 93) { effects.exit('chunkString'); const token = effects.exit('gfmFootnoteCallString'); if (!defined.includes(normalizeIdentifier(self.sliceSerialize(token)))) { - return nok(code) + return nok(code); } effects.enter('gfmFootnoteCallLabelMarker'); effects.consume(code); effects.exit('gfmFootnoteCallLabelMarker'); effects.exit('gfmFootnoteCall'); - return ok + return ok; } if (!markdownLineEndingOrSpace(code)) { data = true; } size++; effects.consume(code); - return code === 92 ? callEscape : callData + return code === 92 ? callEscape : callData; } function callEscape(code) { if (code === 91 || code === 92 || code === 93) { effects.consume(code); size++; - return callData + return callData; } - return callData(code) + return callData(code); } } function tokenizeDefinitionStart(effects, ok, nok) { @@ -10623,14 +10513,14 @@ function tokenizeDefinitionStart(effects, ok, nok) { let identifier; let size = 0; let data; - return start + return start; function start(code) { effects.enter('gfmFootnoteDefinition')._container = true; effects.enter('gfmFootnoteDefinitionLabel'); effects.enter('gfmFootnoteDefinitionLabelMarker'); effects.consume(code); effects.exit('gfmFootnoteDefinitionLabelMarker'); - return labelAtMarker + return labelAtMarker; } function labelAtMarker(code) { if (code === 94) { @@ -10639,19 +10529,16 @@ function tokenizeDefinitionStart(effects, ok, nok) { effects.exit('gfmFootnoteDefinitionMarker'); effects.enter('gfmFootnoteDefinitionLabelString'); effects.enter('chunkString').contentType = 'string'; - return labelInside + return labelInside; } - return nok(code) + return nok(code); } function labelInside(code) { if ( - size > 999 || - (code === 93 && !data) || - code === null || - code === 91 || - markdownLineEndingOrSpace(code) - ) { - return nok(code) + size > 999 || + code === 93 && !data || + code === null || code === 91 || markdownLineEndingOrSpace(code)) { + return nok(code); } if (code === 93) { effects.exit('chunkString'); @@ -10661,22 +10548,22 @@ function tokenizeDefinitionStart(effects, ok, nok) { effects.consume(code); effects.exit('gfmFootnoteDefinitionLabelMarker'); effects.exit('gfmFootnoteDefinitionLabel'); - return labelAfter + return labelAfter; } if (!markdownLineEndingOrSpace(code)) { data = true; } size++; effects.consume(code); - return code === 92 ? labelEscape : labelInside + return code === 92 ? labelEscape : labelInside; } function labelEscape(code) { if (code === 91 || code === 92 || code === 93) { effects.consume(code); size++; - return labelInside + return labelInside; } - return labelInside(code) + return labelInside(code); } function labelAfter(code) { if (code === 58) { @@ -10686,39 +10573,26 @@ function tokenizeDefinitionStart(effects, ok, nok) { if (!defined.includes(identifier)) { defined.push(identifier); } - return factorySpace( - effects, - whitespaceAfter, - 'gfmFootnoteDefinitionWhitespace' - ) + return factorySpace(effects, whitespaceAfter, 'gfmFootnoteDefinitionWhitespace'); } - return nok(code) + return nok(code); } function whitespaceAfter(code) { - return ok(code) + return ok(code); } } function tokenizeDefinitionContinuation(effects, ok, nok) { - return effects.check(blankLine, ok, effects.attempt(indent, ok, nok)) + return effects.check(blankLine, ok, effects.attempt(indent, ok, nok)); } function gfmFootnoteDefinitionEnd(effects) { effects.exit('gfmFootnoteDefinition'); } function tokenizeIndent(effects, ok, nok) { const self = this; - return factorySpace( - effects, - afterPrefix, - 'gfmFootnoteDefinitionIndent', - 4 + 1 - ) + return factorySpace(effects, afterPrefix, 'gfmFootnoteDefinitionIndent', 4 + 1); function afterPrefix(code) { const tail = self.events[self.events.length - 1]; - return tail && - tail[1].type === 'gfmFootnoteDefinitionIndent' && - tail[2].sliceSerialize(tail[1], true).length === 4 - ? ok(code) - : nok(code) + return tail && tail[1].type === 'gfmFootnoteDefinitionIndent' && tail[2].sliceSerialize(tail[1], true).length === 4 ? ok(code) : nok(code); } } @@ -10726,6 +10600,7 @@ function gfmStrikethrough(options) { const options_ = options || {}; let single = options_.singleTilde; const tokenizer = { + name: 'strikethrough', tokenize: tokenizeStrikethrough, resolveAll: resolveAllStrikethrough }; @@ -10742,24 +10617,15 @@ function gfmStrikethrough(options) { attentionMarkers: { null: [126] } - } + }; function resolveAllStrikethrough(events, context) { let index = -1; while (++index < events.length) { - if ( - events[index][0] === 'enter' && - events[index][1].type === 'strikethroughSequenceTemporary' && - events[index][1]._close - ) { + if (events[index][0] === 'enter' && events[index][1].type === 'strikethroughSequenceTemporary' && events[index][1]._close) { let open = index; while (open--) { - if ( - events[open][0] === 'exit' && - events[open][1].type === 'strikethroughSequenceTemporary' && - events[open][1]._open && - events[index][1].end.offset - events[index][1].start.offset === - events[open][1].end.offset - events[open][1].start.offset - ) { + if (events[open][0] === 'exit' && events[open][1].type === 'strikethroughSequenceTemporary' && events[open][1]._open && + events[index][1].end.offset - events[index][1].start.offset === events[open][1].end.offset - events[open][1].start.offset) { events[index][1].type = 'strikethroughSequence'; events[open][1].type = 'strikethroughSequence'; const strikethrough = { @@ -10772,30 +10638,15 @@ function gfmStrikethrough(options) { start: Object.assign({}, events[open][1].end), end: Object.assign({}, events[index][1].start) }; - const nextEvents = [ - ['enter', strikethrough, context], - ['enter', events[open][1], context], - ['exit', events[open][1], context], - ['enter', text, context] - ]; + const nextEvents = [['enter', strikethrough, context], ['enter', events[open][1], context], ['exit', events[open][1], context], ['enter', text, context]]; const insideSpan = context.parser.constructs.insideSpan.null; if (insideSpan) { - splice( - nextEvents, - nextEvents.length, - 0, - resolveAll(insideSpan, events.slice(open + 1, index), context) - ); + splice(nextEvents, nextEvents.length, 0, resolveAll(insideSpan, events.slice(open + 1, index), context)); } - splice(nextEvents, nextEvents.length, 0, [ - ['exit', text, context], - ['enter', events[index][1], context], - ['exit', events[index][1], context], - ['exit', strikethrough, context] - ]); + splice(nextEvents, nextEvents.length, 0, [['exit', text, context], ['enter', events[index][1], context], ['exit', events[index][1], context], ['exit', strikethrough, context]]); splice(events, open - 1, index - open + 3, nextEvents); index = open + nextEvents.length - 2; - break + break; } } } @@ -10803,40 +10654,37 @@ function gfmStrikethrough(options) { index = -1; while (++index < events.length) { if (events[index][1].type === 'strikethroughSequenceTemporary') { - events[index][1].type = 'data'; + events[index][1].type = "data"; } } - return events + return events; } function tokenizeStrikethrough(effects, ok, nok) { const previous = this.previous; const events = this.events; let size = 0; - return start + return start; function start(code) { - if ( - previous === 126 && - events[events.length - 1][1].type !== 'characterEscape' - ) { - return nok(code) + if (previous === 126 && events[events.length - 1][1].type !== "characterEscape") { + return nok(code); } effects.enter('strikethroughSequenceTemporary'); - return more(code) + return more(code); } function more(code) { const before = classifyCharacter(previous); if (code === 126) { - if (size > 1) return nok(code) + if (size > 1) return nok(code); effects.consume(code); size++; - return more + return more; } - if (size < 2 && !single) return nok(code) + if (size < 2 && !single) return nok(code); const token = effects.exit('strikethroughSequenceTemporary'); const after = classifyCharacter(code); - token._open = !after || (after === 2 && Boolean(before)); - token._close = !before || (before === 2 && Boolean(after)); - return ok(code) + token._open = !after || after === 2 && Boolean(before); + token._close = !before || before === 2 && Boolean(after); + return ok(code); } } } @@ -10846,23 +10694,20 @@ class EditMap { this.map = []; } add(index, remove, add) { - addImpl(this, index, remove, add); + addImplementation(this, index, remove, add); } consume(events) { this.map.sort(function (a, b) { - return a[0] - b[0] + return a[0] - b[0]; }); if (this.map.length === 0) { - return + return; } let index = this.map.length; const vecs = []; while (index > 0) { index -= 1; - vecs.push( - events.slice(this.map[index][0] + this.map[index][1]), - this.map[index][2] - ); + vecs.push(events.slice(this.map[index][0] + this.map[index][1]), this.map[index][2]); events.length = this.map[index][0]; } vecs.push([...events]); @@ -10875,16 +10720,16 @@ class EditMap { this.map.length = 0; } } -function addImpl(editMap, at, remove, add) { +function addImplementation(editMap, at, remove, add) { let index = 0; if (remove === 0 && add.length === 0) { - return + return; } while (index < editMap.map.length) { if (editMap.map[index][0] === at) { editMap.map[index][1] += remove; editMap.map[index][2].push(...add); - return + return; } index += 1; } @@ -10899,11 +10744,7 @@ function gfmTableAlign(events, index) { if (inDelimiterRow) { if (event[0] === 'enter') { if (event[1].type === 'tableContent') { - align.push( - events[index + 1][1].type === 'tableDelimiterMarker' - ? 'left' - : 'none' - ); + align.push(events[index + 1][1].type === 'tableDelimiterMarker' ? 'left' : 'none'); } } else if (event[1].type === 'tableContent') { @@ -10913,82 +10754,78 @@ function gfmTableAlign(events, index) { } } else if (event[1].type === 'tableDelimiterRow') { - break + break; } } else if (event[0] === 'enter' && event[1].type === 'tableDelimiterRow') { inDelimiterRow = true; } index += 1; } - return align + return align; } function gfmTable() { return { flow: { null: { + name: 'table', tokenize: tokenizeTable, resolveAll: resolveTable } } - } + }; } function tokenizeTable(effects, ok, nok) { const self = this; let size = 0; let sizeB = 0; let seen; - return start + return start; function start(code) { let index = self.events.length - 1; while (index > -1) { const type = self.events[index][1].type; - if ( - type === 'lineEnding' || - type === 'linePrefix' - ) - index--; - else break + if (type === "lineEnding" || + type === "linePrefix") index--;else break; } const tail = index > -1 ? self.events[index][1].type : null; - const next = - tail === 'tableHead' || tail === 'tableRow' ? bodyRowStart : headRowBefore; + const next = tail === 'tableHead' || tail === 'tableRow' ? bodyRowStart : headRowBefore; if (next === bodyRowStart && self.parser.lazy[self.now().line]) { - return nok(code) + return nok(code); } - return next(code) + return next(code); } function headRowBefore(code) { effects.enter('tableHead'); effects.enter('tableRow'); - return headRowStart(code) + return headRowStart(code); } function headRowStart(code) { if (code === 124) { - return headRowBreak(code) + return headRowBreak(code); } seen = true; sizeB += 1; - return headRowBreak(code) + return headRowBreak(code); } function headRowBreak(code) { if (code === null) { - return nok(code) + return nok(code); } if (markdownLineEnding(code)) { if (sizeB > 1) { sizeB = 0; self.interrupt = true; effects.exit('tableRow'); - effects.enter('lineEnding'); + effects.enter("lineEnding"); effects.consume(code); - effects.exit('lineEnding'); - return headDelimiterStart + effects.exit("lineEnding"); + return headDelimiterStart; } - return nok(code) + return nok(code); } if (markdownSpace(code)) { - return factorySpace(effects, headRowBreak, 'whitespace')(code) + return factorySpace(effects, headRowBreak, "whitespace")(code); } sizeB += 1; if (seen) { @@ -11000,63 +10837,56 @@ function tokenizeTable(effects, ok, nok) { effects.consume(code); effects.exit('tableCellDivider'); seen = true; - return headRowBreak + return headRowBreak; } - effects.enter('data'); - return headRowData(code) + effects.enter("data"); + return headRowData(code); } function headRowData(code) { if (code === null || code === 124 || markdownLineEndingOrSpace(code)) { - effects.exit('data'); - return headRowBreak(code) + effects.exit("data"); + return headRowBreak(code); } effects.consume(code); - return code === 92 ? headRowEscape : headRowData + return code === 92 ? headRowEscape : headRowData; } function headRowEscape(code) { if (code === 92 || code === 124) { effects.consume(code); - return headRowData + return headRowData; } - return headRowData(code) + return headRowData(code); } function headDelimiterStart(code) { self.interrupt = false; if (self.parser.lazy[self.now().line]) { - return nok(code) + return nok(code); } effects.enter('tableDelimiterRow'); seen = false; if (markdownSpace(code)) { - return factorySpace( - effects, - headDelimiterBefore, - 'linePrefix', - self.parser.constructs.disable.null.includes('codeIndented') - ? undefined - : 4 - )(code) + return factorySpace(effects, headDelimiterBefore, "linePrefix", self.parser.constructs.disable.null.includes('codeIndented') ? undefined : 4)(code); } - return headDelimiterBefore(code) + return headDelimiterBefore(code); } function headDelimiterBefore(code) { if (code === 45 || code === 58) { - return headDelimiterValueBefore(code) + return headDelimiterValueBefore(code); } if (code === 124) { seen = true; effects.enter('tableCellDivider'); effects.consume(code); effects.exit('tableCellDivider'); - return headDelimiterCellBefore + return headDelimiterCellBefore; } - return headDelimiterNok(code) + return headDelimiterNok(code); } function headDelimiterCellBefore(code) { if (markdownSpace(code)) { - return factorySpace(effects, headDelimiterValueBefore, 'whitespace')(code) + return factorySpace(effects, headDelimiterValueBefore, "whitespace")(code); } - return headDelimiterValueBefore(code) + return headDelimiterValueBefore(code); } function headDelimiterValueBefore(code) { if (code === 58) { @@ -11065,28 +10895,28 @@ function tokenizeTable(effects, ok, nok) { effects.enter('tableDelimiterMarker'); effects.consume(code); effects.exit('tableDelimiterMarker'); - return headDelimiterLeftAlignmentAfter + return headDelimiterLeftAlignmentAfter; } if (code === 45) { sizeB += 1; - return headDelimiterLeftAlignmentAfter(code) + return headDelimiterLeftAlignmentAfter(code); } if (code === null || markdownLineEnding(code)) { - return headDelimiterCellAfter(code) + return headDelimiterCellAfter(code); } - return headDelimiterNok(code) + return headDelimiterNok(code); } function headDelimiterLeftAlignmentAfter(code) { if (code === 45) { effects.enter('tableDelimiterFiller'); - return headDelimiterFiller(code) + return headDelimiterFiller(code); } - return headDelimiterNok(code) + return headDelimiterNok(code); } function headDelimiterFiller(code) { if (code === 45) { effects.consume(code); - return headDelimiterFiller + return headDelimiterFiller; } if (code === 58) { seen = true; @@ -11094,69 +10924,69 @@ function tokenizeTable(effects, ok, nok) { effects.enter('tableDelimiterMarker'); effects.consume(code); effects.exit('tableDelimiterMarker'); - return headDelimiterRightAlignmentAfter + return headDelimiterRightAlignmentAfter; } effects.exit('tableDelimiterFiller'); - return headDelimiterRightAlignmentAfter(code) + return headDelimiterRightAlignmentAfter(code); } function headDelimiterRightAlignmentAfter(code) { if (markdownSpace(code)) { - return factorySpace(effects, headDelimiterCellAfter, 'whitespace')(code) + return factorySpace(effects, headDelimiterCellAfter, "whitespace")(code); } - return headDelimiterCellAfter(code) + return headDelimiterCellAfter(code); } function headDelimiterCellAfter(code) { if (code === 124) { - return headDelimiterBefore(code) + return headDelimiterBefore(code); } if (code === null || markdownLineEnding(code)) { if (!seen || size !== sizeB) { - return headDelimiterNok(code) + return headDelimiterNok(code); } effects.exit('tableDelimiterRow'); effects.exit('tableHead'); - return ok(code) + return ok(code); } - return headDelimiterNok(code) + return headDelimiterNok(code); } function headDelimiterNok(code) { - return nok(code) + return nok(code); } function bodyRowStart(code) { effects.enter('tableRow'); - return bodyRowBreak(code) + return bodyRowBreak(code); } function bodyRowBreak(code) { if (code === 124) { effects.enter('tableCellDivider'); effects.consume(code); effects.exit('tableCellDivider'); - return bodyRowBreak + return bodyRowBreak; } if (code === null || markdownLineEnding(code)) { effects.exit('tableRow'); - return ok(code) + return ok(code); } if (markdownSpace(code)) { - return factorySpace(effects, bodyRowBreak, 'whitespace')(code) + return factorySpace(effects, bodyRowBreak, "whitespace")(code); } - effects.enter('data'); - return bodyRowData(code) + effects.enter("data"); + return bodyRowData(code); } function bodyRowData(code) { if (code === null || code === 124 || markdownLineEndingOrSpace(code)) { - effects.exit('data'); - return bodyRowBreak(code) + effects.exit("data"); + return bodyRowBreak(code); } effects.consume(code); - return code === 92 ? bodyRowEscape : bodyRowData + return code === 92 ? bodyRowEscape : bodyRowData; } function bodyRowEscape(code) { if (code === 92 || code === 124) { effects.consume(code); - return bodyRowData + return bodyRowData; } - return bodyRowData(code) + return bodyRowData(code); } } function resolveTable(events, context) { @@ -11188,10 +11018,7 @@ function resolveTable(events, context) { end: Object.assign({}, token.end) }; map.add(index, 0, [['enter', currentTable, context]]); - } else if ( - token.type === 'tableRow' || - token.type === 'tableDelimiterRow' - ) { + } else if (token.type === 'tableRow' || token.type === 'tableDelimiterRow') { inFirstCellAwaitingPipe = true; currentCell = undefined; lastCell = [0, 0, 0, 0]; @@ -11207,24 +11034,12 @@ function resolveTable(events, context) { } rowKind = token.type === 'tableDelimiterRow' ? 2 : currentBody ? 3 : 1; } - else if ( - rowKind && - (token.type === 'data' || - token.type === 'tableDelimiterMarker' || - token.type === 'tableDelimiterFiller') - ) { + else if (rowKind && (token.type === "data" || token.type === 'tableDelimiterMarker' || token.type === 'tableDelimiterFiller')) { inFirstCellAwaitingPipe = false; if (cell[2] === 0) { if (lastCell[1] !== 0) { cell[0] = cell[1]; - currentCell = flushCell( - map, - context, - lastCell, - rowKind, - undefined, - currentCell - ); + currentCell = flushCell(map, context, lastCell, rowKind, undefined, currentCell); lastCell = [0, 0, 0, 0]; } cell[2] = index; @@ -11235,14 +11050,7 @@ function resolveTable(events, context) { } else { if (lastCell[1] !== 0) { cell[0] = cell[1]; - currentCell = flushCell( - map, - context, - lastCell, - rowKind, - undefined, - currentCell - ); + currentCell = flushCell(map, context, lastCell, rowKind, undefined, currentCell); } lastCell = cell; cell = [lastCell[1], index, 0, 0]; @@ -11252,31 +11060,16 @@ function resolveTable(events, context) { else if (token.type === 'tableHead') { afterHeadAwaitingFirstBodyRow = true; lastTableEnd = index; - } else if ( - token.type === 'tableRow' || - token.type === 'tableDelimiterRow' - ) { + } else if (token.type === 'tableRow' || token.type === 'tableDelimiterRow') { lastTableEnd = index; if (lastCell[1] !== 0) { cell[0] = cell[1]; - currentCell = flushCell( - map, - context, - lastCell, - rowKind, - index, - currentCell - ); + currentCell = flushCell(map, context, lastCell, rowKind, index, currentCell); } else if (cell[1] !== 0) { currentCell = flushCell(map, context, cell, rowKind, index, currentCell); } rowKind = 0; - } else if ( - rowKind && - (token.type === 'data' || - token.type === 'tableDelimiterMarker' || - token.type === 'tableDelimiterFiller') - ) { + } else if (rowKind && (token.type === "data" || token.type === 'tableDelimiterMarker' || token.type === 'tableDelimiterFiller')) { cell[3] = index; } } @@ -11291,15 +11084,10 @@ function resolveTable(events, context) { event[1]._align = gfmTableAlign(context.events, index); } } - return events + return events; } function flushCell(map, context, range, rowKind, rowEnd, previousCell) { - const groupName = - rowKind === 1 - ? 'tableHeader' - : rowKind === 2 - ? 'tableDelimiter' - : 'tableData'; + const groupName = rowKind === 1 ? 'tableHeader' : rowKind === 2 ? 'tableDelimiter' : 'tableData'; const valueName = 'tableContent'; if (range[0] !== 0) { previousCell.end = Object.assign({}, getPoint(context.events, range[0])); @@ -11325,8 +11113,8 @@ function flushCell(map, context, range, rowKind, rowEnd, previousCell) { const start = context.events[range[2]]; const end = context.events[range[3]]; start[1].end = Object.assign({}, end[1].end); - start[1].type = 'chunkText'; - start[1].contentType = 'text'; + start[1].type = "chunkText"; + start[1].contentType = "text"; if (range[3] > range[2] + 1) { const a = range[2] + 1; const b = range[3] - range[2] - 1; @@ -11340,7 +11128,7 @@ function flushCell(map, context, range, rowKind, rowEnd, previousCell) { map.add(rowEnd, 0, [['exit', previousCell, context]]); previousCell = undefined; } - return previousCell + return previousCell; } function flushTableEnd(map, context, index, table, tableBody) { const exits = []; @@ -11356,10 +11144,11 @@ function flushTableEnd(map, context, index, table, tableBody) { function getPoint(events, index) { const event = events[index]; const side = event[0] === 'enter' ? 'start' : 'end'; - return event[1][side] + return event[1][side]; } const tasklistCheck = { + name: 'tasklistCheck', tokenize: tokenizeTasklistCheck }; function gfmTaskListItem() { @@ -11367,38 +11156,37 @@ function gfmTaskListItem() { text: { [91]: tasklistCheck } - } + }; } function tokenizeTasklistCheck(effects, ok, nok) { const self = this; - return open + return open; function open(code) { if ( - self.previous !== null || - !self._gfmTasklistFirstContentOfListItem - ) { - return nok(code) + self.previous !== null || + !self._gfmTasklistFirstContentOfListItem) { + return nok(code); } effects.enter('taskListCheck'); effects.enter('taskListCheckMarker'); effects.consume(code); effects.exit('taskListCheckMarker'); - return inside + return inside; } function inside(code) { if (markdownLineEndingOrSpace(code)) { effects.enter('taskListCheckValueUnchecked'); effects.consume(code); effects.exit('taskListCheckValueUnchecked'); - return close + return close; } if (code === 88 || code === 120) { effects.enter('taskListCheckValueChecked'); effects.consume(code); effects.exit('taskListCheckValueChecked'); - return close + return close; } - return nok(code) + return nok(code); } function close(code) { if (code === 93) { @@ -11406,30 +11194,26 @@ function tokenizeTasklistCheck(effects, ok, nok) { effects.consume(code); effects.exit('taskListCheckMarker'); effects.exit('taskListCheck'); - return after + return after; } - return nok(code) + return nok(code); } function after(code) { if (markdownLineEnding(code)) { - return ok(code) + return ok(code); } if (markdownSpace(code)) { - return effects.check( - { - tokenize: spaceThenNonSpace - }, - ok, - nok - )(code) + return effects.check({ + tokenize: spaceThenNonSpace + }, ok, nok)(code); } - return nok(code) + return nok(code); } } function spaceThenNonSpace(effects, ok, nok) { - return factorySpace(effects, after, 'whitespace') + return factorySpace(effects, after, "whitespace"); function after(code) { - return code === null ? nok(code) : ok(code) + return code === null ? nok(code) : ok(code); } } @@ -23374,6 +23158,7 @@ const plugins = [ { no: "[Nn]ote that", yes: "" }, { yes: "RFC" }, { no: "[Rr][Ff][Cc]\\d+", yes: "RFC " }, + { yes: "TypeScript" }, { yes: "Unix" }, { yes: "Valgrind" }, { yes: "V8" }, diff --git a/tools/lint-md/package-lock.json b/tools/lint-md/package-lock.json index c4400ed8565a62..de868ccdae62ec 100644 --- a/tools/lint-md/package-lock.json +++ b/tools/lint-md/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "dependencies": { "remark-parse": "^11.0.0", - "remark-preset-lint-node": "^5.0.2", + "remark-preset-lint-node": "^5.1.0", "remark-stringify": "^11.0.0", "to-vfile": "^8.0.0", "unified": "^11.0.5", @@ -18,7 +18,7 @@ "devDependencies": { "@rollup/plugin-commonjs": "^26.0.1", "@rollup/plugin-node-resolve": "^15.2.3", - "rollup": "^4.18.0", + "rollup": "^4.18.1", "rollup-plugin-cleanup": "^3.2.1" } }, @@ -40,9 +40,9 @@ } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", "dev": true }, "node_modules/@pkgjs/parseargs": { @@ -128,9 +128,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.18.0.tgz", - "integrity": "sha512-Tya6xypR10giZV1XzxmH5wr25VcZSncG0pZIjfePT0OVBvqNEurzValetGNarVrGiq66EBVAFn15iYX4w6FKgQ==", + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.18.1.tgz", + "integrity": "sha512-lncuC4aHicncmbORnx+dUaAgzee9cm/PbIqgWz1PpXuwc+sa1Ct83tnqUDy/GFKleLiN7ZIeytM6KJ4cAn1SxA==", "cpu": [ "arm" ], @@ -141,9 +141,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.18.0.tgz", - "integrity": "sha512-avCea0RAP03lTsDhEyfy+hpfr85KfyTctMADqHVhLAF3MlIkq83CP8UfAHUssgXTYd+6er6PaAhx/QGv4L1EiA==", + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.18.1.tgz", + "integrity": "sha512-F/tkdw0WSs4ojqz5Ovrw5r9odqzFjb5LIgHdHZG65dFI1lWTWRVy32KDJLKRISHgJvqUeUhdIvy43fX41znyDg==", "cpu": [ "arm64" ], @@ -154,9 +154,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.18.0.tgz", - "integrity": "sha512-IWfdwU7KDSm07Ty0PuA/W2JYoZ4iTj3TUQjkVsO/6U+4I1jN5lcR71ZEvRh52sDOERdnNhhHU57UITXz5jC1/w==", + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.18.1.tgz", + "integrity": "sha512-vk+ma8iC1ebje/ahpxpnrfVQJibTMyHdWpOGZ3JpQ7Mgn/3QNHmPq7YwjZbIE7km73dH5M1e6MRRsnEBW7v5CQ==", "cpu": [ "arm64" ], @@ -167,9 +167,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.18.0.tgz", - "integrity": "sha512-n2LMsUz7Ynu7DoQrSQkBf8iNrjOGyPLrdSg802vk6XT3FtsgX6JbE8IHRvposskFm9SNxzkLYGSq9QdpLYpRNA==", + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.18.1.tgz", + "integrity": "sha512-IgpzXKauRe1Tafcej9STjSSuG0Ghu/xGYH+qG6JwsAUxXrnkvNHcq/NL6nz1+jzvWAnQkuAJ4uIwGB48K9OCGA==", "cpu": [ "x64" ], @@ -180,9 +180,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.18.0.tgz", - "integrity": "sha512-C/zbRYRXFjWvz9Z4haRxcTdnkPt1BtCkz+7RtBSuNmKzMzp3ZxdM28Mpccn6pt28/UWUCTXa+b0Mx1k3g6NOMA==", + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.18.1.tgz", + "integrity": "sha512-P9bSiAUnSSM7EmyRK+e5wgpqai86QOSv8BwvkGjLwYuOpaeomiZWifEos517CwbG+aZl1T4clSE1YqqH2JRs+g==", "cpu": [ "arm" ], @@ -193,9 +193,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.18.0.tgz", - "integrity": "sha512-l3m9ewPgjQSXrUMHg93vt0hYCGnrMOcUpTz6FLtbwljo2HluS4zTXFy2571YQbisTnfTKPZ01u/ukJdQTLGh9A==", + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.18.1.tgz", + "integrity": "sha512-5RnjpACoxtS+aWOI1dURKno11d7krfpGDEn19jI8BuWmSBbUC4ytIADfROM1FZrFhQPSoP+KEa3NlEScznBTyQ==", "cpu": [ "arm" ], @@ -206,9 +206,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.18.0.tgz", - "integrity": "sha512-rJ5D47d8WD7J+7STKdCUAgmQk49xuFrRi9pZkWoRD1UeSMakbcepWXPF8ycChBoAqs1pb2wzvbY6Q33WmN2ftw==", + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.18.1.tgz", + "integrity": "sha512-8mwmGD668m8WaGbthrEYZ9CBmPug2QPGWxhJxh/vCgBjro5o96gL04WLlg5BA233OCWLqERy4YUzX3bJGXaJgQ==", "cpu": [ "arm64" ], @@ -219,9 +219,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.18.0.tgz", - "integrity": "sha512-be6Yx37b24ZwxQ+wOQXXLZqpq4jTckJhtGlWGZs68TgdKXJgw54lUUoFYrg6Zs/kjzAQwEwYbp8JxZVzZLRepQ==", + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.18.1.tgz", + "integrity": "sha512-dJX9u4r4bqInMGOAQoGYdwDP8lQiisWb9et+T84l2WXk41yEej8v2iGKodmdKimT8cTAYt0jFb+UEBxnPkbXEQ==", "cpu": [ "arm64" ], @@ -232,9 +232,9 @@ ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.18.0.tgz", - "integrity": "sha512-hNVMQK+qrA9Todu9+wqrXOHxFiD5YmdEi3paj6vP02Kx1hjd2LLYR2eaN7DsEshg09+9uzWi2W18MJDlG0cxJA==", + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.18.1.tgz", + "integrity": "sha512-V72cXdTl4EI0x6FNmho4D502sy7ed+LuVW6Ym8aI6DRQ9hQZdp5sj0a2usYOlqvFBNKQnLQGwmYnujo2HvjCxQ==", "cpu": [ "ppc64" ], @@ -245,9 +245,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.18.0.tgz", - "integrity": "sha512-ROCM7i+m1NfdrsmvwSzoxp9HFtmKGHEqu5NNDiZWQtXLA8S5HBCkVvKAxJ8U+CVctHwV2Gb5VUaK7UAkzhDjlg==", + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.18.1.tgz", + "integrity": "sha512-f+pJih7sxoKmbjghrM2RkWo2WHUW8UbfxIQiWo5yeCaCM0TveMEuAzKJte4QskBp1TIinpnRcxkquY+4WuY/tg==", "cpu": [ "riscv64" ], @@ -258,9 +258,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.18.0.tgz", - "integrity": "sha512-0UyyRHyDN42QL+NbqevXIIUnKA47A+45WyasO+y2bGJ1mhQrfrtXUpTxCOrfxCR4esV3/RLYyucGVPiUsO8xjg==", + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.18.1.tgz", + "integrity": "sha512-qb1hMMT3Fr/Qz1OKovCuUM11MUNLUuHeBC2DPPAWUYYUAOFWaxInaTwTQmc7Fl5La7DShTEpmYwgdt2hG+4TEg==", "cpu": [ "s390x" ], @@ -271,9 +271,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.18.0.tgz", - "integrity": "sha512-xuglR2rBVHA5UsI8h8UbX4VJ470PtGCf5Vpswh7p2ukaqBGFTnsfzxUBetoWBWymHMxbIG0Cmx7Y9qDZzr648w==", + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.18.1.tgz", + "integrity": "sha512-7O5u/p6oKUFYjRbZkL2FLbwsyoJAjyeXHCU3O4ndvzg2OFO2GinFPSJFGbiwFDaCFc+k7gs9CF243PwdPQFh5g==", "cpu": [ "x64" ], @@ -284,9 +284,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.18.0.tgz", - "integrity": "sha512-LKaqQL9osY/ir2geuLVvRRs+utWUNilzdE90TpyoX0eNqPzWjRm14oMEE+YLve4k/NAqCdPkGYDaDF5Sw+xBfg==", + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.18.1.tgz", + "integrity": "sha512-pDLkYITdYrH/9Cv/Vlj8HppDuLMDUBmgsM0+N+xLtFd18aXgM9Nyqupb/Uw+HeidhfYg2lD6CXvz6CjoVOaKjQ==", "cpu": [ "x64" ], @@ -297,9 +297,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.18.0.tgz", - "integrity": "sha512-7J6TkZQFGo9qBKH0pk2cEVSRhJbL6MtfWxth7Y5YmZs57Pi+4x6c2dStAUvaQkHQLnEQv1jzBUW43GvZW8OFqA==", + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.18.1.tgz", + "integrity": "sha512-W2ZNI323O/8pJdBGil1oCauuCzmVd9lDmWBBqxYZcOqWD6aWqJtVBQ1dFrF4dYpZPks6F+xCZHfzG5hYlSHZ6g==", "cpu": [ "arm64" ], @@ -310,9 +310,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.18.0.tgz", - "integrity": "sha512-Txjh+IxBPbkUB9+SXZMpv+b/vnTEtFyfWZgJ6iyCmt2tdx0OF5WhFowLmnh8ENGNpfUlUZkdI//4IEmhwPieNg==", + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.18.1.tgz", + "integrity": "sha512-ELfEX1/+eGZYMaCIbK4jqLxO1gyTSOIlZr6pbC4SRYFaSIDVKOnZNMdoZ+ON0mrFDp4+H5MhwNC1H/AhE3zQLg==", "cpu": [ "ia32" ], @@ -323,9 +323,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.18.0.tgz", - "integrity": "sha512-UOo5FdvOL0+eIVTgS4tIdbW+TtnBLWg1YBCcU2KWM7nuNwRz9bksDX1bekJJCpu25N1DVWaCwnT39dVQxzqS8g==", + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.18.1.tgz", + "integrity": "sha512-yjk2MAkQmoaPYCSu35RLJ62+dz358nE83VfTePJRp8CG7aMg25mEJYpXFiD+NcevhX8LxD5OP5tktPXnXN7GDw==", "cpu": [ "x64" ], @@ -684,9 +684,9 @@ } }, "node_modules/glob": { - "version": "10.4.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.2.tgz", - "integrity": "sha512-GwMlUF6PkPo3Gk21UxkCohOv0PLcIXVtKyLlpEI28R/cO/4eNOdmLk3CMW1wROV/WR/EsZOWAfBbBOqYvs88/w==", + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", "dev": true, "dependencies": { "foreground-child": "^3.1.0", @@ -699,9 +699,6 @@ "bin": { "glob": "dist/esm/bin.mjs" }, - "engines": { - "node": ">=16 || 14 >=14.18" - }, "funding": { "url": "https://github.com/sponsors/isaacs" } @@ -852,16 +849,13 @@ "dev": true }, "node_modules/jackspeak": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.0.tgz", - "integrity": "sha512-JVYhQnN59LVPFCEcVa2C3CrEKYacvjRfqIQl+h8oi91aLYQVWRYbxjPcv1bUiUy/kLmQaANrYfNMCO3kuEDHfw==", + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", "dev": true, "dependencies": { "@isaacs/cliui": "^8.0.2" }, - "engines": { - "node": ">=14" - }, "funding": { "url": "https://github.com/sponsors/isaacs" }, @@ -913,13 +907,10 @@ } }, "node_modules/lru-cache": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.3.0.tgz", - "integrity": "sha512-CQl19J/g+Hbjbv4Y3mFNNXFEL/5t/KCg8POCuUqd4rMKjGG+j1ybER83hxV58zL+dFI1PTkt3GNFSHRt+d8qEQ==", - "dev": true, - "engines": { - "node": "14 || >=16.14" - } + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true }, "node_modules/magic-string": { "version": "0.30.10", @@ -1321,9 +1312,9 @@ } }, "node_modules/micromark-extension-gfm-autolink-literal": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-extension-gfm-autolink-literal/-/micromark-extension-gfm-autolink-literal-2.0.0.tgz", - "integrity": "sha512-rTHfnpt/Q7dEAK1Y5ii0W8bhfJlVJFnJMHIPisfPK3gpVNuOP0VnRl96+YJ3RYWV/P4gFeQoGKNlT3RhuvpqAg==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-autolink-literal/-/micromark-extension-gfm-autolink-literal-2.1.0.tgz", + "integrity": "sha512-oOg7knzhicgQ3t4QCjCWgTmfNhvQbDDnJeVu9v81r7NltNCVmhPy1fJRX27pISafdjL+SVc4d3l48Gb6pbRypw==", "dependencies": { "micromark-util-character": "^2.0.0", "micromark-util-sanitize-uri": "^2.0.0", @@ -1336,9 +1327,9 @@ } }, "node_modules/micromark-extension-gfm-footnote": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-extension-gfm-footnote/-/micromark-extension-gfm-footnote-2.0.0.tgz", - "integrity": "sha512-6Rzu0CYRKDv3BfLAUnZsSlzx3ak6HAoI85KTiijuKIz5UxZxbUI+pD6oHgw+6UtQuiRwnGRhzMmPRv4smcz0fg==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-footnote/-/micromark-extension-gfm-footnote-2.1.0.tgz", + "integrity": "sha512-/yPhxI1ntnDNsiHtzLKYnE3vf9JZ6cAisqVDauhp4CEHxlb4uoOTxOCJ+9s51bIB8U1N1FJ1RXOKTIlD5B/gqw==", "dependencies": { "devlop": "^1.0.0", "micromark-core-commonmark": "^2.0.0", @@ -1355,9 +1346,9 @@ } }, "node_modules/micromark-extension-gfm-strikethrough": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-extension-gfm-strikethrough/-/micromark-extension-gfm-strikethrough-2.0.0.tgz", - "integrity": "sha512-c3BR1ClMp5fxxmwP6AoOY2fXO9U8uFMKs4ADD66ahLTNcwzSCyRVU4k7LPV5Nxo/VJiR4TdzxRQY2v3qIUceCw==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-strikethrough/-/micromark-extension-gfm-strikethrough-2.1.0.tgz", + "integrity": "sha512-ADVjpOOkjz1hhkZLlBiYA9cR2Anf8F4HqZUO6e5eDcPQd0Txw5fxLzzxnEkSkfnD0wziSGiv7sYhk/ktvbf1uw==", "dependencies": { "devlop": "^1.0.0", "micromark-util-chunked": "^2.0.0", @@ -1372,9 +1363,9 @@ } }, "node_modules/micromark-extension-gfm-table": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/micromark-extension-gfm-table/-/micromark-extension-gfm-table-2.0.0.tgz", - "integrity": "sha512-PoHlhypg1ItIucOaHmKE8fbin3vTLpDOUg8KAr8gRCF1MOZI9Nquq2i/44wFvviM4WuxJzc3demT8Y3dkfvYrw==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-table/-/micromark-extension-gfm-table-2.1.0.tgz", + "integrity": "sha512-Ub2ncQv+fwD70/l4ou27b4YzfNaCJOvyX4HxXU15m7mpYY+rjuWzsLIPZHJL253Z643RpbcP1oeIJlQ/SKW67g==", "dependencies": { "devlop": "^1.0.0", "micromark-factory-space": "^2.0.0", @@ -1400,9 +1391,9 @@ } }, "node_modules/micromark-extension-gfm-task-list-item": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/micromark-extension-gfm-task-list-item/-/micromark-extension-gfm-task-list-item-2.0.1.tgz", - "integrity": "sha512-cY5PzGcnULaN5O7T+cOzfMoHjBW7j+T9D2sucA5d/KbsBTPcYdebm9zUd9zzdgJGCwahV+/W78Z3nbulBYVbTw==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-task-list-item/-/micromark-extension-gfm-task-list-item-2.1.0.tgz", + "integrity": "sha512-qIBZhqxqI6fjLDYFTBIa4eivDMnP+OZqsNwmQ3xNLE4Cxwc+zfQEfbs6tzAo2Hjq+bh6q5F+Z8/cksrLFYWQQw==", "dependencies": { "devlop": "^1.0.0", "micromark-factory-space": "^2.0.0", @@ -2712,9 +2703,9 @@ } }, "node_modules/remark-preset-lint-node": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/remark-preset-lint-node/-/remark-preset-lint-node-5.0.2.tgz", - "integrity": "sha512-yuPSpd9hDqX8ZqCMem+EX2CJvuu7zzjoZRL65NGkJeg4wrxiv7ztrRZ8WgQ0lKV0JVG6h541QHG1gtzd6E3Eig==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/remark-preset-lint-node/-/remark-preset-lint-node-5.1.0.tgz", + "integrity": "sha512-Nt7f1K37qUQZ9OomkXyCH0vsKihQ+qXR+4+r8Emw67hfOrVWhNzJw2jy96bJHMMWLPD1Fp4Q8cSGQxhthaORkQ==", "dependencies": { "js-yaml": "^4.1.0", "remark-gfm": "^4.0.0", @@ -2813,9 +2804,9 @@ } }, "node_modules/rollup": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.18.0.tgz", - "integrity": "sha512-QmJz14PX3rzbJCN1SG4Xe/bAAX2a6NpCP8ab2vfu2GiUr8AQcr2nCV/oEO3yneFarB67zk8ShlIyWb2LGTb3Sg==", + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.18.1.tgz", + "integrity": "sha512-Elx2UT8lzxxOXMpy5HWQGZqkrQOtrVDDa/bm9l10+U4rQnVzbL/LgZ4NOM1MPIDyHk69W4InuYDF5dzRh4Kw1A==", "dev": true, "dependencies": { "@types/estree": "1.0.5" @@ -2828,22 +2819,22 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.18.0", - "@rollup/rollup-android-arm64": "4.18.0", - "@rollup/rollup-darwin-arm64": "4.18.0", - "@rollup/rollup-darwin-x64": "4.18.0", - "@rollup/rollup-linux-arm-gnueabihf": "4.18.0", - "@rollup/rollup-linux-arm-musleabihf": "4.18.0", - "@rollup/rollup-linux-arm64-gnu": "4.18.0", - "@rollup/rollup-linux-arm64-musl": "4.18.0", - "@rollup/rollup-linux-powerpc64le-gnu": "4.18.0", - "@rollup/rollup-linux-riscv64-gnu": "4.18.0", - "@rollup/rollup-linux-s390x-gnu": "4.18.0", - "@rollup/rollup-linux-x64-gnu": "4.18.0", - "@rollup/rollup-linux-x64-musl": "4.18.0", - "@rollup/rollup-win32-arm64-msvc": "4.18.0", - "@rollup/rollup-win32-ia32-msvc": "4.18.0", - "@rollup/rollup-win32-x64-msvc": "4.18.0", + "@rollup/rollup-android-arm-eabi": "4.18.1", + "@rollup/rollup-android-arm64": "4.18.1", + "@rollup/rollup-darwin-arm64": "4.18.1", + "@rollup/rollup-darwin-x64": "4.18.1", + "@rollup/rollup-linux-arm-gnueabihf": "4.18.1", + "@rollup/rollup-linux-arm-musleabihf": "4.18.1", + "@rollup/rollup-linux-arm64-gnu": "4.18.1", + "@rollup/rollup-linux-arm64-musl": "4.18.1", + "@rollup/rollup-linux-powerpc64le-gnu": "4.18.1", + "@rollup/rollup-linux-riscv64-gnu": "4.18.1", + "@rollup/rollup-linux-s390x-gnu": "4.18.1", + "@rollup/rollup-linux-x64-gnu": "4.18.1", + "@rollup/rollup-linux-x64-musl": "4.18.1", + "@rollup/rollup-win32-arm64-msvc": "4.18.1", + "@rollup/rollup-win32-ia32-msvc": "4.18.1", + "@rollup/rollup-win32-x64-msvc": "4.18.1", "fsevents": "~2.3.2" } }, diff --git a/tools/lint-md/package.json b/tools/lint-md/package.json index 8018b89ecae04c..00cbf6418bbf5b 100644 --- a/tools/lint-md/package.json +++ b/tools/lint-md/package.json @@ -7,7 +7,7 @@ }, "dependencies": { "remark-parse": "^11.0.0", - "remark-preset-lint-node": "^5.0.2", + "remark-preset-lint-node": "^5.1.0", "remark-stringify": "^11.0.0", "to-vfile": "^8.0.0", "unified": "^11.0.5", @@ -16,7 +16,7 @@ "devDependencies": { "@rollup/plugin-commonjs": "^26.0.1", "@rollup/plugin-node-resolve": "^15.2.3", - "rollup": "^4.18.0", + "rollup": "^4.18.1", "rollup-plugin-cleanup": "^3.2.1" } }