From 5c3d2e0411bc4ea73f13db53bb313ad040347601 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 25 Apr 2020 22:15:56 -0700 Subject: [PATCH] tools: update remark-preset-lint-node@1.14.0 --- tools/lint-md.js | 11766 +++++++++++++--- .../node-lint-md-cli-rollup/package-lock.json | 1556 +- tools/node-lint-md-cli-rollup/package.json | 2 +- 3 files changed, 11168 insertions(+), 2156 deletions(-) diff --git a/tools/lint-md.js b/tools/lint-md.js index 35df2b11fcb936..582577bd68d7ec 100644 --- a/tools/lint-md.js +++ b/tools/lint-md.js @@ -195,6 +195,8 @@ function trough() { } } +var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + function commonjsRequire () { throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs'); } @@ -5894,7 +5896,7 @@ var deepExtend = module.exports = function (/*obj_1, [obj_2], [obj_N]*/) { var minimist = function (args, opts) { if (!opts) opts = {}; - + var flags = { bools : {}, strings : {}, unknownFn: null }; if (typeof opts['unknown'] === 'function') { @@ -5908,7 +5910,7 @@ var minimist = function (args, opts) { flags.bools[key] = true; }); } - + var aliases = {}; Object.keys(opts.alias || {}).forEach(function (key) { aliases[key] = [].concat(opts.alias[key]); @@ -5927,12 +5929,12 @@ var minimist = function (args, opts) { }); var defaults = opts['default'] || {}; - + var argv = { _ : [] }; Object.keys(flags.bools).forEach(function (key) { setArg(key, defaults[key] === undefined ? false : defaults[key]); }); - + var notFlags = []; if (args.indexOf('--') !== -1) { @@ -5954,7 +5956,7 @@ var minimist = function (args, opts) { ? Number(val) : val ; setKey(argv, key.split('.'), value); - + (aliases[key] || []).forEach(function (x) { setKey(argv, x.split('.'), value); }); @@ -5987,7 +5989,7 @@ var minimist = function (args, opts) { o[key] = [ o[key], value ]; } } - + function aliasIsBoolean(key) { return aliases[key].some(function (x) { return flags.bools[x]; @@ -5996,7 +5998,7 @@ var minimist = function (args, opts) { for (var i = 0; i < args.length; i++) { var arg = args[i]; - + if (/^--.+=/.test(arg)) { // Using [\s\S] instead of . because js doesn't support the // 'dotall' regex modifier. See: @@ -6033,29 +6035,29 @@ var minimist = function (args, opts) { } else if (/^-[^-]+/.test(arg)) { var letters = arg.slice(1,-1).split(''); - + var broken = false; for (var j = 0; j < letters.length; j++) { var next = arg.slice(j+2); - + if (next === '-') { setArg(letters[j], next, arg); continue; } - + if (/[A-Za-z]/.test(letters[j]) && /=/.test(next)) { setArg(letters[j], next.split('=')[1], arg); broken = true; break; } - + if (/[A-Za-z]/.test(letters[j]) && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) { setArg(letters[j], next, arg); broken = true; break; } - + if (letters[j+1] && letters[j+1].match(/\W/)) { setArg(letters[j], arg.slice(j+2), arg); broken = true; @@ -6065,7 +6067,7 @@ var minimist = function (args, opts) { setArg(letters[j], flags.strings[letters[j]] ? '' : true, arg); } } - + var key = arg.slice(-1)[0]; if (!broken && key !== '-') { if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1]) @@ -6095,17 +6097,17 @@ var minimist = function (args, opts) { } } } - + Object.keys(defaults).forEach(function (key) { if (!hasKey(argv, key.split('.'))) { setKey(argv, key.split('.'), defaults[key]); - + (aliases[key] || []).forEach(function (x) { setKey(argv, x.split('.'), defaults[key]); }); } }); - + if (opts['--']) { argv['--'] = new Array(); notFlags.forEach(function(key) { @@ -14436,155 +14438,155 @@ var escapeStringRegexp = function (str) { return str.replace(matchOperatorsRe, '\\$&'); }; -var colorName = { - "aliceblue": [240, 248, 255], - "antiquewhite": [250, 235, 215], - "aqua": [0, 255, 255], - "aquamarine": [127, 255, 212], - "azure": [240, 255, 255], - "beige": [245, 245, 220], - "bisque": [255, 228, 196], - "black": [0, 0, 0], - "blanchedalmond": [255, 235, 205], - "blue": [0, 0, 255], - "blueviolet": [138, 43, 226], - "brown": [165, 42, 42], - "burlywood": [222, 184, 135], - "cadetblue": [95, 158, 160], - "chartreuse": [127, 255, 0], - "chocolate": [210, 105, 30], - "coral": [255, 127, 80], - "cornflowerblue": [100, 149, 237], - "cornsilk": [255, 248, 220], - "crimson": [220, 20, 60], - "cyan": [0, 255, 255], - "darkblue": [0, 0, 139], - "darkcyan": [0, 139, 139], - "darkgoldenrod": [184, 134, 11], - "darkgray": [169, 169, 169], - "darkgreen": [0, 100, 0], - "darkgrey": [169, 169, 169], - "darkkhaki": [189, 183, 107], - "darkmagenta": [139, 0, 139], - "darkolivegreen": [85, 107, 47], - "darkorange": [255, 140, 0], - "darkorchid": [153, 50, 204], - "darkred": [139, 0, 0], - "darksalmon": [233, 150, 122], - "darkseagreen": [143, 188, 143], - "darkslateblue": [72, 61, 139], - "darkslategray": [47, 79, 79], - "darkslategrey": [47, 79, 79], - "darkturquoise": [0, 206, 209], - "darkviolet": [148, 0, 211], - "deeppink": [255, 20, 147], - "deepskyblue": [0, 191, 255], - "dimgray": [105, 105, 105], - "dimgrey": [105, 105, 105], - "dodgerblue": [30, 144, 255], - "firebrick": [178, 34, 34], - "floralwhite": [255, 250, 240], - "forestgreen": [34, 139, 34], - "fuchsia": [255, 0, 255], - "gainsboro": [220, 220, 220], - "ghostwhite": [248, 248, 255], - "gold": [255, 215, 0], - "goldenrod": [218, 165, 32], - "gray": [128, 128, 128], - "green": [0, 128, 0], - "greenyellow": [173, 255, 47], - "grey": [128, 128, 128], - "honeydew": [240, 255, 240], - "hotpink": [255, 105, 180], - "indianred": [205, 92, 92], - "indigo": [75, 0, 130], - "ivory": [255, 255, 240], - "khaki": [240, 230, 140], - "lavender": [230, 230, 250], - "lavenderblush": [255, 240, 245], - "lawngreen": [124, 252, 0], - "lemonchiffon": [255, 250, 205], - "lightblue": [173, 216, 230], - "lightcoral": [240, 128, 128], - "lightcyan": [224, 255, 255], - "lightgoldenrodyellow": [250, 250, 210], - "lightgray": [211, 211, 211], - "lightgreen": [144, 238, 144], - "lightgrey": [211, 211, 211], - "lightpink": [255, 182, 193], - "lightsalmon": [255, 160, 122], - "lightseagreen": [32, 178, 170], - "lightskyblue": [135, 206, 250], - "lightslategray": [119, 136, 153], - "lightslategrey": [119, 136, 153], - "lightsteelblue": [176, 196, 222], - "lightyellow": [255, 255, 224], - "lime": [0, 255, 0], - "limegreen": [50, 205, 50], - "linen": [250, 240, 230], - "magenta": [255, 0, 255], - "maroon": [128, 0, 0], - "mediumaquamarine": [102, 205, 170], - "mediumblue": [0, 0, 205], - "mediumorchid": [186, 85, 211], - "mediumpurple": [147, 112, 219], - "mediumseagreen": [60, 179, 113], - "mediumslateblue": [123, 104, 238], - "mediumspringgreen": [0, 250, 154], - "mediumturquoise": [72, 209, 204], - "mediumvioletred": [199, 21, 133], - "midnightblue": [25, 25, 112], - "mintcream": [245, 255, 250], - "mistyrose": [255, 228, 225], - "moccasin": [255, 228, 181], - "navajowhite": [255, 222, 173], - "navy": [0, 0, 128], - "oldlace": [253, 245, 230], - "olive": [128, 128, 0], - "olivedrab": [107, 142, 35], - "orange": [255, 165, 0], - "orangered": [255, 69, 0], - "orchid": [218, 112, 214], - "palegoldenrod": [238, 232, 170], - "palegreen": [152, 251, 152], - "paleturquoise": [175, 238, 238], - "palevioletred": [219, 112, 147], - "papayawhip": [255, 239, 213], - "peachpuff": [255, 218, 185], - "peru": [205, 133, 63], - "pink": [255, 192, 203], - "plum": [221, 160, 221], - "powderblue": [176, 224, 230], - "purple": [128, 0, 128], - "rebeccapurple": [102, 51, 153], - "red": [255, 0, 0], - "rosybrown": [188, 143, 143], - "royalblue": [65, 105, 225], - "saddlebrown": [139, 69, 19], - "salmon": [250, 128, 114], - "sandybrown": [244, 164, 96], - "seagreen": [46, 139, 87], - "seashell": [255, 245, 238], - "sienna": [160, 82, 45], - "silver": [192, 192, 192], - "skyblue": [135, 206, 235], - "slateblue": [106, 90, 205], - "slategray": [112, 128, 144], - "slategrey": [112, 128, 144], - "snow": [255, 250, 250], - "springgreen": [0, 255, 127], - "steelblue": [70, 130, 180], - "tan": [210, 180, 140], - "teal": [0, 128, 128], - "thistle": [216, 191, 216], - "tomato": [255, 99, 71], - "turquoise": [64, 224, 208], - "violet": [238, 130, 238], - "wheat": [245, 222, 179], - "white": [255, 255, 255], - "whitesmoke": [245, 245, 245], - "yellow": [255, 255, 0], - "yellowgreen": [154, 205, 50] +var colorName = { + "aliceblue": [240, 248, 255], + "antiquewhite": [250, 235, 215], + "aqua": [0, 255, 255], + "aquamarine": [127, 255, 212], + "azure": [240, 255, 255], + "beige": [245, 245, 220], + "bisque": [255, 228, 196], + "black": [0, 0, 0], + "blanchedalmond": [255, 235, 205], + "blue": [0, 0, 255], + "blueviolet": [138, 43, 226], + "brown": [165, 42, 42], + "burlywood": [222, 184, 135], + "cadetblue": [95, 158, 160], + "chartreuse": [127, 255, 0], + "chocolate": [210, 105, 30], + "coral": [255, 127, 80], + "cornflowerblue": [100, 149, 237], + "cornsilk": [255, 248, 220], + "crimson": [220, 20, 60], + "cyan": [0, 255, 255], + "darkblue": [0, 0, 139], + "darkcyan": [0, 139, 139], + "darkgoldenrod": [184, 134, 11], + "darkgray": [169, 169, 169], + "darkgreen": [0, 100, 0], + "darkgrey": [169, 169, 169], + "darkkhaki": [189, 183, 107], + "darkmagenta": [139, 0, 139], + "darkolivegreen": [85, 107, 47], + "darkorange": [255, 140, 0], + "darkorchid": [153, 50, 204], + "darkred": [139, 0, 0], + "darksalmon": [233, 150, 122], + "darkseagreen": [143, 188, 143], + "darkslateblue": [72, 61, 139], + "darkslategray": [47, 79, 79], + "darkslategrey": [47, 79, 79], + "darkturquoise": [0, 206, 209], + "darkviolet": [148, 0, 211], + "deeppink": [255, 20, 147], + "deepskyblue": [0, 191, 255], + "dimgray": [105, 105, 105], + "dimgrey": [105, 105, 105], + "dodgerblue": [30, 144, 255], + "firebrick": [178, 34, 34], + "floralwhite": [255, 250, 240], + "forestgreen": [34, 139, 34], + "fuchsia": [255, 0, 255], + "gainsboro": [220, 220, 220], + "ghostwhite": [248, 248, 255], + "gold": [255, 215, 0], + "goldenrod": [218, 165, 32], + "gray": [128, 128, 128], + "green": [0, 128, 0], + "greenyellow": [173, 255, 47], + "grey": [128, 128, 128], + "honeydew": [240, 255, 240], + "hotpink": [255, 105, 180], + "indianred": [205, 92, 92], + "indigo": [75, 0, 130], + "ivory": [255, 255, 240], + "khaki": [240, 230, 140], + "lavender": [230, 230, 250], + "lavenderblush": [255, 240, 245], + "lawngreen": [124, 252, 0], + "lemonchiffon": [255, 250, 205], + "lightblue": [173, 216, 230], + "lightcoral": [240, 128, 128], + "lightcyan": [224, 255, 255], + "lightgoldenrodyellow": [250, 250, 210], + "lightgray": [211, 211, 211], + "lightgreen": [144, 238, 144], + "lightgrey": [211, 211, 211], + "lightpink": [255, 182, 193], + "lightsalmon": [255, 160, 122], + "lightseagreen": [32, 178, 170], + "lightskyblue": [135, 206, 250], + "lightslategray": [119, 136, 153], + "lightslategrey": [119, 136, 153], + "lightsteelblue": [176, 196, 222], + "lightyellow": [255, 255, 224], + "lime": [0, 255, 0], + "limegreen": [50, 205, 50], + "linen": [250, 240, 230], + "magenta": [255, 0, 255], + "maroon": [128, 0, 0], + "mediumaquamarine": [102, 205, 170], + "mediumblue": [0, 0, 205], + "mediumorchid": [186, 85, 211], + "mediumpurple": [147, 112, 219], + "mediumseagreen": [60, 179, 113], + "mediumslateblue": [123, 104, 238], + "mediumspringgreen": [0, 250, 154], + "mediumturquoise": [72, 209, 204], + "mediumvioletred": [199, 21, 133], + "midnightblue": [25, 25, 112], + "mintcream": [245, 255, 250], + "mistyrose": [255, 228, 225], + "moccasin": [255, 228, 181], + "navajowhite": [255, 222, 173], + "navy": [0, 0, 128], + "oldlace": [253, 245, 230], + "olive": [128, 128, 0], + "olivedrab": [107, 142, 35], + "orange": [255, 165, 0], + "orangered": [255, 69, 0], + "orchid": [218, 112, 214], + "palegoldenrod": [238, 232, 170], + "palegreen": [152, 251, 152], + "paleturquoise": [175, 238, 238], + "palevioletred": [219, 112, 147], + "papayawhip": [255, 239, 213], + "peachpuff": [255, 218, 185], + "peru": [205, 133, 63], + "pink": [255, 192, 203], + "plum": [221, 160, 221], + "powderblue": [176, 224, 230], + "purple": [128, 0, 128], + "rebeccapurple": [102, 51, 153], + "red": [255, 0, 0], + "rosybrown": [188, 143, 143], + "royalblue": [65, 105, 225], + "saddlebrown": [139, 69, 19], + "salmon": [250, 128, 114], + "sandybrown": [244, 164, 96], + "seagreen": [46, 139, 87], + "seashell": [255, 245, 238], + "sienna": [160, 82, 45], + "silver": [192, 192, 192], + "skyblue": [135, 206, 235], + "slateblue": [106, 90, 205], + "slategray": [112, 128, 144], + "slategrey": [112, 128, 144], + "snow": [255, 250, 250], + "springgreen": [0, 255, 127], + "steelblue": [70, 130, 180], + "tan": [210, 180, 140], + "teal": [0, 128, 128], + "thistle": [216, 191, 216], + "tomato": [255, 99, 71], + "turquoise": [64, 224, 208], + "violet": [238, 130, 238], + "wheat": [245, 222, 179], + "white": [255, 255, 255], + "whitesmoke": [245, 245, 245], + "yellow": [255, 255, 0], + "yellowgreen": [154, 205, 50] }; var conversions = createCommonjsModule(function (module) { @@ -22580,7 +22582,7 @@ var textTable = function (rows_, opts) { var stringLength = opts.stringLength || function (s) { return String(s).length; } ; - + var dotsizes = reduce(rows_, function (acc, row) { forEach(row, function (c, ix) { var n = dotindex(c); @@ -22588,7 +22590,7 @@ var textTable = function (rows_, opts) { }); return acc; }, []); - + var rows = map$1(rows_, function (row) { return map$1(row, function (c_, ix) { var c = String(c_); @@ -22602,7 +22604,7 @@ var textTable = function (rows_, opts) { else return c; }); }); - + var sizes = reduce(rows, function (acc, row) { forEach(row, function (c, ix) { var n = stringLength(c); @@ -22610,7 +22612,7 @@ var textTable = function (rows_, opts) { }); return acc; }, []); - + return map$1(rows, function (row) { return map$1(row, function (c, ix) { var n = (sizes[ix] - stringLength(c)) || 0; @@ -22623,7 +22625,7 @@ var textTable = function (rows_, opts) { + c + Array(Math.floor(n / 2 + 1)).join(' ') ; } - + return c + s; }).join(hsep).replace(/\s+$/, ''); }).join('\n'); @@ -40953,7 +40955,7 @@ const dependencies$1 = { "markdown-extensions": "^1.1.1", remark: "^11.0.2", "remark-lint": "^6.0.5", - "remark-preset-lint-node": "^1.13.0", + "remark-preset-lint-node": "^1.14.0", "unified-args": "^7.1.0" }; const main = "dist/index.js"; @@ -40983,43 +40985,291 @@ var _package$3 = /*#__PURE__*/Object.freeze({ 'default': _package$2 }); -/* Map of allowed verbs. */ -var ALLOWED_VERBS = { - enable: true, - disable: true, - ignore: true -}; +var vfileLocation$1 = factory$7; + +function factory$7(file) { + var contents = indices$1(String(file)); + + return { + toPosition: offsetToPositionFactory$1(contents), + toOffset: positionToOffsetFactory$1(contents) + } +} + +// Factory to get the line and column-based `position` for `offset` in the bound +// indices. +function offsetToPositionFactory$1(indices) { + return offsetToPosition + + // Get the line and column-based `position` for `offset` in the bound indices. + function offsetToPosition(offset) { + var index = -1; + var length = indices.length; + + if (offset < 0) { + return {} + } + + while (++index < length) { + if (indices[index] > offset) { + return { + line: index + 1, + column: offset - (indices[index - 1] || 0) + 1, + offset: offset + } + } + } + + return {} + } +} + +// Factory to get the `offset` for a line and column-based `position` in the +// bound indices. +function positionToOffsetFactory$1(indices) { + return positionToOffset + + // Get the `offset` for a line and column-based `position` in the bound + // indices. + function positionToOffset(position) { + var line = position && position.line; + var column = position && position.column; + + if (!isNaN(line) && !isNaN(column) && line - 1 in indices) { + return (indices[line - 2] || 0) + column - 1 || 0 + } + + return -1 + } +} + +// Get indices of line-breaks in `value`. +function indices$1(value) { + var result = []; + var index = value.indexOf('\n'); + + while (index !== -1) { + result.push(index + 1); + index = value.indexOf('\n', index + 1); + } + + result.push(value.length + 1); + + return result +} + +var convert_1$1 = convert$2; + +function convert$2(test) { + if (typeof test === 'string') { + return typeFactory$1(test) + } + + if (test === null || test === undefined) { + return ok$2 + } + + if (typeof test === 'object') { + return ('length' in test ? anyFactory$1 : matchesFactory$1)(test) + } + + if (typeof test === 'function') { + return test + } + + throw new Error('Expected function, string, or object as test') +} + +function convertAll$1(tests) { + var results = []; + var length = tests.length; + var index = -1; + + while (++index < length) { + results[index] = convert$2(tests[index]); + } + + return results +} + +// Utility assert each property in `test` is represented in `node`, and each +// values are strictly equal. +function matchesFactory$1(test) { + return matches + + function matches(node) { + var key; + + for (key in test) { + if (node[key] !== test[key]) { + return false + } + } + + return true + } +} + +function anyFactory$1(tests) { + var checks = convertAll$1(tests); + var length = checks.length; + + return matches + + function matches() { + var index = -1; + + while (++index < length) { + if (checks[index].apply(this, arguments)) { + return true + } + } + + return false + } +} + +// Utility to convert a string into a function which checks a given node’s type +// for said string. +function typeFactory$1(test) { + return type + + function type(node) { + return Boolean(node && node.type === test) + } +} + +// Utility to return true. +function ok$2() { + return true +} + +var unistUtilVisitParents$1 = visitParents$1; + + + +var CONTINUE$2 = true; +var SKIP$2 = 'skip'; +var EXIT$2 = false; + +visitParents$1.CONTINUE = CONTINUE$2; +visitParents$1.SKIP = SKIP$2; +visitParents$1.EXIT = EXIT$2; + +function visitParents$1(tree, test, visitor, reverse) { + var is; + + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + is = convert_1$1(test); + + one(tree, null, []); + + // Visit a single node. + function one(node, index, parents) { + var result = []; + var subresult; + + if (!test || is(node, index, parents[parents.length - 1] || null)) { + result = toResult$1(visitor(node, parents)); + + if (result[0] === EXIT$2) { + return result + } + } + + if (node.children && result[0] !== SKIP$2) { + subresult = toResult$1(all(node.children, parents.concat(node))); + return subresult[0] === EXIT$2 ? subresult : result + } + + return result + } + + // Visit children in `parent`. + function all(children, parents) { + var min = -1; + var step = reverse ? -1 : 1; + var index = (reverse ? children.length : min) + step; + var result; + + while (index > min && index < children.length) { + result = one(children[index], index, parents); + + if (result[0] === EXIT$2) { + return result + } + + index = typeof result[1] === 'number' ? result[1] : index + step; + } + } +} + +function toResult$1(value) { + if (value !== null && typeof value === 'object' && 'length' in value) { + return value + } + + if (typeof value === 'number') { + return [CONTINUE$2, value] + } + + return [value] +} + +var unistUtilVisit$1 = visit$1; + + + +var CONTINUE$3 = unistUtilVisitParents$1.CONTINUE; +var SKIP$3 = unistUtilVisitParents$1.SKIP; +var EXIT$3 = unistUtilVisitParents$1.EXIT; + +visit$1.CONTINUE = CONTINUE$3; +visit$1.SKIP = SKIP$3; +visit$1.EXIT = EXIT$3; + +function visit$1(tree, test, visitor, reverse) { + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + unistUtilVisitParents$1(tree, test, overload, reverse); + + function overload(node, parents) { + var parent = parents[parents.length - 1]; + var index = parent ? parent.children.indexOf(node) : null; + return visitor(node, index, parent) + } +} var unifiedMessageControl = messageControl; function messageControl(options) { - var name = options && options.name; - var marker = options && options.marker; - var test = options && options.test; - var sources; - var known; - var reset; - var enable; - var disable; + var settings = options || {}; + var name = settings.name; + var marker = settings.marker; + var test = settings.test; + var sources = settings.source; + var known = settings.known; + var reset = settings.reset; + var enable = settings.enable || []; + var disable = settings.disable || []; if (!name) { throw new Error('Expected `name` in `options`, got `' + name + '`') } if (!marker) { - throw new Error('Expected `name` in `options`, got `' + name + '`') + throw new Error('Expected `marker` in `options`, got `' + marker + '`') } - if (!test) { - throw new Error('Expected `test` in `options`, got `' + test + '`') - } - - known = options.known; - reset = options.reset; - enable = options.enable || []; - disable = options.disable || []; - sources = options.source; - if (!sources) { sources = [name]; } else if (typeof sources === 'string') { @@ -41029,13 +41279,13 @@ function messageControl(options) { return transformer function transformer(tree, file) { - var toOffset = vfileLocation(file).toOffset; + var toOffset = vfileLocation$1(file).toOffset; var initial = !reset; var gaps = detectGaps(tree, file); var scope = {}; var globals = []; - unistUtilVisit(tree, test, visitor); + unistUtilVisit$1(tree, test, visitor); file.messages = file.messages.filter(filter); @@ -41050,7 +41300,7 @@ function messageControl(options) { var pos; var tail; - if (!mark || mark.name !== options.name) { + if (!mark || mark.name !== name) { return } @@ -41060,7 +41310,7 @@ function messageControl(options) { pos = mark.node.position && mark.node.position.start; tail = next && next.position && next.position.end; - if (!verb || !ALLOWED_VERBS[verb] === true) { + if (verb !== 'enable' && verb !== 'disable' && verb !== 'ignore') { file.fail( 'Unknown keyword `' + verb + @@ -41073,20 +41323,8 @@ function messageControl(options) { length = ruleIds.length; index = -1; - while (++index < length) { - ruleId = ruleIds[index]; - - if (isKnown(ruleId, verb, mark.node)) { - toggle(pos, verb === 'enable', ruleId); - - if (verb === 'ignore') { - toggle(tail, true, ruleId); - } - } - } - - /* Apply to all rules. */ - if (!length) { + // Apply to all rules. + if (length === 0) { if (verb === 'ignore') { toggle(pos, false); toggle(tail, true); @@ -41094,6 +41332,18 @@ function messageControl(options) { toggle(pos, verb === 'enable'); reset = verb !== 'enable'; } + } else { + while (++index < length) { + ruleId = ruleIds[index]; + + if (isKnown(ruleId, verb, mark.node)) { + toggle(pos, verb === 'enable', ruleId); + + if (verb === 'ignore') { + toggle(tail, true, ruleId); + } + } + } } } @@ -41103,13 +41353,13 @@ function messageControl(options) { var ranges = scope[ruleId]; var pos; - /* Keep messages from a different source. */ + // Keep messages from a different source. if (!message.source || sources.indexOf(message.source) === -1) { return true } - /* We only ignore messages if they‘re disabled, - * *not* when they’re not in the document. */ + // We only ignore messages if they‘re disabled, *not* when they’re not in + // the document. if (!message.line) { message.line = 1; } @@ -41118,7 +41368,7 @@ function messageControl(options) { message.column = 1; } - /* Check whether the warning is inside a gap. */ + // Check whether the warning is inside a gap. pos = toOffset(message); while (gapIndex--) { @@ -41127,22 +41377,26 @@ function messageControl(options) { } } - /* Check whether allowed by specific and global states. */ + // Check whether allowed by specific and global states. return check(message, ranges, ruleId) && check(message, globals) } - /* Helper to check (and possibly warn) if a ruleId is unknown. */ + // Helper to check (and possibly warn) if a `ruleId` is unknown. function isKnown(ruleId, verb, pos) { var result = known ? known.indexOf(ruleId) !== -1 : true; if (!result) { - file.warn('Unknown rule: cannot ' + verb + " `'" + ruleId + "'`", pos); + file.message( + 'Unknown rule: cannot ' + verb + " `'" + ruleId + "'`", + pos + ); } return result } - /* Get the latest state of a rule. When without `ruleId`, gets global state. */ + // Get the latest state of a rule. + // When without `ruleId`, gets global state. function getState(ruleId) { var ranges = ruleId ? scope[ruleId] : globals; @@ -41161,10 +41415,9 @@ function messageControl(options) { return disable.indexOf(ruleId) === -1 } - /* Handle a rule. */ + // Handle a rule. function toggle(pos, state, ruleId) { var markers = ruleId ? scope[ruleId] : globals; - var currentState; var previousState; if (!markers) { @@ -41173,13 +41426,12 @@ function messageControl(options) { } previousState = getState(ruleId); - currentState = state; - if (currentState !== previousState) { - markers.push({state: currentState, position: pos}); + if (state !== previousState) { + markers.push({state: state, position: pos}); } - /* Toggle all known rules. */ + // Toggle all known rules. if (!ruleId) { for (ruleId in scope) { toggle(pos, state, ruleId); @@ -41187,9 +41439,9 @@ function messageControl(options) { } } - /* Check all `ranges` for `message`. */ + // Check all `ranges` for `message`. function check(message, ranges, id) { - /* Check the state at the message's position. */ + // Check the state at the message’s position. var index = ranges && ranges.length; var length = -1; var range; @@ -41197,7 +41449,7 @@ function messageControl(options) { while (--index > length) { range = ranges[index]; - /* istanbul ignore if - generated marker. */ + /* istanbul ignore if - Generated marker. */ if (!range.position || !range.position.line || !range.position.column) { continue } @@ -41205,14 +41457,14 @@ function messageControl(options) { if ( range.position.line < message.line || (range.position.line === message.line && - range.position.column < message.column) + range.position.column <= message.column) ) { return range.state === true } } - /* The first marker ocurred after the first - * message, so we check the initial state. */ + // The first marker ocurred after the first message, so we check the + // initial state. if (!id) { return initial || reset } @@ -41222,26 +41474,26 @@ function messageControl(options) { } } -/* Detect gaps in `ast`. */ +// Detect gaps in `tree`. function detectGaps(tree, file) { var lastNode = tree.children[tree.children.length - 1]; var offset = 0; var isGap = false; var gaps = []; - /* Find all gaps. */ - unistUtilVisit(tree, one); + // Find all gaps. + unistUtilVisit$1(tree, one); - /* Get the end of the document. - * This detects if the last node was the last node. - * If not, there’s an extra gap between the last node - * and the end of the document. */ + // Get the end of the document. + // This detects if the last node was the last node. + // If not, there’s an extra gap between the last node and the end of the + // document. if ( lastNode && lastNode.position && lastNode.position.end && offset === lastNode.position.end.offset && - trim_1(file.toString().slice(offset)) !== '' + trim(file.toString().slice(offset)) !== '' ) { update(); @@ -41262,7 +41514,7 @@ function detectGaps(tree, file) { } } - /* Detect a new position. */ + // Detect a new position. function update(latest) { if (latest === null || latest === undefined) { isGap = true; @@ -41282,6 +41534,10 @@ function detectGaps(tree, file) { } } +function trim(value) { + return value.replace(/^\s*|\s*$/g, '') +} + var mdastCommentMarker = marker$1; var whiteSpaceExpression = /\s+/g; @@ -41367,7 +41623,7 @@ var test = [ ]; function messageControl$1(options) { - return unifiedMessageControl(immutable({marker: mdastCommentMarker, test: test}, options)) + return unifiedMessageControl(Object.assign({marker: mdastCommentMarker, test: test}, options)) } var remarkLint = lint; @@ -41383,6 +41639,583 @@ function lintMessageControl() { return remarkMessageControl({name: 'lint', source: 'remark-lint'}) } +var vfileLocation$2 = factory$8; + +function factory$8(file) { + var contents = indices$2(String(file)); + + return { + toPosition: offsetToPositionFactory$2(contents), + toOffset: positionToOffsetFactory$2(contents) + } +} + +// Factory to get the line and column-based `position` for `offset` in the bound +// indices. +function offsetToPositionFactory$2(indices) { + return offsetToPosition + + // Get the line and column-based `position` for `offset` in the bound indices. + function offsetToPosition(offset) { + var index = -1; + var length = indices.length; + + if (offset < 0) { + return {} + } + + while (++index < length) { + if (indices[index] > offset) { + return { + line: index + 1, + column: offset - (indices[index - 1] || 0) + 1, + offset: offset + } + } + } + + return {} + } +} + +// Factory to get the `offset` for a line and column-based `position` in the +// bound indices. +function positionToOffsetFactory$2(indices) { + return positionToOffset + + // Get the `offset` for a line and column-based `position` in the bound + // indices. + function positionToOffset(position) { + var line = position && position.line; + var column = position && position.column; + + if (!isNaN(line) && !isNaN(column) && line - 1 in indices) { + return (indices[line - 2] || 0) + column - 1 || 0 + } + + return -1 + } +} + +// Get indices of line-breaks in `value`. +function indices$2(value) { + var result = []; + var index = value.indexOf('\n'); + + while (index !== -1) { + result.push(index + 1); + index = value.indexOf('\n', index + 1); + } + + result.push(value.length + 1); + + return result +} + +var convert_1$2 = convert$3; + +function convert$3(test) { + if (typeof test === 'string') { + return typeFactory$2(test) + } + + if (test === null || test === undefined) { + return ok$3 + } + + if (typeof test === 'object') { + return ('length' in test ? anyFactory$2 : matchesFactory$2)(test) + } + + if (typeof test === 'function') { + return test + } + + throw new Error('Expected function, string, or object as test') +} + +function convertAll$2(tests) { + var results = []; + var length = tests.length; + var index = -1; + + while (++index < length) { + results[index] = convert$3(tests[index]); + } + + return results +} + +// Utility assert each property in `test` is represented in `node`, and each +// values are strictly equal. +function matchesFactory$2(test) { + return matches + + function matches(node) { + var key; + + for (key in test) { + if (node[key] !== test[key]) { + return false + } + } + + return true + } +} + +function anyFactory$2(tests) { + var checks = convertAll$2(tests); + var length = checks.length; + + return matches + + function matches() { + var index = -1; + + while (++index < length) { + if (checks[index].apply(this, arguments)) { + return true + } + } + + return false + } +} + +// Utility to convert a string into a function which checks a given node’s type +// for said string. +function typeFactory$2(test) { + return type + + function type(node) { + return Boolean(node && node.type === test) + } +} + +// Utility to return true. +function ok$3() { + return true +} + +var unistUtilVisitParents$2 = visitParents$2; + + + +var CONTINUE$4 = true; +var SKIP$4 = 'skip'; +var EXIT$4 = false; + +visitParents$2.CONTINUE = CONTINUE$4; +visitParents$2.SKIP = SKIP$4; +visitParents$2.EXIT = EXIT$4; + +function visitParents$2(tree, test, visitor, reverse) { + var is; + + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + is = convert_1$2(test); + + one(tree, null, []); + + // Visit a single node. + function one(node, index, parents) { + var result = []; + var subresult; + + if (!test || is(node, index, parents[parents.length - 1] || null)) { + result = toResult$2(visitor(node, parents)); + + if (result[0] === EXIT$4) { + return result + } + } + + if (node.children && result[0] !== SKIP$4) { + subresult = toResult$2(all(node.children, parents.concat(node))); + return subresult[0] === EXIT$4 ? subresult : result + } + + return result + } + + // Visit children in `parent`. + function all(children, parents) { + var min = -1; + var step = reverse ? -1 : 1; + var index = (reverse ? children.length : min) + step; + var result; + + while (index > min && index < children.length) { + result = one(children[index], index, parents); + + if (result[0] === EXIT$4) { + return result + } + + index = typeof result[1] === 'number' ? result[1] : index + step; + } + } +} + +function toResult$2(value) { + if (value !== null && typeof value === 'object' && 'length' in value) { + return value + } + + if (typeof value === 'number') { + return [CONTINUE$4, value] + } + + return [value] +} + +var unistUtilVisit$2 = visit$2; + + + +var CONTINUE$5 = unistUtilVisitParents$2.CONTINUE; +var SKIP$5 = unistUtilVisitParents$2.SKIP; +var EXIT$5 = unistUtilVisitParents$2.EXIT; + +visit$2.CONTINUE = CONTINUE$5; +visit$2.SKIP = SKIP$5; +visit$2.EXIT = EXIT$5; + +function visit$2(tree, test, visitor, reverse) { + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + unistUtilVisitParents$2(tree, test, overload, reverse); + + function overload(node, parents) { + var parent = parents[parents.length - 1]; + var index = parent ? parent.children.indexOf(node) : null; + return visitor(node, index, parent) + } +} + +var unifiedMessageControl$1 = messageControl$2; + +function messageControl$2(options) { + var settings = options || {}; + var name = settings.name; + var marker = settings.marker; + var test = settings.test; + var sources = settings.source; + var known = settings.known; + var reset = settings.reset; + var enable = settings.enable || []; + var disable = settings.disable || []; + + if (!name) { + throw new Error('Expected `name` in `options`, got `' + name + '`') + } + + if (!marker) { + throw new Error('Expected `marker` in `options`, got `' + marker + '`') + } + + if (!sources) { + sources = [name]; + } else if (typeof sources === 'string') { + sources = [sources]; + } + + return transformer + + function transformer(tree, file) { + var toOffset = vfileLocation$2(file).toOffset; + var initial = !reset; + var gaps = detectGaps$1(tree, file); + var scope = {}; + var globals = []; + + unistUtilVisit$2(tree, test, visitor); + + file.messages = file.messages.filter(filter); + + function visitor(node, position, parent) { + var mark = marker(node); + var ruleIds; + var ruleId; + var verb; + var index; + var length; + var next; + var pos; + var tail; + + if (!mark || mark.name !== name) { + return + } + + ruleIds = mark.attributes.split(/\s/g); + verb = ruleIds.shift(); + next = parent.children[position + 1]; + pos = mark.node.position && mark.node.position.start; + tail = next && next.position && next.position.end; + + if (verb !== 'enable' && verb !== 'disable' && verb !== 'ignore') { + file.fail( + 'Unknown keyword `' + + verb + + '`: expected ' + + "`'enable'`, `'disable'`, or `'ignore'`", + mark.node + ); + } + + length = ruleIds.length; + index = -1; + + // Apply to all rules. + if (length === 0) { + if (verb === 'ignore') { + toggle(pos, false); + toggle(tail, true); + } else { + toggle(pos, verb === 'enable'); + reset = verb !== 'enable'; + } + } else { + while (++index < length) { + ruleId = ruleIds[index]; + + if (isKnown(ruleId, verb, mark.node)) { + toggle(pos, verb === 'enable', ruleId); + + if (verb === 'ignore') { + toggle(tail, true, ruleId); + } + } + } + } + } + + function filter(message) { + var gapIndex = gaps.length; + var ruleId = message.ruleId; + var ranges = scope[ruleId]; + var pos; + + // Keep messages from a different source. + if (!message.source || sources.indexOf(message.source) === -1) { + return true + } + + // We only ignore messages if they‘re disabled, *not* when they’re not in + // the document. + if (!message.line) { + message.line = 1; + } + + if (!message.column) { + message.column = 1; + } + + // Check whether the warning is inside a gap. + pos = toOffset(message); + + while (gapIndex--) { + if (gaps[gapIndex].start <= pos && gaps[gapIndex].end > pos) { + return false + } + } + + // Check whether allowed by specific and global states. + return check(message, ranges, ruleId) && check(message, globals) + } + + // Helper to check (and possibly warn) if a `ruleId` is unknown. + function isKnown(ruleId, verb, pos) { + var result = known ? known.indexOf(ruleId) !== -1 : true; + + if (!result) { + file.message( + 'Unknown rule: cannot ' + verb + " `'" + ruleId + "'`", + pos + ); + } + + return result + } + + // Get the latest state of a rule. + // When without `ruleId`, gets global state. + function getState(ruleId) { + var ranges = ruleId ? scope[ruleId] : globals; + + if (ranges && ranges.length !== 0) { + return ranges[ranges.length - 1].state + } + + if (!ruleId) { + return !reset + } + + if (reset) { + return enable.indexOf(ruleId) !== -1 + } + + return disable.indexOf(ruleId) === -1 + } + + // Handle a rule. + function toggle(pos, state, ruleId) { + var markers = ruleId ? scope[ruleId] : globals; + var previousState; + + if (!markers) { + markers = []; + scope[ruleId] = markers; + } + + previousState = getState(ruleId); + + if (state !== previousState) { + markers.push({state: state, position: pos}); + } + + // Toggle all known rules. + if (!ruleId) { + for (ruleId in scope) { + toggle(pos, state, ruleId); + } + } + } + + // Check all `ranges` for `message`. + function check(message, ranges, id) { + // Check the state at the message’s position. + var index = ranges && ranges.length; + var length = -1; + var range; + + while (--index > length) { + range = ranges[index]; + + /* istanbul ignore if - Generated marker. */ + if (!range.position || !range.position.line || !range.position.column) { + continue + } + + if ( + range.position.line < message.line || + (range.position.line === message.line && + range.position.column <= message.column) + ) { + return range.state === true + } + } + + // The first marker ocurred after the first message, so we check the + // initial state. + if (!id) { + return initial || reset + } + + return reset ? enable.indexOf(id) !== -1 : disable.indexOf(id) === -1 + } + } +} + +// Detect gaps in `tree`. +function detectGaps$1(tree, file) { + var lastNode = tree.children[tree.children.length - 1]; + var offset = 0; + var isGap = false; + var gaps = []; + + // Find all gaps. + unistUtilVisit$2(tree, one); + + // Get the end of the document. + // This detects if the last node was the last node. + // If not, there’s an extra gap between the last node and the end of the + // document. + if ( + lastNode && + lastNode.position && + lastNode.position.end && + offset === lastNode.position.end.offset && + trim$1(file.toString().slice(offset)) !== '' + ) { + update(); + + update( + tree && tree.position && tree.position.end && tree.position.end.offset - 1 + ); + } + + return gaps + + function one(node) { + var pos = node.position; + + update(pos && pos.start && pos.start.offset); + + if (!node.children) { + update(pos && pos.end && pos.end.offset); + } + } + + // Detect a new position. + function update(latest) { + if (latest === null || latest === undefined) { + isGap = true; + return + } + + if (offset >= latest) { + return + } + + if (isGap) { + gaps.push({start: offset, end: latest}); + isGap = false; + } + + offset = latest; + } +} + +function trim$1(value) { + return value.replace(/^\s*|\s*$/g, '') +} + +var remarkMessageControl$1 = messageControl$3; + +var test$1 = [ + 'html', // Comments are `html` nodes in mdast. + 'comment' // In MDX, comments have their own node. +]; + +function messageControl$3(options) { + return unifiedMessageControl$1(Object.assign({marker: mdastCommentMarker, test: test$1}, options)) +} + +var remarkLint$1 = lint$1; + +// `remark-lint`. +// This adds support for ignoring stuff from messages (``). +// All rules are in their own packages and presets. +function lint$1() { + this.use(lintMessageControl$1); +} + +function lintMessageControl$1() { + return remarkMessageControl$1({name: 'lint', source: 'remark-lint'}) +} + /** * An Array.prototype.slice.call(arguments) alternative * @@ -41822,9 +42655,9 @@ function promise(value) { return value && 'function' == typeof value.then; } -var unifiedLintRule = factory$7; +var unifiedLintRule = factory$9; -function factory$7(id, rule) { +function factory$9(id, rule) { var parts = id.split(':'); var source = parts[0]; var ruleId = parts[1]; @@ -41862,7 +42695,7 @@ function factory$7(id, rule) { if (err && messages.indexOf(err) === -1) { try { file.fail(err); - } catch (error) {} + } catch (_) {} } while (index < messages.length) { @@ -41921,7 +42754,7 @@ function coerce(name, value) { if (level < 0 || level > 2) { throw new Error( - 'Invalid severity `' + + 'Incorrect severity `' + level + '` for `' + name + @@ -41946,490 +42779,700 @@ function finalNewline(tree, file) { } } -const addendum = "addenda"; -const aircraft = "aircraft"; -const alga = "algae"; -const alumna = "alumnae"; -const alumnus = "alumni"; -const amoeba = "amoebae"; -const analysis = "analyses"; -const antenna = "antennae"; -const antithesis = "antitheses"; -const apex = "apices"; -const appendix = "appendices"; -const automaton = "automata"; -const axis = "axes"; -const bacillus = "bacilli"; -const bacterium = "bacteria"; -const barracks = "barracks"; -const basis = "bases"; -const beau = "beaux"; -const bison = "bison"; -const buffalo = "buffalo"; -const bureau = "bureaus"; -const cactus = "cacti"; -const calf = "calves"; -const carp = "carp"; -const census = "censuses"; -const chassis = "chassis"; -const cherub = "cherubim"; -const child = "children"; -const cod = "cod"; -const codex = "codices"; -const concerto = "concerti"; -const corpus = "corpora"; -const crisis = "crises"; -const criterion = "criteria"; -const curriculum = "curricula"; -const datum = "data"; -const deer = "deer"; -const diagnosis = "diagnoses"; -const die$1 = "dice"; -const dwarf = "dwarfs"; -const echo = "echoes"; -const elf = "elves"; -const elk = "elk"; -const ellipsis = "ellipses"; -const embargo = "embargoes"; -const emphasis$3 = "emphases"; -const erratum = "errata"; -const fez = "fezes"; -const firmware = "firmware"; -const fish = "fish"; -const focus = "foci"; -const foot = "feet"; -const formula = "formulae"; -const fungus = "fungi"; -const gallows = "gallows"; -const genus = "genera"; -const goose = "geese"; -const graffito = "graffiti"; -const grouse = "grouse"; -const half$1 = "halves"; -const hero = "heroes"; -const hoof = "hooves"; -const hovercraft = "hovercraft"; -const hypothesis = "hypotheses"; -const index$5 = "indices"; -const kakapo = "kakapo"; -const knife = "knives"; -const larva = "larvae"; -const leaf = "leaves"; -const libretto = "libretti"; -const life = "lives"; -const loaf = "loaves"; -const locus = "loci"; -const louse = "lice"; -const man = "men"; -const matrix = "matrices"; -const means = "means"; -const medium = "media"; -const memorandum = "memoranda"; -const millennium = "millennia"; -const minutia = "minutiae"; -const moose = "moose"; -const mouse = "mice"; -const nebula = "nebulae"; -const nemesis = "nemeses"; -const neurosis = "neuroses"; -const news = "news"; -const nucleus = "nuclei"; -const oasis = "oases"; -const offspring = "offspring"; -const opus = "opera"; -const ovum = "ova"; -const ox = "oxen"; -const paralysis = "paralyses"; -const parenthesis = "parentheses"; -const person = "people"; -const phenomenon = "phenomena"; -const phylum = "phyla"; -const pike = "pike"; -const polyhedron = "polyhedra"; -const potato = "potatoes"; -const prognosis = "prognoses"; -const quiz = "quizzes"; -const radius = "radii"; -const referendum = "referenda"; -const salmon = "salmon"; -const scarf = "scarves"; -const self = "selves"; -const series = "series"; -const sheep = "sheep"; -const shelf = "shelves"; -const shrimp = "shrimp"; -const spacecraft = "spacecraft"; -const species = "species"; -const spectrum = "spectra"; -const squid = "squid"; -const stimulus = "stimuli"; -const stratum = "strata"; -const swine = "swine"; -const syllabus = "syllabi"; -const symposium = "symposia"; -const synopsis = "synopses"; -const synthesis = "syntheses"; -const tableau = "tableaus"; -const that = "those"; -const thesis = "theses"; -const thief = "thieves"; -const tomato = "tomatoes"; -const tooth = "teeth"; -const trout = "trout"; -const tuna = "tuna"; -const vertebra = "vertebrae"; -const vertex = "vertices"; -const veto = "vetoes"; -const vita = "vitae"; -const vortex = "vortices"; -const watercraft = "watercraft"; -const wharf = "wharves"; -const wife = "wives"; -const wolf = "wolves"; -const woman = "women"; -var irregularPlurals = { - addendum: addendum, - aircraft: aircraft, - alga: alga, - alumna: alumna, - alumnus: alumnus, - amoeba: amoeba, - analysis: analysis, - antenna: antenna, - antithesis: antithesis, - apex: apex, - appendix: appendix, - automaton: automaton, - axis: axis, - bacillus: bacillus, - bacterium: bacterium, - barracks: barracks, - basis: basis, - beau: beau, - bison: bison, - buffalo: buffalo, - bureau: bureau, - cactus: cactus, - calf: calf, - carp: carp, - census: census, - chassis: chassis, - cherub: cherub, - child: child, - "château": "châteaus", - cod: cod, - codex: codex, - concerto: concerto, - corpus: corpus, - crisis: crisis, - criterion: criterion, - curriculum: curriculum, - datum: datum, - deer: deer, - diagnosis: diagnosis, - die: die$1, - dwarf: dwarf, - echo: echo, - elf: elf, - elk: elk, - ellipsis: ellipsis, - embargo: embargo, - emphasis: emphasis$3, - erratum: erratum, - "faux pas": "faux pas", - fez: fez, - firmware: firmware, - fish: fish, - focus: focus, - foot: foot, - formula: formula, - fungus: fungus, - gallows: gallows, - genus: genus, - goose: goose, - graffito: graffito, - grouse: grouse, - half: half$1, - hero: hero, - hoof: hoof, - hovercraft: hovercraft, - hypothesis: hypothesis, - index: index$5, - kakapo: kakapo, - knife: knife, - larva: larva, - leaf: leaf, - libretto: libretto, - life: life, - loaf: loaf, - locus: locus, - louse: louse, - man: man, - matrix: matrix, - means: means, - medium: medium, - memorandum: memorandum, - millennium: millennium, - minutia: minutia, - moose: moose, - mouse: mouse, - nebula: nebula, - nemesis: nemesis, - neurosis: neurosis, - news: news, - nucleus: nucleus, - oasis: oasis, - offspring: offspring, - opus: opus, - ovum: ovum, - ox: ox, - paralysis: paralysis, - parenthesis: parenthesis, - person: person, - phenomenon: phenomenon, - phylum: phylum, - pike: pike, - polyhedron: polyhedron, - potato: potato, - prognosis: prognosis, - quiz: quiz, - radius: radius, - referendum: referendum, - salmon: salmon, - scarf: scarf, - self: self, - series: series, - sheep: sheep, - shelf: shelf, - shrimp: shrimp, - spacecraft: spacecraft, - species: species, - spectrum: spectrum, - squid: squid, - stimulus: stimulus, - stratum: stratum, - swine: swine, - syllabus: syllabus, - symposium: symposium, - synopsis: synopsis, - synthesis: synthesis, - tableau: tableau, - that: that, - thesis: thesis, - thief: thief, - "this": "these", - tomato: tomato, - tooth: tooth, - trout: trout, - tuna: tuna, - vertebra: vertebra, - vertex: vertex, - veto: veto, - vita: vita, - vortex: vortex, - watercraft: watercraft, - wharf: wharf, - wife: wife, - wolf: wolf, - woman: woman -}; - -var irregularPlurals$1 = /*#__PURE__*/Object.freeze({ - __proto__: null, - addendum: addendum, - aircraft: aircraft, - alga: alga, - alumna: alumna, - alumnus: alumnus, - amoeba: amoeba, - analysis: analysis, - antenna: antenna, - antithesis: antithesis, - apex: apex, - appendix: appendix, - automaton: automaton, - axis: axis, - bacillus: bacillus, - bacterium: bacterium, - barracks: barracks, - basis: basis, - beau: beau, - bison: bison, - buffalo: buffalo, - bureau: bureau, - cactus: cactus, - calf: calf, - carp: carp, - census: census, - chassis: chassis, - cherub: cherub, - child: child, - cod: cod, - codex: codex, - concerto: concerto, - corpus: corpus, - crisis: crisis, - criterion: criterion, - curriculum: curriculum, - datum: datum, - deer: deer, - diagnosis: diagnosis, - die: die$1, - dwarf: dwarf, - echo: echo, - elf: elf, - elk: elk, - ellipsis: ellipsis, - embargo: embargo, - emphasis: emphasis$3, - erratum: erratum, - fez: fez, - firmware: firmware, - fish: fish, - focus: focus, - foot: foot, - formula: formula, - fungus: fungus, - gallows: gallows, - genus: genus, - goose: goose, - graffito: graffito, - grouse: grouse, - half: half$1, - hero: hero, - hoof: hoof, - hovercraft: hovercraft, - hypothesis: hypothesis, - index: index$5, - kakapo: kakapo, - knife: knife, - larva: larva, - leaf: leaf, - libretto: libretto, - life: life, - loaf: loaf, - locus: locus, - louse: louse, - man: man, - matrix: matrix, - means: means, - medium: medium, - memorandum: memorandum, - millennium: millennium, - minutia: minutia, - moose: moose, - mouse: mouse, - nebula: nebula, - nemesis: nemesis, - neurosis: neurosis, - news: news, - nucleus: nucleus, - oasis: oasis, - offspring: offspring, - opus: opus, - ovum: ovum, - ox: ox, - paralysis: paralysis, - parenthesis: parenthesis, - person: person, - phenomenon: phenomenon, - phylum: phylum, - pike: pike, - polyhedron: polyhedron, - potato: potato, - prognosis: prognosis, - quiz: quiz, - radius: radius, - referendum: referendum, - salmon: salmon, - scarf: scarf, - self: self, - series: series, - sheep: sheep, - shelf: shelf, - shrimp: shrimp, - spacecraft: spacecraft, - species: species, - spectrum: spectrum, - squid: squid, - stimulus: stimulus, - stratum: stratum, - swine: swine, - syllabus: syllabus, - symposium: symposium, - synopsis: synopsis, - synthesis: synthesis, - tableau: tableau, - that: that, - thesis: thesis, - thief: thief, - tomato: tomato, - tooth: tooth, - trout: trout, - tuna: tuna, - vertebra: vertebra, - vertex: vertex, - veto: veto, - vita: vita, - vortex: vortex, - watercraft: watercraft, - wharf: wharf, - wife: wife, - wolf: wolf, - woman: woman, - 'default': irregularPlurals -}); +var pluralize = createCommonjsModule(function (module, exports) { +/* global define */ -var irregularPlurals$2 = getCjsExportFromNamespace(irregularPlurals$1); +(function (root, pluralize) { + /* istanbul ignore else */ + if (typeof commonjsRequire === 'function' && 'object' === 'object' && 'object' === 'object') { + // Node. + module.exports = pluralize(); + } else { + // Browser global. + root.pluralize = pluralize(); + } +})(commonjsGlobal, function () { + // Rule storage - pluralize and singularize need to be run sequentially, + // while other rules can be optimized using an object for instant lookups. + var pluralRules = []; + var singularRules = []; + var uncountables = {}; + var irregularPlurals = {}; + var irregularSingles = {}; -var irregularPlurals_1 = createCommonjsModule(function (module) { + /** + * Sanitize a pluralization rule to a usable regular expression. + * + * @param {(RegExp|string)} rule + * @return {RegExp} + */ + function sanitizeRule (rule) { + if (typeof rule === 'string') { + return new RegExp('^' + rule + '$', 'i'); + } + return rule; + } -const map = new Map(); -// TODO: Use Object.entries when targeting Node.js 8 -for (const key of Object.keys(irregularPlurals$2)) { - map.set(key, irregularPlurals$2[key]); -} + /** + * Pass in a word token to produce a function that can replicate the case on + * another word. + * + * @param {string} word + * @param {string} token + * @return {Function} + */ + function restoreCase (word, token) { + // Tokens are an exact match. + if (word === token) return token; -// Ensure nobody can modify each others Map -Object.defineProperty(module, 'exports', { - get() { - return map; - } -}); -}); + // Lower cased words. E.g. "hello". + if (word === word.toLowerCase()) return token.toLowerCase(); -var plur = (word, plural, count) => { - if (typeof plural === 'number') { - count = plural; - } + // Upper cased words. E.g. "WHISKY". + if (word === word.toUpperCase()) return token.toUpperCase(); - if (irregularPlurals_1.has(word.toLowerCase())) { - plural = irregularPlurals_1.get(word.toLowerCase()); + // Title cased words. E.g. "Title". + if (word[0] === word[0].toUpperCase()) { + return token.charAt(0).toUpperCase() + token.substr(1).toLowerCase(); + } - const firstLetter = word.charAt(0); - const isFirstLetterUpperCase = firstLetter === firstLetter.toUpperCase(); - if (isFirstLetterUpperCase) { - plural = firstLetter.toUpperCase() + plural.slice(1); - } + // Lower cased words. E.g. "test". + return token.toLowerCase(); + } - const isWholeWordUpperCase = word === word.toUpperCase(); - if (isWholeWordUpperCase) { - plural = plural.toUpperCase(); - } - } else if (typeof plural !== 'string') { - plural = (word.replace(/(?:s|x|z|ch|sh)$/i, '$&e').replace(/([^aeiou])y$/i, '$1ie') + 's') - .replace(/i?e?s$/i, match => { - const isTailLowerCase = word.slice(-1) === word.slice(-1).toLowerCase(); - return isTailLowerCase ? match.toLowerCase() : match.toUpperCase(); - }); - } + /** + * Interpolate a regexp string. + * + * @param {string} str + * @param {Array} args + * @return {string} + */ + function interpolate (str, args) { + return str.replace(/\$(\d{1,2})/g, function (match, index) { + return args[index] || ''; + }); + } - return Math.abs(count) === 1 ? word : plural; -}; + /** + * Replace a word using a rule. + * + * @param {string} word + * @param {Array} rule + * @return {string} + */ + function replace (word, rule) { + return word.replace(rule[0], function (match, index) { + var result = interpolate(rule[1], arguments); + + if (match === '') { + return restoreCase(word[index - 1], result); + } + + return restoreCase(match, result); + }); + } + + /** + * Sanitize a word by passing in the word and sanitization rules. + * + * @param {string} token + * @param {string} word + * @param {Array} rules + * @return {string} + */ + function sanitizeWord (token, word, rules) { + // Empty string or doesn't need fixing. + if (!token.length || uncountables.hasOwnProperty(token)) { + return word; + } + + var len = rules.length; + + // Iterate over the sanitization rules and use the first one to match. + while (len--) { + var rule = rules[len]; + + if (rule[0].test(word)) return replace(word, rule); + } + + return word; + } + + /** + * Replace a word with the updated word. + * + * @param {Object} replaceMap + * @param {Object} keepMap + * @param {Array} rules + * @return {Function} + */ + function replaceWord (replaceMap, keepMap, rules) { + return function (word) { + // Get the correct token and case restoration functions. + var token = word.toLowerCase(); + + // Check against the keep object map. + if (keepMap.hasOwnProperty(token)) { + return restoreCase(word, token); + } + + // Check against the replacement map for a direct word replacement. + if (replaceMap.hasOwnProperty(token)) { + return restoreCase(word, replaceMap[token]); + } + + // Run all the rules against the word. + return sanitizeWord(token, word, rules); + }; + } + + /** + * Check if a word is part of the map. + */ + function checkWord (replaceMap, keepMap, rules, bool) { + return function (word) { + var token = word.toLowerCase(); + + if (keepMap.hasOwnProperty(token)) return true; + if (replaceMap.hasOwnProperty(token)) return false; + + return sanitizeWord(token, token, rules) === token; + }; + } + + /** + * Pluralize or singularize a word based on the passed in count. + * + * @param {string} word The word to pluralize + * @param {number} count How many of the word exist + * @param {boolean} inclusive Whether to prefix with the number (e.g. 3 ducks) + * @return {string} + */ + function pluralize (word, count, inclusive) { + var pluralized = count === 1 + ? pluralize.singular(word) : pluralize.plural(word); + + return (inclusive ? count + ' ' : '') + pluralized; + } + + /** + * Pluralize a word. + * + * @type {Function} + */ + pluralize.plural = replaceWord( + irregularSingles, irregularPlurals, pluralRules + ); + + /** + * Check if a word is plural. + * + * @type {Function} + */ + pluralize.isPlural = checkWord( + irregularSingles, irregularPlurals, pluralRules + ); + + /** + * Singularize a word. + * + * @type {Function} + */ + pluralize.singular = replaceWord( + irregularPlurals, irregularSingles, singularRules + ); + + /** + * Check if a word is singular. + * + * @type {Function} + */ + pluralize.isSingular = checkWord( + irregularPlurals, irregularSingles, singularRules + ); + + /** + * Add a pluralization rule to the collection. + * + * @param {(string|RegExp)} rule + * @param {string} replacement + */ + pluralize.addPluralRule = function (rule, replacement) { + pluralRules.push([sanitizeRule(rule), replacement]); + }; + + /** + * Add a singularization rule to the collection. + * + * @param {(string|RegExp)} rule + * @param {string} replacement + */ + pluralize.addSingularRule = function (rule, replacement) { + singularRules.push([sanitizeRule(rule), replacement]); + }; + + /** + * Add an uncountable word rule. + * + * @param {(string|RegExp)} word + */ + pluralize.addUncountableRule = function (word) { + if (typeof word === 'string') { + uncountables[word.toLowerCase()] = true; + return; + } + + // Set singular and plural references for the word. + pluralize.addPluralRule(word, '$0'); + pluralize.addSingularRule(word, '$0'); + }; + + /** + * Add an irregular word definition. + * + * @param {string} single + * @param {string} plural + */ + pluralize.addIrregularRule = function (single, plural) { + plural = plural.toLowerCase(); + single = single.toLowerCase(); + + irregularSingles[single] = plural; + irregularPlurals[plural] = single; + }; + + /** + * Irregular rules. + */ + [ + // Pronouns. + ['I', 'we'], + ['me', 'us'], + ['he', 'they'], + ['she', 'they'], + ['them', 'them'], + ['myself', 'ourselves'], + ['yourself', 'yourselves'], + ['itself', 'themselves'], + ['herself', 'themselves'], + ['himself', 'themselves'], + ['themself', 'themselves'], + ['is', 'are'], + ['was', 'were'], + ['has', 'have'], + ['this', 'these'], + ['that', 'those'], + // Words ending in with a consonant and `o`. + ['echo', 'echoes'], + ['dingo', 'dingoes'], + ['volcano', 'volcanoes'], + ['tornado', 'tornadoes'], + ['torpedo', 'torpedoes'], + // Ends with `us`. + ['genus', 'genera'], + ['viscus', 'viscera'], + // Ends with `ma`. + ['stigma', 'stigmata'], + ['stoma', 'stomata'], + ['dogma', 'dogmata'], + ['lemma', 'lemmata'], + ['schema', 'schemata'], + ['anathema', 'anathemata'], + // Other irregular rules. + ['ox', 'oxen'], + ['axe', 'axes'], + ['die', 'dice'], + ['yes', 'yeses'], + ['foot', 'feet'], + ['eave', 'eaves'], + ['goose', 'geese'], + ['tooth', 'teeth'], + ['quiz', 'quizzes'], + ['human', 'humans'], + ['proof', 'proofs'], + ['carve', 'carves'], + ['valve', 'valves'], + ['looey', 'looies'], + ['thief', 'thieves'], + ['groove', 'grooves'], + ['pickaxe', 'pickaxes'], + ['passerby', 'passersby'] + ].forEach(function (rule) { + return pluralize.addIrregularRule(rule[0], rule[1]); + }); + + /** + * Pluralization rules. + */ + [ + [/s?$/i, 's'], + [/[^\u0000-\u007F]$/i, '$0'], + [/([^aeiou]ese)$/i, '$1'], + [/(ax|test)is$/i, '$1es'], + [/(alias|[^aou]us|t[lm]as|gas|ris)$/i, '$1es'], + [/(e[mn]u)s?$/i, '$1s'], + [/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i, '$1'], + [/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i, '$1i'], + [/(alumn|alg|vertebr)(?:a|ae)$/i, '$1ae'], + [/(seraph|cherub)(?:im)?$/i, '$1im'], + [/(her|at|gr)o$/i, '$1oes'], + [/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i, '$1a'], + [/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i, '$1a'], + [/sis$/i, 'ses'], + [/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i, '$1$2ves'], + [/([^aeiouy]|qu)y$/i, '$1ies'], + [/([^ch][ieo][ln])ey$/i, '$1ies'], + [/(x|ch|ss|sh|zz)$/i, '$1es'], + [/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i, '$1ices'], + [/\b((?:tit)?m|l)(?:ice|ouse)$/i, '$1ice'], + [/(pe)(?:rson|ople)$/i, '$1ople'], + [/(child)(?:ren)?$/i, '$1ren'], + [/eaux$/i, '$0'], + [/m[ae]n$/i, 'men'], + ['thou', 'you'] + ].forEach(function (rule) { + return pluralize.addPluralRule(rule[0], rule[1]); + }); + + /** + * Singularization rules. + */ + [ + [/s$/i, ''], + [/(ss)$/i, '$1'], + [/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i, '$1fe'], + [/(ar|(?:wo|[ae])l|[eo][ao])ves$/i, '$1f'], + [/ies$/i, 'y'], + [/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i, '$1ie'], + [/\b(mon|smil)ies$/i, '$1ey'], + [/\b((?:tit)?m|l)ice$/i, '$1ouse'], + [/(seraph|cherub)im$/i, '$1'], + [/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i, '$1'], + [/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i, '$1sis'], + [/(movie|twelve|abuse|e[mn]u)s$/i, '$1'], + [/(test)(?:is|es)$/i, '$1is'], + [/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i, '$1us'], + [/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i, '$1um'], + [/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i, '$1on'], + [/(alumn|alg|vertebr)ae$/i, '$1a'], + [/(cod|mur|sil|vert|ind)ices$/i, '$1ex'], + [/(matr|append)ices$/i, '$1ix'], + [/(pe)(rson|ople)$/i, '$1rson'], + [/(child)ren$/i, '$1'], + [/(eau)x?$/i, '$1'], + [/men$/i, 'man'] + ].forEach(function (rule) { + return pluralize.addSingularRule(rule[0], rule[1]); + }); + + /** + * Uncountable rules. + */ + [ + // Singular words with no plurals. + 'adulthood', + 'advice', + 'agenda', + 'aid', + 'aircraft', + 'alcohol', + 'ammo', + 'analytics', + 'anime', + 'athletics', + 'audio', + 'bison', + 'blood', + 'bream', + 'buffalo', + 'butter', + 'carp', + 'cash', + 'chassis', + 'chess', + 'clothing', + 'cod', + 'commerce', + 'cooperation', + 'corps', + 'debris', + 'diabetes', + 'digestion', + 'elk', + 'energy', + 'equipment', + 'excretion', + 'expertise', + 'firmware', + 'flounder', + 'fun', + 'gallows', + 'garbage', + 'graffiti', + 'hardware', + 'headquarters', + 'health', + 'herpes', + 'highjinks', + 'homework', + 'housework', + 'information', + 'jeans', + 'justice', + 'kudos', + 'labour', + 'literature', + 'machinery', + 'mackerel', + 'mail', + 'media', + 'mews', + 'moose', + 'music', + 'mud', + 'manga', + 'news', + 'only', + 'personnel', + 'pike', + 'plankton', + 'pliers', + 'police', + 'pollution', + 'premises', + 'rain', + 'research', + 'rice', + 'salmon', + 'scissors', + 'series', + 'sewage', + 'shambles', + 'shrimp', + 'software', + 'species', + 'staff', + 'swine', + 'tennis', + 'traffic', + 'transportation', + 'trout', + 'tuna', + 'wealth', + 'welfare', + 'whiting', + 'wildebeest', + 'wildlife', + 'you', + /pok[eé]mon$/i, + // Regexes. + /[^aeiou]ese$/i, // "chinese", "japanese" + /deer$/i, // "deer", "reindeer" + /fish$/i, // "fish", "blowfish", "angelfish" + /measles$/i, + /o[iu]s$/i, // "carnivorous" + /pox$/i, // "chickpox", "smallpox" + /sheep$/i + ].forEach(pluralize.addUncountableRule); + + return pluralize; +}); +}); + +var convert_1$3 = convert$4; + +function convert$4(test) { + if (typeof test === 'string') { + return typeFactory$3(test) + } + + if (test === null || test === undefined) { + return ok$4 + } + + if (typeof test === 'object') { + return ('length' in test ? anyFactory$3 : matchesFactory$3)(test) + } + + if (typeof test === 'function') { + return test + } + + throw new Error('Expected function, string, or object as test') +} + +function convertAll$3(tests) { + var results = []; + var length = tests.length; + var index = -1; + + while (++index < length) { + results[index] = convert$4(tests[index]); + } + + return results +} + +// Utility assert each property in `test` is represented in `node`, and each +// values are strictly equal. +function matchesFactory$3(test) { + return matches + + function matches(node) { + var key; + + for (key in test) { + if (node[key] !== test[key]) { + return false + } + } + + return true + } +} + +function anyFactory$3(tests) { + var checks = convertAll$3(tests); + var length = checks.length; + + return matches + + function matches() { + var index = -1; + + while (++index < length) { + if (checks[index].apply(this, arguments)) { + return true + } + } + + return false + } +} + +// Utility to convert a string into a function which checks a given node’s type +// for said string. +function typeFactory$3(test) { + return type + + function type(node) { + return Boolean(node && node.type === test) + } +} + +// Utility to return true. +function ok$4() { + return true +} + +var unistUtilVisitParents$3 = visitParents$3; + + + +var CONTINUE$6 = true; +var SKIP$6 = 'skip'; +var EXIT$6 = false; + +visitParents$3.CONTINUE = CONTINUE$6; +visitParents$3.SKIP = SKIP$6; +visitParents$3.EXIT = EXIT$6; + +function visitParents$3(tree, test, visitor, reverse) { + var is; + + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + is = convert_1$3(test); + + one(tree, null, []); + + // Visit a single node. + function one(node, index, parents) { + var result = []; + var subresult; + + if (!test || is(node, index, parents[parents.length - 1] || null)) { + result = toResult$3(visitor(node, parents)); + + if (result[0] === EXIT$6) { + return result + } + } + + if (node.children && result[0] !== SKIP$6) { + subresult = toResult$3(all(node.children, parents.concat(node))); + return subresult[0] === EXIT$6 ? subresult : result + } + + return result + } + + // Visit children in `parent`. + function all(children, parents) { + var min = -1; + var step = reverse ? -1 : 1; + var index = (reverse ? children.length : min) + step; + var result; + + while (index > min && index < children.length) { + result = one(children[index], index, parents); + + if (result[0] === EXIT$6) { + return result + } + + index = typeof result[1] === 'number' ? result[1] : index + step; + } + } +} + +function toResult$3(value) { + if (value !== null && typeof value === 'object' && 'length' in value) { + return value + } -var start$1 = factory$8('start'); -var end = factory$8('end'); + if (typeof value === 'number') { + return [CONTINUE$6, value] + } + + return [value] +} + +var unistUtilVisit$3 = visit$3; + + + +var CONTINUE$7 = unistUtilVisitParents$3.CONTINUE; +var SKIP$7 = unistUtilVisitParents$3.SKIP; +var EXIT$7 = unistUtilVisitParents$3.EXIT; + +visit$3.CONTINUE = CONTINUE$7; +visit$3.SKIP = SKIP$7; +visit$3.EXIT = EXIT$7; + +function visit$3(tree, test, visitor, reverse) { + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + unistUtilVisitParents$3(tree, test, overload, reverse); + + function overload(node, parents) { + var parent = parents[parents.length - 1]; + var index = parent ? parent.children.indexOf(node) : null; + return visitor(node, index, parent) + } +} + +var start$1 = factory$a('start'); +var end = factory$a('end'); var unistUtilPosition = position$1; @@ -42440,7 +43483,7 @@ function position$1(node) { return {start: start$1(node), end: end(node)} } -function factory$8(type) { +function factory$a(type) { point.displayName = type; return point @@ -42480,7 +43523,7 @@ var start$2 = unistUtilPosition.start; function listItemBulletIndent(tree, file) { var contents = String(file); - unistUtilVisit(tree, 'list', visitor); + unistUtilVisit$3(tree, 'list', visitor); function visitor(node) { node.children.forEach(visitItems); @@ -42501,7 +43544,7 @@ function listItemBulletIndent(tree, file) { 'Incorrect indentation before bullet: remove ' + indent + ' ' + - plur('space', indent); + pluralize('space', indent); file.message(reason, { line: final.line, @@ -42512,26 +43555,216 @@ function listItemBulletIndent(tree, file) { } } +var convert_1$4 = convert$5; + +function convert$5(test) { + if (typeof test === 'string') { + return typeFactory$4(test) + } + + if (test === null || test === undefined) { + return ok$5 + } + + if (typeof test === 'object') { + return ('length' in test ? anyFactory$4 : matchesFactory$4)(test) + } + + if (typeof test === 'function') { + return test + } + + throw new Error('Expected function, string, or object as test') +} + +function convertAll$4(tests) { + var results = []; + var length = tests.length; + var index = -1; + + while (++index < length) { + results[index] = convert$5(tests[index]); + } + + return results +} + +// Utility assert each property in `test` is represented in `node`, and each +// values are strictly equal. +function matchesFactory$4(test) { + return matches + + function matches(node) { + var key; + + for (key in test) { + if (node[key] !== test[key]) { + return false + } + } + + return true + } +} + +function anyFactory$4(tests) { + var checks = convertAll$4(tests); + var length = checks.length; + + return matches + + function matches() { + var index = -1; + + while (++index < length) { + if (checks[index].apply(this, arguments)) { + return true + } + } + + return false + } +} + +// Utility to convert a string into a function which checks a given node’s type +// for said string. +function typeFactory$4(test) { + return type + + function type(node) { + return Boolean(node && node.type === test) + } +} + +// Utility to return true. +function ok$5() { + return true +} + +var unistUtilVisitParents$4 = visitParents$4; + + + +var CONTINUE$8 = true; +var SKIP$8 = 'skip'; +var EXIT$8 = false; + +visitParents$4.CONTINUE = CONTINUE$8; +visitParents$4.SKIP = SKIP$8; +visitParents$4.EXIT = EXIT$8; + +function visitParents$4(tree, test, visitor, reverse) { + var is; + + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + is = convert_1$4(test); + + one(tree, null, []); + + // Visit a single node. + function one(node, index, parents) { + var result = []; + var subresult; + + if (!test || is(node, index, parents[parents.length - 1] || null)) { + result = toResult$4(visitor(node, parents)); + + if (result[0] === EXIT$8) { + return result + } + } + + if (node.children && result[0] !== SKIP$8) { + subresult = toResult$4(all(node.children, parents.concat(node))); + return subresult[0] === EXIT$8 ? subresult : result + } + + return result + } + + // Visit children in `parent`. + function all(children, parents) { + var min = -1; + var step = reverse ? -1 : 1; + var index = (reverse ? children.length : min) + step; + var result; + + while (index > min && index < children.length) { + result = one(children[index], index, parents); + + if (result[0] === EXIT$8) { + return result + } + + index = typeof result[1] === 'number' ? result[1] : index + step; + } + } +} + +function toResult$4(value) { + if (value !== null && typeof value === 'object' && 'length' in value) { + return value + } + + if (typeof value === 'number') { + return [CONTINUE$8, value] + } + + return [value] +} + +var unistUtilVisit$4 = visit$4; + + + +var CONTINUE$9 = unistUtilVisitParents$4.CONTINUE; +var SKIP$9 = unistUtilVisitParents$4.SKIP; +var EXIT$9 = unistUtilVisitParents$4.EXIT; + +visit$4.CONTINUE = CONTINUE$9; +visit$4.SKIP = SKIP$9; +visit$4.EXIT = EXIT$9; + +function visit$4(tree, test, visitor, reverse) { + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + unistUtilVisitParents$4(tree, test, overload, reverse); + + function overload(node, parents) { + var parent = parents[parents.length - 1]; + var index = parent ? parent.children.indexOf(node) : null; + return visitor(node, index, parent) + } +} + var remarkLintListItemIndent = unifiedLintRule('remark-lint:list-item-indent', listItemIndent); var start$3 = unistUtilPosition.start; var styles = {'tab-size': true, mixed: true, space: true}; -function listItemIndent(tree, file, pref) { +function listItemIndent(tree, file, option) { var contents = String(file); + var preferred = typeof option === 'string' ? option : 'tab-size'; - pref = typeof pref === 'string' ? pref : 'tab-size'; - - if (styles[pref] !== true) { + if (styles[preferred] !== true) { file.fail( - 'Invalid list-item indent style `' + - pref + + 'Incorrect list-item indent style `' + + preferred + "`: use either `'tab-size'`, `'space'`, or `'mixed'`" ); } - unistUtilVisit(tree, 'list', visitor); + unistUtilVisit$4(tree, 'list', visitor); function visitor(node) { var spread = node.spread || node.loose; @@ -42548,28 +43781,30 @@ function listItemIndent(tree, file, pref) { var style; var diff; var reason; + var abs; marker = contents .slice(start$3(item).offset, final.offset) .replace(/\[[x ]?]\s*$/i, ''); - bulletSize = marker.trimRight().length; + bulletSize = marker.replace(/\s+$/, '').length; style = - pref === 'tab-size' || (pref === 'mixed' && spread) + preferred === 'tab-size' || (preferred === 'mixed' && spread) ? Math.ceil(bulletSize / 4) * 4 : bulletSize + 1; if (marker.length !== style) { diff = style - marker.length; + abs = Math.abs(diff); reason = 'Incorrect list-item indent: ' + (diff > 0 ? 'add' : 'remove') + ' ' + - Math.abs(diff) + + abs + ' ' + - plur('space', diff); + pluralize('space', abs); file.message(reason, final); } @@ -42577,1385 +43812,7850 @@ function listItemIndent(tree, file, pref) { } } -var mdastUtilToString = toString$4; +var convert_1$5 = convert$6; -// Get the text content of a node. If the node itself does not expose -// plain-text fields, `toString` will recursivly try its children. -function toString$4(node) { - return ( - valueOf$1(node) || - (node.children && node.children.map(toString$4).join('')) || - '' - ) +function convert$6(test) { + if (typeof test === 'string') { + return typeFactory$5(test) + } + + if (test === null || test === undefined) { + return ok$6 + } + + if (typeof test === 'object') { + return ('length' in test ? anyFactory$5 : matchesFactory$5)(test) + } + + if (typeof test === 'function') { + return test + } + + throw new Error('Expected function, string, or object as test') } -// Get the value of `node`. Checks, `value`, `alt`, and `title`, in that order. -function valueOf$1(node) { - return ( - (node && node.value ? node.value : node.alt ? node.alt : node.title) || '' - ) +function convertAll$5(tests) { + var results = []; + var length = tests.length; + var index = -1; + + while (++index < length) { + results[index] = convert$6(tests[index]); + } + + return results } -var remarkLintNoAutoLinkWithoutProtocol = unifiedLintRule( - 'remark-lint:no-auto-link-without-protocol', - noAutoLinkWithoutProtocol -); +// Utility assert each property in `test` is represented in `node`, and each +// values are strictly equal. +function matchesFactory$5(test) { + return matches -var start$4 = unistUtilPosition.start; -var end$1 = unistUtilPosition.end; + function matches(node) { + var key; -// Protocol expression. -// See: . -var protocol$2 = /^[a-z][a-z+.-]+:\/?/i; + for (key in test) { + if (node[key] !== test[key]) { + return false + } + } -var reason = 'All automatic links must start with a protocol'; + return true + } +} -function noAutoLinkWithoutProtocol(tree, file) { - unistUtilVisit(tree, 'link', visitor); +function anyFactory$5(tests) { + var checks = convertAll$5(tests); + var length = checks.length; - function visitor(node) { - var children; + return matches - if (!unistUtilGenerated(node)) { - children = node.children; + function matches() { + var index = -1; - if ( - start$4(node).column === start$4(children[0]).column - 1 && - end$1(node).column === end$1(children[children.length - 1]).column + 1 && - !protocol$2.test(mdastUtilToString(node)) - ) { - file.message(reason, node); + while (++index < length) { + if (checks[index].apply(this, arguments)) { + return true } } + + return false } } -var remarkLintNoBlockquoteWithoutMarker = unifiedLintRule( - 'remark-lint:no-blockquote-without-marker', - noBlockquoteWithoutMarker -); +// Utility to convert a string into a function which checks a given node’s type +// for said string. +function typeFactory$5(test) { + return type -var reason$1 = 'Missing marker in blockquote'; + function type(node) { + return Boolean(node && node.type === test) + } +} -function noBlockquoteWithoutMarker(tree, file) { - var contents = String(file); - var location = vfileLocation(file); - var last = contents.length; +// Utility to return true. +function ok$6() { + return true +} - unistUtilVisit(tree, 'blockquote', visitor); +var unistUtilVisitParents$5 = visitParents$5; - function visitor(node) { - var indent = node.position && node.position.indent; - var start; - var length; - var index; - var line; - var offset; - var character; - var pos; - if (unistUtilGenerated(node) || !indent || indent.length === 0) { - return - } - start = unistUtilPosition.start(node).line; - length = indent.length; - index = -1; +var CONTINUE$a = true; +var SKIP$a = 'skip'; +var EXIT$a = false; - while (++index < length) { - line = start + index + 1; - pos = {line: line, column: indent[index]}; - offset = location.toOffset(pos) - 1; +visitParents$5.CONTINUE = CONTINUE$a; +visitParents$5.SKIP = SKIP$a; +visitParents$5.EXIT = EXIT$a; - while (++offset < last) { +function visitParents$5(tree, test, visitor, reverse) { + var is; + + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + is = convert_1$5(test); + + one(tree, null, []); + + // Visit a single node. + function one(node, index, parents) { + var result = []; + var subresult; + + if (!test || is(node, index, parents[parents.length - 1] || null)) { + result = toResult$5(visitor(node, parents)); + + if (result[0] === EXIT$a) { + return result + } + } + + if (node.children && result[0] !== SKIP$a) { + subresult = toResult$5(all(node.children, parents.concat(node))); + return subresult[0] === EXIT$a ? subresult : result + } + + return result + } + + // Visit children in `parent`. + function all(children, parents) { + var min = -1; + var step = reverse ? -1 : 1; + var index = (reverse ? children.length : min) + step; + var result; + + while (index > min && index < children.length) { + result = one(children[index], index, parents); + + if (result[0] === EXIT$a) { + return result + } + + index = typeof result[1] === 'number' ? result[1] : index + step; + } + } +} + +function toResult$5(value) { + if (value !== null && typeof value === 'object' && 'length' in value) { + return value + } + + if (typeof value === 'number') { + return [CONTINUE$a, value] + } + + return [value] +} + +var unistUtilVisit$5 = visit$5; + + + +var CONTINUE$b = unistUtilVisitParents$5.CONTINUE; +var SKIP$b = unistUtilVisitParents$5.SKIP; +var EXIT$b = unistUtilVisitParents$5.EXIT; + +visit$5.CONTINUE = CONTINUE$b; +visit$5.SKIP = SKIP$b; +visit$5.EXIT = EXIT$b; + +function visit$5(tree, test, visitor, reverse) { + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + unistUtilVisitParents$5(tree, test, overload, reverse); + + function overload(node, parents) { + var parent = parents[parents.length - 1]; + var index = parent ? parent.children.indexOf(node) : null; + return visitor(node, index, parent) + } +} + +var mdastUtilToString = toString$4; + +// Get the text content of a node. +// Prefer the node’s plain-text fields, otherwise serialize its children, +// and if the given value is an array, serialize the nodes in it. +function toString$4(node) { + return ( + (node && + (node.value || + node.alt || + node.title || + ('children' in node && all$1(node.children)) || + ('length' in node && all$1(node)))) || + '' + ) +} + +function all$1(values) { + var result = []; + var length = values.length; + var index = -1; + + while (++index < length) { + result[index] = toString$4(values[index]); + } + + return result.join('') +} + +var remarkLintNoAutoLinkWithoutProtocol = unifiedLintRule( + 'remark-lint:no-auto-link-without-protocol', + noAutoLinkWithoutProtocol +); + +var start$4 = unistUtilPosition.start; +var end$1 = unistUtilPosition.end; + +// Protocol expression. +// See: . +var protocol$2 = /^[a-z][a-z+.-]+:\/?/i; + +var reason = 'All automatic links must start with a protocol'; + +function noAutoLinkWithoutProtocol(tree, file) { + unistUtilVisit$5(tree, 'link', visitor); + + function visitor(node) { + var children; + + if (!unistUtilGenerated(node)) { + children = node.children; + + if ( + start$4(node).column === start$4(children[0]).column - 1 && + end$1(node).column === end$1(children[children.length - 1]).column + 1 && + !protocol$2.test(mdastUtilToString(node)) + ) { + file.message(reason, node); + } + } + } +} + +var vfileLocation$3 = factory$b; + +function factory$b(file) { + var contents = indices$3(String(file)); + + return { + toPosition: offsetToPositionFactory$3(contents), + toOffset: positionToOffsetFactory$3(contents) + } +} + +// Factory to get the line and column-based `position` for `offset` in the bound +// indices. +function offsetToPositionFactory$3(indices) { + return offsetToPosition + + // Get the line and column-based `position` for `offset` in the bound indices. + function offsetToPosition(offset) { + var index = -1; + var length = indices.length; + + if (offset < 0) { + return {} + } + + while (++index < length) { + if (indices[index] > offset) { + return { + line: index + 1, + column: offset - (indices[index - 1] || 0) + 1, + offset: offset + } + } + } + + return {} + } +} + +// Factory to get the `offset` for a line and column-based `position` in the +// bound indices. +function positionToOffsetFactory$3(indices) { + return positionToOffset + + // Get the `offset` for a line and column-based `position` in the bound + // indices. + function positionToOffset(position) { + var line = position && position.line; + var column = position && position.column; + + if (!isNaN(line) && !isNaN(column) && line - 1 in indices) { + return (indices[line - 2] || 0) + column - 1 || 0 + } + + return -1 + } +} + +// Get indices of line-breaks in `value`. +function indices$3(value) { + var result = []; + var index = value.indexOf('\n'); + + while (index !== -1) { + result.push(index + 1); + index = value.indexOf('\n', index + 1); + } + + result.push(value.length + 1); + + return result +} + +var convert_1$6 = convert$7; + +function convert$7(test) { + if (typeof test === 'string') { + return typeFactory$6(test) + } + + if (test === null || test === undefined) { + return ok$7 + } + + if (typeof test === 'object') { + return ('length' in test ? anyFactory$6 : matchesFactory$6)(test) + } + + if (typeof test === 'function') { + return test + } + + throw new Error('Expected function, string, or object as test') +} + +function convertAll$6(tests) { + var results = []; + var length = tests.length; + var index = -1; + + while (++index < length) { + results[index] = convert$7(tests[index]); + } + + return results +} + +// Utility assert each property in `test` is represented in `node`, and each +// values are strictly equal. +function matchesFactory$6(test) { + return matches + + function matches(node) { + var key; + + for (key in test) { + if (node[key] !== test[key]) { + return false + } + } + + return true + } +} + +function anyFactory$6(tests) { + var checks = convertAll$6(tests); + var length = checks.length; + + return matches + + function matches() { + var index = -1; + + while (++index < length) { + if (checks[index].apply(this, arguments)) { + return true + } + } + + return false + } +} + +// Utility to convert a string into a function which checks a given node’s type +// for said string. +function typeFactory$6(test) { + return type + + function type(node) { + return Boolean(node && node.type === test) + } +} + +// Utility to return true. +function ok$7() { + return true +} + +var unistUtilVisitParents$6 = visitParents$6; + + + +var CONTINUE$c = true; +var SKIP$c = 'skip'; +var EXIT$c = false; + +visitParents$6.CONTINUE = CONTINUE$c; +visitParents$6.SKIP = SKIP$c; +visitParents$6.EXIT = EXIT$c; + +function visitParents$6(tree, test, visitor, reverse) { + var is; + + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + is = convert_1$6(test); + + one(tree, null, []); + + // Visit a single node. + function one(node, index, parents) { + var result = []; + var subresult; + + if (!test || is(node, index, parents[parents.length - 1] || null)) { + result = toResult$6(visitor(node, parents)); + + if (result[0] === EXIT$c) { + return result + } + } + + if (node.children && result[0] !== SKIP$c) { + subresult = toResult$6(all(node.children, parents.concat(node))); + return subresult[0] === EXIT$c ? subresult : result + } + + return result + } + + // Visit children in `parent`. + function all(children, parents) { + var min = -1; + var step = reverse ? -1 : 1; + var index = (reverse ? children.length : min) + step; + var result; + + while (index > min && index < children.length) { + result = one(children[index], index, parents); + + if (result[0] === EXIT$c) { + return result + } + + index = typeof result[1] === 'number' ? result[1] : index + step; + } + } +} + +function toResult$6(value) { + if (value !== null && typeof value === 'object' && 'length' in value) { + return value + } + + if (typeof value === 'number') { + return [CONTINUE$c, value] + } + + return [value] +} + +var unistUtilVisit$6 = visit$6; + + + +var CONTINUE$d = unistUtilVisitParents$6.CONTINUE; +var SKIP$d = unistUtilVisitParents$6.SKIP; +var EXIT$d = unistUtilVisitParents$6.EXIT; + +visit$6.CONTINUE = CONTINUE$d; +visit$6.SKIP = SKIP$d; +visit$6.EXIT = EXIT$d; + +function visit$6(tree, test, visitor, reverse) { + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + unistUtilVisitParents$6(tree, test, overload, reverse); + + function overload(node, parents) { + var parent = parents[parents.length - 1]; + var index = parent ? parent.children.indexOf(node) : null; + return visitor(node, index, parent) + } +} + +var remarkLintNoBlockquoteWithoutMarker = unifiedLintRule( + 'remark-lint:no-blockquote-without-marker', + noBlockquoteWithoutMarker +); + +var reason$1 = 'Missing marker in block quote'; + +function noBlockquoteWithoutMarker(tree, file) { + var contents = String(file); + var location = vfileLocation$3(file); + var last = contents.length; + + unistUtilVisit$6(tree, 'blockquote', visitor); + + function visitor(node) { + var indent = node.position && node.position.indent; + var start; + var length; + var index; + var line; + var offset; + var character; + var pos; + + if (unistUtilGenerated(node) || !indent || indent.length === 0) { + return + } + + start = unistUtilPosition.start(node).line; + length = indent.length; + index = -1; + + while (++index < length) { + line = start + index + 1; + pos = {line: line, column: indent[index]}; + offset = location.toOffset(pos) - 1; + + while (++offset < last) { character = contents.charAt(offset); - if (character === '>') { - break - } + if (character === '>') { + break + } + + /* istanbul ignore else - just for safety */ + if (character !== ' ' && character !== '\t') { + file.message(reason$1, pos); + break + } + } + } + } +} + +var convert_1$7 = convert$8; + +function convert$8(test) { + if (typeof test === 'string') { + return typeFactory$7(test) + } + + if (test === null || test === undefined) { + return ok$8 + } + + if (typeof test === 'object') { + return ('length' in test ? anyFactory$7 : matchesFactory$7)(test) + } + + if (typeof test === 'function') { + return test + } + + throw new Error('Expected function, string, or object as test') +} + +function convertAll$7(tests) { + var results = []; + var length = tests.length; + var index = -1; + + while (++index < length) { + results[index] = convert$8(tests[index]); + } + + return results +} + +// Utility assert each property in `test` is represented in `node`, and each +// values are strictly equal. +function matchesFactory$7(test) { + return matches + + function matches(node) { + var key; + + for (key in test) { + if (node[key] !== test[key]) { + return false + } + } + + return true + } +} + +function anyFactory$7(tests) { + var checks = convertAll$7(tests); + var length = checks.length; + + return matches + + function matches() { + var index = -1; + + while (++index < length) { + if (checks[index].apply(this, arguments)) { + return true + } + } + + return false + } +} + +// Utility to convert a string into a function which checks a given node’s type +// for said string. +function typeFactory$7(test) { + return type + + function type(node) { + return Boolean(node && node.type === test) + } +} + +// Utility to return true. +function ok$8() { + return true +} + +var unistUtilVisitParents$7 = visitParents$7; + + + +var CONTINUE$e = true; +var SKIP$e = 'skip'; +var EXIT$e = false; + +visitParents$7.CONTINUE = CONTINUE$e; +visitParents$7.SKIP = SKIP$e; +visitParents$7.EXIT = EXIT$e; + +function visitParents$7(tree, test, visitor, reverse) { + var is; + + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + is = convert_1$7(test); + + one(tree, null, []); + + // Visit a single node. + function one(node, index, parents) { + var result = []; + var subresult; + + if (!test || is(node, index, parents[parents.length - 1] || null)) { + result = toResult$7(visitor(node, parents)); + + if (result[0] === EXIT$e) { + return result + } + } + + if (node.children && result[0] !== SKIP$e) { + subresult = toResult$7(all(node.children, parents.concat(node))); + return subresult[0] === EXIT$e ? subresult : result + } + + return result + } + + // Visit children in `parent`. + function all(children, parents) { + var min = -1; + var step = reverse ? -1 : 1; + var index = (reverse ? children.length : min) + step; + var result; + + while (index > min && index < children.length) { + result = one(children[index], index, parents); + + if (result[0] === EXIT$e) { + return result + } + + index = typeof result[1] === 'number' ? result[1] : index + step; + } + } +} + +function toResult$7(value) { + if (value !== null && typeof value === 'object' && 'length' in value) { + return value + } + + if (typeof value === 'number') { + return [CONTINUE$e, value] + } + + return [value] +} + +var unistUtilVisit$7 = visit$7; + + + +var CONTINUE$f = unistUtilVisitParents$7.CONTINUE; +var SKIP$f = unistUtilVisitParents$7.SKIP; +var EXIT$f = unistUtilVisitParents$7.EXIT; + +visit$7.CONTINUE = CONTINUE$f; +visit$7.SKIP = SKIP$f; +visit$7.EXIT = EXIT$f; + +function visit$7(tree, test, visitor, reverse) { + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + unistUtilVisitParents$7(tree, test, overload, reverse); + + function overload(node, parents) { + var parent = parents[parents.length - 1]; + var index = parent ? parent.children.indexOf(node) : null; + return visitor(node, index, parent) + } +} + +var remarkLintNoLiteralUrls = unifiedLintRule('remark-lint:no-literal-urls', noLiteralURLs); + +var start$5 = unistUtilPosition.start; +var end$2 = unistUtilPosition.end; +var mailto$3 = 'mailto:'; +var reason$2 = 'Don’t use literal URLs without angle brackets'; + +function noLiteralURLs(tree, file) { + unistUtilVisit$7(tree, 'link', visitor); + + function visitor(node) { + var children = node.children; + var value = mdastUtilToString(node); + + if ( + !unistUtilGenerated(node) && + start$5(node).column === start$5(children[0]).column && + end$2(node).column === end$2(children[children.length - 1]).column && + (node.url === mailto$3 + value || node.url === value) + ) { + file.message(reason$2, node); + } + } +} + +var convert_1$8 = convert$9; + +function convert$9(test) { + if (typeof test === 'string') { + return typeFactory$8(test) + } + + if (test === null || test === undefined) { + return ok$9 + } + + if (typeof test === 'object') { + return ('length' in test ? anyFactory$8 : matchesFactory$8)(test) + } + + if (typeof test === 'function') { + return test + } + + throw new Error('Expected function, string, or object as test') +} + +function convertAll$8(tests) { + var results = []; + var length = tests.length; + var index = -1; + + while (++index < length) { + results[index] = convert$9(tests[index]); + } + + return results +} + +// Utility assert each property in `test` is represented in `node`, and each +// values are strictly equal. +function matchesFactory$8(test) { + return matches + + function matches(node) { + var key; + + for (key in test) { + if (node[key] !== test[key]) { + return false + } + } + + return true + } +} + +function anyFactory$8(tests) { + var checks = convertAll$8(tests); + var length = checks.length; + + return matches + + function matches() { + var index = -1; + + while (++index < length) { + if (checks[index].apply(this, arguments)) { + return true + } + } + + return false + } +} + +// Utility to convert a string into a function which checks a given node’s type +// for said string. +function typeFactory$8(test) { + return type + + function type(node) { + return Boolean(node && node.type === test) + } +} + +// Utility to return true. +function ok$9() { + return true +} + +var unistUtilVisitParents$8 = visitParents$8; + + + +var CONTINUE$g = true; +var SKIP$g = 'skip'; +var EXIT$g = false; + +visitParents$8.CONTINUE = CONTINUE$g; +visitParents$8.SKIP = SKIP$g; +visitParents$8.EXIT = EXIT$g; + +function visitParents$8(tree, test, visitor, reverse) { + var is; + + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + is = convert_1$8(test); + + one(tree, null, []); + + // Visit a single node. + function one(node, index, parents) { + var result = []; + var subresult; + + if (!test || is(node, index, parents[parents.length - 1] || null)) { + result = toResult$8(visitor(node, parents)); + + if (result[0] === EXIT$g) { + return result + } + } + + if (node.children && result[0] !== SKIP$g) { + subresult = toResult$8(all(node.children, parents.concat(node))); + return subresult[0] === EXIT$g ? subresult : result + } + + return result + } + + // Visit children in `parent`. + function all(children, parents) { + var min = -1; + var step = reverse ? -1 : 1; + var index = (reverse ? children.length : min) + step; + var result; + + while (index > min && index < children.length) { + result = one(children[index], index, parents); + + if (result[0] === EXIT$g) { + return result + } + + index = typeof result[1] === 'number' ? result[1] : index + step; + } + } +} + +function toResult$8(value) { + if (value !== null && typeof value === 'object' && 'length' in value) { + return value + } + + if (typeof value === 'number') { + return [CONTINUE$g, value] + } + + return [value] +} + +var unistUtilVisit$8 = visit$8; + + + +var CONTINUE$h = unistUtilVisitParents$8.CONTINUE; +var SKIP$h = unistUtilVisitParents$8.SKIP; +var EXIT$h = unistUtilVisitParents$8.EXIT; + +visit$8.CONTINUE = CONTINUE$h; +visit$8.SKIP = SKIP$h; +visit$8.EXIT = EXIT$h; + +function visit$8(tree, test, visitor, reverse) { + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + unistUtilVisitParents$8(tree, test, overload, reverse); + + function overload(node, parents) { + var parent = parents[parents.length - 1]; + var index = parent ? parent.children.indexOf(node) : null; + return visitor(node, index, parent) + } +} + +var remarkLintOrderedListMarkerStyle = unifiedLintRule( + 'remark-lint:ordered-list-marker-style', + orderedListMarkerStyle +); + +var start$6 = unistUtilPosition.start; + +var styles$1 = { + ')': true, + '.': true, + null: true +}; + +function orderedListMarkerStyle(tree, file, option) { + var contents = String(file); + var preferred = + typeof option !== 'string' || option === 'consistent' ? null : option; + + if (styles$1[preferred] !== true) { + file.fail( + 'Incorrect ordered list item marker style `' + + preferred + + "`: use either `'.'` or `')'`" + ); + } + + unistUtilVisit$8(tree, 'list', visitor); + + function visitor(node) { + var children = node.children; + var length = node.ordered ? children.length : 0; + var index = -1; + var marker; + var child; + + while (++index < length) { + child = children[index]; + + if (!unistUtilGenerated(child)) { + marker = contents + .slice(start$6(child).offset, start$6(child.children[0]).offset) + .replace(/\s|\d/g, '') + .replace(/\[[x ]?]\s*$/i, ''); + + if (preferred) { + if (marker !== preferred) { + file.message('Marker style should be `' + preferred + '`', child); + } + } else { + preferred = marker; + } + } + } + } +} + +var convert_1$9 = convert$a; + +function convert$a(test) { + if (typeof test === 'string') { + return typeFactory$9(test) + } + + if (test === null || test === undefined) { + return ok$a + } + + if (typeof test === 'object') { + return ('length' in test ? anyFactory$9 : matchesFactory$9)(test) + } + + if (typeof test === 'function') { + return test + } + + throw new Error('Expected function, string, or object as test') +} + +function convertAll$9(tests) { + var results = []; + var length = tests.length; + var index = -1; + + while (++index < length) { + results[index] = convert$a(tests[index]); + } + + return results +} + +// Utility assert each property in `test` is represented in `node`, and each +// values are strictly equal. +function matchesFactory$9(test) { + return matches + + function matches(node) { + var key; + + for (key in test) { + if (node[key] !== test[key]) { + return false + } + } + + return true + } +} + +function anyFactory$9(tests) { + var checks = convertAll$9(tests); + var length = checks.length; + + return matches + + function matches() { + var index = -1; + + while (++index < length) { + if (checks[index].apply(this, arguments)) { + return true + } + } + + return false + } +} + +// Utility to convert a string into a function which checks a given node’s type +// for said string. +function typeFactory$9(test) { + return type + + function type(node) { + return Boolean(node && node.type === test) + } +} + +// Utility to return true. +function ok$a() { + return true +} + +var unistUtilVisitParents$9 = visitParents$9; + + + +var CONTINUE$i = true; +var SKIP$i = 'skip'; +var EXIT$i = false; + +visitParents$9.CONTINUE = CONTINUE$i; +visitParents$9.SKIP = SKIP$i; +visitParents$9.EXIT = EXIT$i; + +function visitParents$9(tree, test, visitor, reverse) { + var is; + + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + is = convert_1$9(test); + + one(tree, null, []); + + // Visit a single node. + function one(node, index, parents) { + var result = []; + var subresult; + + if (!test || is(node, index, parents[parents.length - 1] || null)) { + result = toResult$9(visitor(node, parents)); + + if (result[0] === EXIT$i) { + return result + } + } + + if (node.children && result[0] !== SKIP$i) { + subresult = toResult$9(all(node.children, parents.concat(node))); + return subresult[0] === EXIT$i ? subresult : result + } + + return result + } + + // Visit children in `parent`. + function all(children, parents) { + var min = -1; + var step = reverse ? -1 : 1; + var index = (reverse ? children.length : min) + step; + var result; + + while (index > min && index < children.length) { + result = one(children[index], index, parents); + + if (result[0] === EXIT$i) { + return result + } + + index = typeof result[1] === 'number' ? result[1] : index + step; + } + } +} + +function toResult$9(value) { + if (value !== null && typeof value === 'object' && 'length' in value) { + return value + } + + if (typeof value === 'number') { + return [CONTINUE$i, value] + } + + return [value] +} + +var unistUtilVisit$9 = visit$9; + + + +var CONTINUE$j = unistUtilVisitParents$9.CONTINUE; +var SKIP$j = unistUtilVisitParents$9.SKIP; +var EXIT$j = unistUtilVisitParents$9.EXIT; + +visit$9.CONTINUE = CONTINUE$j; +visit$9.SKIP = SKIP$j; +visit$9.EXIT = EXIT$j; + +function visit$9(tree, test, visitor, reverse) { + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + unistUtilVisitParents$9(tree, test, overload, reverse); + + function overload(node, parents) { + var parent = parents[parents.length - 1]; + var index = parent ? parent.children.indexOf(node) : null; + return visitor(node, index, parent) + } +} + +var remarkLintHardBreakSpaces = unifiedLintRule('remark-lint:hard-break-spaces', hardBreakSpaces); + +var reason$3 = 'Use two spaces for hard line breaks'; + +function hardBreakSpaces(tree, file) { + var contents = String(file); + + unistUtilVisit$9(tree, 'break', visitor); + + function visitor(node) { + var value; + + if (!unistUtilGenerated(node)) { + value = contents + .slice(unistUtilPosition.start(node).offset, unistUtilPosition.end(node).offset) + .split('\n', 1)[0] + .replace(/\r$/, ''); + + if (value.length > 2) { + file.message(reason$3, node); + } + } + } +} + +var convert_1$a = convert$b; + +function convert$b(test) { + if (typeof test === 'string') { + return typeFactory$a(test) + } + + if (test === null || test === undefined) { + return ok$b + } + + if (typeof test === 'object') { + return ('length' in test ? anyFactory$a : matchesFactory$a)(test) + } + + if (typeof test === 'function') { + return test + } + + throw new Error('Expected function, string, or object as test') +} + +function convertAll$a(tests) { + var results = []; + var length = tests.length; + var index = -1; + + while (++index < length) { + results[index] = convert$b(tests[index]); + } + + return results +} + +// Utility assert each property in `test` is represented in `node`, and each +// values are strictly equal. +function matchesFactory$a(test) { + return matches + + function matches(node) { + var key; + + for (key in test) { + if (node[key] !== test[key]) { + return false + } + } + + return true + } +} + +function anyFactory$a(tests) { + var checks = convertAll$a(tests); + var length = checks.length; + + return matches + + function matches() { + var index = -1; + + while (++index < length) { + if (checks[index].apply(this, arguments)) { + return true + } + } + + return false + } +} + +// Utility to convert a string into a function which checks a given node’s type +// for said string. +function typeFactory$a(test) { + return type + + function type(node) { + return Boolean(node && node.type === test) + } +} + +// Utility to return true. +function ok$b() { + return true +} + +var unistUtilVisitParents$a = visitParents$a; + + + +var CONTINUE$k = true; +var SKIP$k = 'skip'; +var EXIT$k = false; + +visitParents$a.CONTINUE = CONTINUE$k; +visitParents$a.SKIP = SKIP$k; +visitParents$a.EXIT = EXIT$k; + +function visitParents$a(tree, test, visitor, reverse) { + var is; + + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + is = convert_1$a(test); + + one(tree, null, []); + + // Visit a single node. + function one(node, index, parents) { + var result = []; + var subresult; + + if (!test || is(node, index, parents[parents.length - 1] || null)) { + result = toResult$a(visitor(node, parents)); + + if (result[0] === EXIT$k) { + return result + } + } + + if (node.children && result[0] !== SKIP$k) { + subresult = toResult$a(all(node.children, parents.concat(node))); + return subresult[0] === EXIT$k ? subresult : result + } + + return result + } + + // Visit children in `parent`. + function all(children, parents) { + var min = -1; + var step = reverse ? -1 : 1; + var index = (reverse ? children.length : min) + step; + var result; + + while (index > min && index < children.length) { + result = one(children[index], index, parents); + + if (result[0] === EXIT$k) { + return result + } + + index = typeof result[1] === 'number' ? result[1] : index + step; + } + } +} + +function toResult$a(value) { + if (value !== null && typeof value === 'object' && 'length' in value) { + return value + } + + if (typeof value === 'number') { + return [CONTINUE$k, value] + } + + return [value] +} + +var unistUtilVisit$a = visit$a; + + + +var CONTINUE$l = unistUtilVisitParents$a.CONTINUE; +var SKIP$l = unistUtilVisitParents$a.SKIP; +var EXIT$l = unistUtilVisitParents$a.EXIT; + +visit$a.CONTINUE = CONTINUE$l; +visit$a.SKIP = SKIP$l; +visit$a.EXIT = EXIT$l; + +function visit$a(tree, test, visitor, reverse) { + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + unistUtilVisitParents$a(tree, test, overload, reverse); + + function overload(node, parents) { + var parent = parents[parents.length - 1]; + var index = parent ? parent.children.indexOf(node) : null; + return visitor(node, index, parent) + } +} + +var remarkLintNoDuplicateDefinitions = unifiedLintRule( + 'remark-lint:no-duplicate-definitions', + noDuplicateDefinitions +); + +var reason$4 = 'Do not use definitions with the same identifier'; + +function noDuplicateDefinitions(tree, file) { + var map = {}; + + unistUtilVisit$a(tree, ['definition', 'footnoteDefinition'], check); + + function check(node) { + var identifier; + var duplicate; + + if (!unistUtilGenerated(node)) { + identifier = node.identifier; + duplicate = map[identifier]; + + if (duplicate && duplicate.type) { + file.message( + reason$4 + ' (' + unistUtilStringifyPosition(unistUtilPosition.start(duplicate)) + ')', + node + ); + } + + map[identifier] = node; + } + } +} + +var convert_1$b = convert$c; + +function convert$c(test) { + if (typeof test === 'string') { + return typeFactory$b(test) + } + + if (test === null || test === undefined) { + return ok$c + } + + if (typeof test === 'object') { + return ('length' in test ? anyFactory$b : matchesFactory$b)(test) + } + + if (typeof test === 'function') { + return test + } + + throw new Error('Expected function, string, or object as test') +} + +function convertAll$b(tests) { + var results = []; + var length = tests.length; + var index = -1; + + while (++index < length) { + results[index] = convert$c(tests[index]); + } + + return results +} + +// Utility assert each property in `test` is represented in `node`, and each +// values are strictly equal. +function matchesFactory$b(test) { + return matches + + function matches(node) { + var key; + + for (key in test) { + if (node[key] !== test[key]) { + return false + } + } + + return true + } +} + +function anyFactory$b(tests) { + var checks = convertAll$b(tests); + var length = checks.length; + + return matches + + function matches() { + var index = -1; + + while (++index < length) { + if (checks[index].apply(this, arguments)) { + return true + } + } + + return false + } +} + +// Utility to convert a string into a function which checks a given node’s type +// for said string. +function typeFactory$b(test) { + return type + + function type(node) { + return Boolean(node && node.type === test) + } +} + +// Utility to return true. +function ok$c() { + return true +} + +var unistUtilVisitParents$b = visitParents$b; + + + +var CONTINUE$m = true; +var SKIP$m = 'skip'; +var EXIT$m = false; + +visitParents$b.CONTINUE = CONTINUE$m; +visitParents$b.SKIP = SKIP$m; +visitParents$b.EXIT = EXIT$m; + +function visitParents$b(tree, test, visitor, reverse) { + var is; + + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + is = convert_1$b(test); + + one(tree, null, []); + + // Visit a single node. + function one(node, index, parents) { + var result = []; + var subresult; + + if (!test || is(node, index, parents[parents.length - 1] || null)) { + result = toResult$b(visitor(node, parents)); + + if (result[0] === EXIT$m) { + return result + } + } + + if (node.children && result[0] !== SKIP$m) { + subresult = toResult$b(all(node.children, parents.concat(node))); + return subresult[0] === EXIT$m ? subresult : result + } + + return result + } + + // Visit children in `parent`. + function all(children, parents) { + var min = -1; + var step = reverse ? -1 : 1; + var index = (reverse ? children.length : min) + step; + var result; + + while (index > min && index < children.length) { + result = one(children[index], index, parents); + + if (result[0] === EXIT$m) { + return result + } + + index = typeof result[1] === 'number' ? result[1] : index + step; + } + } +} + +function toResult$b(value) { + if (value !== null && typeof value === 'object' && 'length' in value) { + return value + } + + if (typeof value === 'number') { + return [CONTINUE$m, value] + } + + return [value] +} + +var unistUtilVisit$b = visit$b; + + + +var CONTINUE$n = unistUtilVisitParents$b.CONTINUE; +var SKIP$n = unistUtilVisitParents$b.SKIP; +var EXIT$n = unistUtilVisitParents$b.EXIT; + +visit$b.CONTINUE = CONTINUE$n; +visit$b.SKIP = SKIP$n; +visit$b.EXIT = EXIT$n; + +function visit$b(tree, test, visitor, reverse) { + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + unistUtilVisitParents$b(tree, test, overload, reverse); + + function overload(node, parents) { + var parent = parents[parents.length - 1]; + var index = parent ? parent.children.indexOf(node) : null; + return visitor(node, index, parent) + } +} + +var mdastUtilHeadingStyle = style; + +function style(node, relative) { + var last = node.children[node.children.length - 1]; + var depth = node.depth; + var pos = node && node.position && node.position.end; + var final = last && last.position && last.position.end; + + if (!pos) { + return null + } + + // This can only occur for `'atx'` and `'atx-closed'` headings. + // This might incorrectly match `'atx'` headings with lots of trailing white + // space as an `'atx-closed'` heading. + if (!last) { + if (pos.column - 1 <= depth * 2) { + return consolidate(depth, relative) + } + + return 'atx-closed' + } + + if (final.line + 1 === pos.line) { + return 'setext' + } + + if (final.column + depth < pos.column) { + return 'atx-closed' + } + + return consolidate(depth, relative) +} + +// Get the probable style of an atx-heading, depending on preferred style. +function consolidate(depth, relative) { + return depth < 3 + ? 'atx' + : relative === 'atx' || relative === 'setext' + ? relative + : null +} + +var remarkLintNoHeadingContentIndent = unifiedLintRule( + 'remark-lint:no-heading-content-indent', + noHeadingContentIndent +); + +var start$7 = unistUtilPosition.start; +var end$3 = unistUtilPosition.end; + +function noHeadingContentIndent(tree, file) { + var contents = String(file); + + unistUtilVisit$b(tree, 'heading', visitor); + + function visitor(node) { + var depth; + var children; + var type; + var head; + var initial; + var final; + var diff; + var index; + var char; + var reason; + var abs; + + if (unistUtilGenerated(node)) { + return + } + + depth = node.depth; + children = node.children; + type = mdastUtilHeadingStyle(node, 'atx'); + + if (type === 'atx' || type === 'atx-closed') { + initial = start$7(node); + index = initial.offset; + char = contents.charAt(index); + + while (char && char !== '#') { + char = contents.charAt(++index); + } + + /* istanbul ignore if - CR/LF bug: remarkjs/remark#195. */ + if (!char) { + return + } + + index = depth + (index - initial.offset); + head = start$7(children[0]).column; + + // Ignore empty headings. + if (!head) { + return + } + + diff = head - initial.column - 1 - index; + + if (diff) { + abs = Math.abs(diff); + + reason = + (diff > 0 ? 'Remove' : 'Add') + + ' ' + + abs + + ' ' + + pluralize('space', abs) + + ' before this heading’s content'; + + file.message(reason, start$7(children[0])); + } + } + + // Closed ATX headings always must have a space between their content and + // the final hashes, thus, there is no `add x spaces`. + if (type === 'atx-closed') { + final = end$3(children[children.length - 1]); + diff = end$3(node).column - final.column - 1 - depth; + + if (diff) { + reason = + 'Remove ' + + diff + + ' ' + + pluralize('space', diff) + + ' after this heading’s content'; + + file.message(reason, final); + } + } + } +} + +var convert_1$c = convert$d; + +function convert$d(test) { + if (typeof test === 'string') { + return typeFactory$c(test) + } + + if (test === null || test === undefined) { + return ok$d + } + + if (typeof test === 'object') { + return ('length' in test ? anyFactory$c : matchesFactory$c)(test) + } + + if (typeof test === 'function') { + return test + } + + throw new Error('Expected function, string, or object as test') +} + +function convertAll$c(tests) { + var results = []; + var length = tests.length; + var index = -1; + + while (++index < length) { + results[index] = convert$d(tests[index]); + } + + return results +} + +// Utility assert each property in `test` is represented in `node`, and each +// values are strictly equal. +function matchesFactory$c(test) { + return matches + + function matches(node) { + var key; + + for (key in test) { + if (node[key] !== test[key]) { + return false + } + } + + return true + } +} + +function anyFactory$c(tests) { + var checks = convertAll$c(tests); + var length = checks.length; + + return matches + + function matches() { + var index = -1; + + while (++index < length) { + if (checks[index].apply(this, arguments)) { + return true + } + } + + return false + } +} + +// Utility to convert a string into a function which checks a given node’s type +// for said string. +function typeFactory$c(test) { + return type + + function type(node) { + return Boolean(node && node.type === test) + } +} + +// Utility to return true. +function ok$d() { + return true +} + +var unistUtilVisitParents$c = visitParents$c; + + + +var CONTINUE$o = true; +var SKIP$o = 'skip'; +var EXIT$o = false; + +visitParents$c.CONTINUE = CONTINUE$o; +visitParents$c.SKIP = SKIP$o; +visitParents$c.EXIT = EXIT$o; + +function visitParents$c(tree, test, visitor, reverse) { + var is; + + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + is = convert_1$c(test); + + one(tree, null, []); + + // Visit a single node. + function one(node, index, parents) { + var result = []; + var subresult; + + if (!test || is(node, index, parents[parents.length - 1] || null)) { + result = toResult$c(visitor(node, parents)); + + if (result[0] === EXIT$o) { + return result + } + } + + if (node.children && result[0] !== SKIP$o) { + subresult = toResult$c(all(node.children, parents.concat(node))); + return subresult[0] === EXIT$o ? subresult : result + } + + return result + } + + // Visit children in `parent`. + function all(children, parents) { + var min = -1; + var step = reverse ? -1 : 1; + var index = (reverse ? children.length : min) + step; + var result; + + while (index > min && index < children.length) { + result = one(children[index], index, parents); + + if (result[0] === EXIT$o) { + return result + } + + index = typeof result[1] === 'number' ? result[1] : index + step; + } + } +} + +function toResult$c(value) { + if (value !== null && typeof value === 'object' && 'length' in value) { + return value + } + + if (typeof value === 'number') { + return [CONTINUE$o, value] + } + + return [value] +} + +var unistUtilVisit$c = visit$c; + + + +var CONTINUE$p = unistUtilVisitParents$c.CONTINUE; +var SKIP$p = unistUtilVisitParents$c.SKIP; +var EXIT$p = unistUtilVisitParents$c.EXIT; + +visit$c.CONTINUE = CONTINUE$p; +visit$c.SKIP = SKIP$p; +visit$c.EXIT = EXIT$p; + +function visit$c(tree, test, visitor, reverse) { + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + unistUtilVisitParents$c(tree, test, overload, reverse); + + function overload(node, parents) { + var parent = parents[parents.length - 1]; + var index = parent ? parent.children.indexOf(node) : null; + return visitor(node, index, parent) + } +} + +var remarkLintNoInlinePadding = unifiedLintRule('remark-lint:no-inline-padding', noInlinePadding); + +function noInlinePadding(tree, file) { + unistUtilVisit$c(tree, ['emphasis', 'strong', 'delete', 'image', 'link'], visitor); + + function visitor(node) { + var contents; + + if (!unistUtilGenerated(node)) { + contents = mdastUtilToString(node); + + if ( + contents.charAt(0) === ' ' || + contents.charAt(contents.length - 1) === ' ' + ) { + file.message('Don’t pad `' + node.type + '` with inner spaces', node); + } + } + } +} + +var convert_1$d = convert$e; + +function convert$e(test) { + if (typeof test === 'string') { + return typeFactory$d(test) + } + + if (test === null || test === undefined) { + return ok$e + } + + if (typeof test === 'object') { + return ('length' in test ? anyFactory$d : matchesFactory$d)(test) + } + + if (typeof test === 'function') { + return test + } + + throw new Error('Expected function, string, or object as test') +} + +function convertAll$d(tests) { + var results = []; + var length = tests.length; + var index = -1; + + while (++index < length) { + results[index] = convert$e(tests[index]); + } + + return results +} + +// Utility assert each property in `test` is represented in `node`, and each +// values are strictly equal. +function matchesFactory$d(test) { + return matches + + function matches(node) { + var key; + + for (key in test) { + if (node[key] !== test[key]) { + return false + } + } + + return true + } +} + +function anyFactory$d(tests) { + var checks = convertAll$d(tests); + var length = checks.length; + + return matches + + function matches() { + var index = -1; + + while (++index < length) { + if (checks[index].apply(this, arguments)) { + return true + } + } + + return false + } +} + +// Utility to convert a string into a function which checks a given node’s type +// for said string. +function typeFactory$d(test) { + return type + + function type(node) { + return Boolean(node && node.type === test) + } +} + +// Utility to return true. +function ok$e() { + return true +} + +var unistUtilVisitParents$d = visitParents$d; + + + +var CONTINUE$q = true; +var SKIP$q = 'skip'; +var EXIT$q = false; + +visitParents$d.CONTINUE = CONTINUE$q; +visitParents$d.SKIP = SKIP$q; +visitParents$d.EXIT = EXIT$q; + +function visitParents$d(tree, test, visitor, reverse) { + var is; + + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + is = convert_1$d(test); + + one(tree, null, []); + + // Visit a single node. + function one(node, index, parents) { + var result = []; + var subresult; + + if (!test || is(node, index, parents[parents.length - 1] || null)) { + result = toResult$d(visitor(node, parents)); + + if (result[0] === EXIT$q) { + return result + } + } + + if (node.children && result[0] !== SKIP$q) { + subresult = toResult$d(all(node.children, parents.concat(node))); + return subresult[0] === EXIT$q ? subresult : result + } + + return result + } + + // Visit children in `parent`. + function all(children, parents) { + var min = -1; + var step = reverse ? -1 : 1; + var index = (reverse ? children.length : min) + step; + var result; + + while (index > min && index < children.length) { + result = one(children[index], index, parents); + + if (result[0] === EXIT$q) { + return result + } + + index = typeof result[1] === 'number' ? result[1] : index + step; + } + } +} + +function toResult$d(value) { + if (value !== null && typeof value === 'object' && 'length' in value) { + return value + } + + if (typeof value === 'number') { + return [CONTINUE$q, value] + } + + return [value] +} + +var unistUtilVisit$d = visit$d; + + + +var CONTINUE$r = unistUtilVisitParents$d.CONTINUE; +var SKIP$r = unistUtilVisitParents$d.SKIP; +var EXIT$r = unistUtilVisitParents$d.EXIT; + +visit$d.CONTINUE = CONTINUE$r; +visit$d.SKIP = SKIP$r; +visit$d.EXIT = EXIT$r; + +function visit$d(tree, test, visitor, reverse) { + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + unistUtilVisitParents$d(tree, test, overload, reverse); + + function overload(node, parents) { + var parent = parents[parents.length - 1]; + var index = parent ? parent.children.indexOf(node) : null; + return visitor(node, index, parent) + } +} + +var remarkLintNoShortcutReferenceImage = unifiedLintRule( + 'remark-lint:no-shortcut-reference-image', + noShortcutReferenceImage +); + +var reason$5 = 'Use the trailing [] on reference images'; + +function noShortcutReferenceImage(tree, file) { + unistUtilVisit$d(tree, 'imageReference', visitor); + + function visitor(node) { + if (!unistUtilGenerated(node) && node.referenceType === 'shortcut') { + file.message(reason$5, node); + } + } +} + +var convert_1$e = convert$f; + +function convert$f(test) { + if (typeof test === 'string') { + return typeFactory$e(test) + } + + if (test === null || test === undefined) { + return ok$f + } + + if (typeof test === 'object') { + return ('length' in test ? anyFactory$e : matchesFactory$e)(test) + } + + if (typeof test === 'function') { + return test + } + + throw new Error('Expected function, string, or object as test') +} + +function convertAll$e(tests) { + var results = []; + var length = tests.length; + var index = -1; + + while (++index < length) { + results[index] = convert$f(tests[index]); + } + + return results +} + +// Utility assert each property in `test` is represented in `node`, and each +// values are strictly equal. +function matchesFactory$e(test) { + return matches + + function matches(node) { + var key; + + for (key in test) { + if (node[key] !== test[key]) { + return false + } + } + + return true + } +} + +function anyFactory$e(tests) { + var checks = convertAll$e(tests); + var length = checks.length; + + return matches + + function matches() { + var index = -1; + + while (++index < length) { + if (checks[index].apply(this, arguments)) { + return true + } + } + + return false + } +} + +// Utility to convert a string into a function which checks a given node’s type +// for said string. +function typeFactory$e(test) { + return type + + function type(node) { + return Boolean(node && node.type === test) + } +} + +// Utility to return true. +function ok$f() { + return true +} + +var unistUtilVisitParents$e = visitParents$e; + + + +var CONTINUE$s = true; +var SKIP$s = 'skip'; +var EXIT$s = false; + +visitParents$e.CONTINUE = CONTINUE$s; +visitParents$e.SKIP = SKIP$s; +visitParents$e.EXIT = EXIT$s; + +function visitParents$e(tree, test, visitor, reverse) { + var is; + + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + is = convert_1$e(test); + + one(tree, null, []); + + // Visit a single node. + function one(node, index, parents) { + var result = []; + var subresult; + + if (!test || is(node, index, parents[parents.length - 1] || null)) { + result = toResult$e(visitor(node, parents)); + + if (result[0] === EXIT$s) { + return result + } + } + + if (node.children && result[0] !== SKIP$s) { + subresult = toResult$e(all(node.children, parents.concat(node))); + return subresult[0] === EXIT$s ? subresult : result + } + + return result + } + + // Visit children in `parent`. + function all(children, parents) { + var min = -1; + var step = reverse ? -1 : 1; + var index = (reverse ? children.length : min) + step; + var result; + + while (index > min && index < children.length) { + result = one(children[index], index, parents); + + if (result[0] === EXIT$s) { + return result + } + + index = typeof result[1] === 'number' ? result[1] : index + step; + } + } +} + +function toResult$e(value) { + if (value !== null && typeof value === 'object' && 'length' in value) { + return value + } + + if (typeof value === 'number') { + return [CONTINUE$s, value] + } + + return [value] +} + +var unistUtilVisit$e = visit$e; + + + +var CONTINUE$t = unistUtilVisitParents$e.CONTINUE; +var SKIP$t = unistUtilVisitParents$e.SKIP; +var EXIT$t = unistUtilVisitParents$e.EXIT; + +visit$e.CONTINUE = CONTINUE$t; +visit$e.SKIP = SKIP$t; +visit$e.EXIT = EXIT$t; + +function visit$e(tree, test, visitor, reverse) { + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + unistUtilVisitParents$e(tree, test, overload, reverse); + + function overload(node, parents) { + var parent = parents[parents.length - 1]; + var index = parent ? parent.children.indexOf(node) : null; + return visitor(node, index, parent) + } +} + +var remarkLintNoShortcutReferenceLink = unifiedLintRule( + 'remark-lint:no-shortcut-reference-link', + noShortcutReferenceLink +); + +var reason$6 = 'Use the trailing `[]` on reference links'; + +function noShortcutReferenceLink(tree, file) { + unistUtilVisit$e(tree, 'linkReference', visitor); + + function visitor(node) { + if (!unistUtilGenerated(node) && node.referenceType === 'shortcut') { + file.message(reason$6, node); + } + } +} + +var convert_1$f = convert$g; + +function convert$g(test) { + if (typeof test === 'string') { + return typeFactory$f(test) + } + + if (test === null || test === undefined) { + return ok$g + } + + if (typeof test === 'object') { + return ('length' in test ? anyFactory$f : matchesFactory$f)(test) + } + + if (typeof test === 'function') { + return test + } + + throw new Error('Expected function, string, or object as test') +} + +function convertAll$f(tests) { + var results = []; + var length = tests.length; + var index = -1; + + while (++index < length) { + results[index] = convert$g(tests[index]); + } + + return results +} + +// Utility assert each property in `test` is represented in `node`, and each +// values are strictly equal. +function matchesFactory$f(test) { + return matches + + function matches(node) { + var key; + + for (key in test) { + if (node[key] !== test[key]) { + return false + } + } + + return true + } +} + +function anyFactory$f(tests) { + var checks = convertAll$f(tests); + var length = checks.length; + + return matches + + function matches() { + var index = -1; + + while (++index < length) { + if (checks[index].apply(this, arguments)) { + return true + } + } + + return false + } +} + +// Utility to convert a string into a function which checks a given node’s type +// for said string. +function typeFactory$f(test) { + return type + + function type(node) { + return Boolean(node && node.type === test) + } +} + +// Utility to return true. +function ok$g() { + return true +} + +var unistUtilVisitParents$f = visitParents$f; + + + +var CONTINUE$u = true; +var SKIP$u = 'skip'; +var EXIT$u = false; + +visitParents$f.CONTINUE = CONTINUE$u; +visitParents$f.SKIP = SKIP$u; +visitParents$f.EXIT = EXIT$u; + +function visitParents$f(tree, test, visitor, reverse) { + var is; + + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + is = convert_1$f(test); + + one(tree, null, []); + + // Visit a single node. + function one(node, index, parents) { + var result = []; + var subresult; + + if (!test || is(node, index, parents[parents.length - 1] || null)) { + result = toResult$f(visitor(node, parents)); + + if (result[0] === EXIT$u) { + return result + } + } + + if (node.children && result[0] !== SKIP$u) { + subresult = toResult$f(all(node.children, parents.concat(node))); + return subresult[0] === EXIT$u ? subresult : result + } + + return result + } + + // Visit children in `parent`. + function all(children, parents) { + var min = -1; + var step = reverse ? -1 : 1; + var index = (reverse ? children.length : min) + step; + var result; + + while (index > min && index < children.length) { + result = one(children[index], index, parents); + + if (result[0] === EXIT$u) { + return result + } + + index = typeof result[1] === 'number' ? result[1] : index + step; + } + } +} + +function toResult$f(value) { + if (value !== null && typeof value === 'object' && 'length' in value) { + return value + } + + if (typeof value === 'number') { + return [CONTINUE$u, value] + } + + return [value] +} + +var unistUtilVisit$f = visit$f; + + + +var CONTINUE$v = unistUtilVisitParents$f.CONTINUE; +var SKIP$v = unistUtilVisitParents$f.SKIP; +var EXIT$v = unistUtilVisitParents$f.EXIT; + +visit$f.CONTINUE = CONTINUE$v; +visit$f.SKIP = SKIP$v; +visit$f.EXIT = EXIT$v; + +function visit$f(tree, test, visitor, reverse) { + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + unistUtilVisitParents$f(tree, test, overload, reverse); + + function overload(node, parents) { + var parent = parents[parents.length - 1]; + var index = parent ? parent.children.indexOf(node) : null; + return visitor(node, index, parent) + } +} + +var remarkLintNoUndefinedReferences = unifiedLintRule( + 'remark-lint:no-undefined-references', + noUndefinedReferences +); + +var reason$7 = 'Found reference to undefined definition'; + +// The identifier is upcased to avoid naming collisions with fields inherited +// from `Object.prototype`. +// If `Object.create(null)` was used in place of `{}`, downcasing would work +// equally well. +function normalize$3(s) { + return collapseWhiteSpace(s.toUpperCase()) +} + +function noUndefinedReferences(tree, file, option) { + var allow = ((option || {}).allow || []).map(normalize$3); + var map = {}; + + unistUtilVisit$f(tree, ['definition', 'footnoteDefinition'], mark); + unistUtilVisit$f(tree, ['imageReference', 'linkReference', 'footnoteReference'], find); + + function mark(node) { + if (!unistUtilGenerated(node)) { + map[normalize$3(node.identifier)] = true; + } + } + + function find(node) { + if ( + !unistUtilGenerated(node) && + !(normalize$3(node.identifier) in map) && + allow.indexOf(normalize$3(node.identifier)) === -1 + ) { + file.message(reason$7, node); + } + } +} + +var convert_1$g = convert$h; + +function convert$h(test) { + if (typeof test === 'string') { + return typeFactory$g(test) + } + + if (test === null || test === undefined) { + return ok$h + } + + if (typeof test === 'object') { + return ('length' in test ? anyFactory$g : matchesFactory$g)(test) + } + + if (typeof test === 'function') { + return test + } + + throw new Error('Expected function, string, or object as test') +} + +function convertAll$g(tests) { + var results = []; + var length = tests.length; + var index = -1; + + while (++index < length) { + results[index] = convert$h(tests[index]); + } + + return results +} + +// Utility assert each property in `test` is represented in `node`, and each +// values are strictly equal. +function matchesFactory$g(test) { + return matches + + function matches(node) { + var key; + + for (key in test) { + if (node[key] !== test[key]) { + return false + } + } + + return true + } +} + +function anyFactory$g(tests) { + var checks = convertAll$g(tests); + var length = checks.length; + + return matches + + function matches() { + var index = -1; + + while (++index < length) { + if (checks[index].apply(this, arguments)) { + return true + } + } + + return false + } +} + +// Utility to convert a string into a function which checks a given node’s type +// for said string. +function typeFactory$g(test) { + return type + + function type(node) { + return Boolean(node && node.type === test) + } +} + +// Utility to return true. +function ok$h() { + return true +} + +var unistUtilVisitParents$g = visitParents$g; + + + +var CONTINUE$w = true; +var SKIP$w = 'skip'; +var EXIT$w = false; + +visitParents$g.CONTINUE = CONTINUE$w; +visitParents$g.SKIP = SKIP$w; +visitParents$g.EXIT = EXIT$w; + +function visitParents$g(tree, test, visitor, reverse) { + var is; + + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + is = convert_1$g(test); + + one(tree, null, []); + + // Visit a single node. + function one(node, index, parents) { + var result = []; + var subresult; + + if (!test || is(node, index, parents[parents.length - 1] || null)) { + result = toResult$g(visitor(node, parents)); + + if (result[0] === EXIT$w) { + return result + } + } + + if (node.children && result[0] !== SKIP$w) { + subresult = toResult$g(all(node.children, parents.concat(node))); + return subresult[0] === EXIT$w ? subresult : result + } + + return result + } + + // Visit children in `parent`. + function all(children, parents) { + var min = -1; + var step = reverse ? -1 : 1; + var index = (reverse ? children.length : min) + step; + var result; + + while (index > min && index < children.length) { + result = one(children[index], index, parents); + + if (result[0] === EXIT$w) { + return result + } + + index = typeof result[1] === 'number' ? result[1] : index + step; + } + } +} + +function toResult$g(value) { + if (value !== null && typeof value === 'object' && 'length' in value) { + return value + } + + if (typeof value === 'number') { + return [CONTINUE$w, value] + } + + return [value] +} + +var unistUtilVisit$g = visit$g; + + + +var CONTINUE$x = unistUtilVisitParents$g.CONTINUE; +var SKIP$x = unistUtilVisitParents$g.SKIP; +var EXIT$x = unistUtilVisitParents$g.EXIT; + +visit$g.CONTINUE = CONTINUE$x; +visit$g.SKIP = SKIP$x; +visit$g.EXIT = EXIT$x; + +function visit$g(tree, test, visitor, reverse) { + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + unistUtilVisitParents$g(tree, test, overload, reverse); + + function overload(node, parents) { + var parent = parents[parents.length - 1]; + var index = parent ? parent.children.indexOf(node) : null; + return visitor(node, index, parent) + } +} + +var remarkLintNoUnusedDefinitions = unifiedLintRule('remark-lint:no-unused-definitions', noUnusedDefinitions); + +var reason$8 = 'Found unused definition'; + +function noUnusedDefinitions(tree, file) { + var map = {}; + var identifier; + var entry; + + unistUtilVisit$g(tree, ['definition', 'footnoteDefinition'], find); + unistUtilVisit$g(tree, ['imageReference', 'linkReference', 'footnoteReference'], mark); + + for (identifier in map) { + entry = map[identifier]; + + if (!entry.used) { + file.message(reason$8, entry.node); + } + } + + function find(node) { + if (!unistUtilGenerated(node)) { + map[node.identifier.toUpperCase()] = {node: node, used: false}; + } + } + + function mark(node) { + var info = map[node.identifier.toUpperCase()]; + + if (!unistUtilGenerated(node) && info) { + info.used = true; + } + } +} + +var plugins$1 = [ + remarkLint$1, + // Unix compatibility. + remarkLintFinalNewline, + // Rendering across vendors differs greatly if using other styles. + remarkLintListItemBulletIndent, + [remarkLintListItemIndent, 'tab-size'], + // Differs or unsupported across vendors. + remarkLintNoAutoLinkWithoutProtocol, + remarkLintNoBlockquoteWithoutMarker, + remarkLintNoLiteralUrls, + [remarkLintOrderedListMarkerStyle, '.'], + // Mistakes. + remarkLintHardBreakSpaces, + remarkLintNoDuplicateDefinitions, + remarkLintNoHeadingContentIndent, + remarkLintNoInlinePadding, + remarkLintNoShortcutReferenceImage, + remarkLintNoShortcutReferenceLink, + remarkLintNoUndefinedReferences, + remarkLintNoUnusedDefinitions +]; + +var remarkPresetLintRecommended = { + plugins: plugins$1 +}; + +var convert_1$h = convert$i; + +function convert$i(test) { + if (typeof test === 'string') { + return typeFactory$h(test) + } + + if (test === null || test === undefined) { + return ok$i + } + + if (typeof test === 'object') { + return ('length' in test ? anyFactory$h : matchesFactory$h)(test) + } + + if (typeof test === 'function') { + return test + } + + throw new Error('Expected function, string, or object as test') +} + +function convertAll$h(tests) { + var results = []; + var length = tests.length; + var index = -1; + + while (++index < length) { + results[index] = convert$i(tests[index]); + } + + return results +} + +// Utility assert each property in `test` is represented in `node`, and each +// values are strictly equal. +function matchesFactory$h(test) { + return matches + + function matches(node) { + var key; + + for (key in test) { + if (node[key] !== test[key]) { + return false + } + } + + return true + } +} + +function anyFactory$h(tests) { + var checks = convertAll$h(tests); + var length = checks.length; + + return matches + + function matches() { + var index = -1; + + while (++index < length) { + if (checks[index].apply(this, arguments)) { + return true + } + } + + return false + } +} + +// Utility to convert a string into a function which checks a given node’s type +// for said string. +function typeFactory$h(test) { + return type + + function type(node) { + return Boolean(node && node.type === test) + } +} + +// Utility to return true. +function ok$i() { + return true +} + +var unistUtilVisitParents$h = visitParents$h; + + + +var CONTINUE$y = true; +var SKIP$y = 'skip'; +var EXIT$y = false; + +visitParents$h.CONTINUE = CONTINUE$y; +visitParents$h.SKIP = SKIP$y; +visitParents$h.EXIT = EXIT$y; + +function visitParents$h(tree, test, visitor, reverse) { + var is; + + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + is = convert_1$h(test); + + one(tree, null, []); + + // Visit a single node. + function one(node, index, parents) { + var result = []; + var subresult; + + if (!test || is(node, index, parents[parents.length - 1] || null)) { + result = toResult$h(visitor(node, parents)); + + if (result[0] === EXIT$y) { + return result + } + } + + if (node.children && result[0] !== SKIP$y) { + subresult = toResult$h(all(node.children, parents.concat(node))); + return subresult[0] === EXIT$y ? subresult : result + } + + return result + } + + // Visit children in `parent`. + function all(children, parents) { + var min = -1; + var step = reverse ? -1 : 1; + var index = (reverse ? children.length : min) + step; + var result; + + while (index > min && index < children.length) { + result = one(children[index], index, parents); + + if (result[0] === EXIT$y) { + return result + } + + index = typeof result[1] === 'number' ? result[1] : index + step; + } + } +} + +function toResult$h(value) { + if (value !== null && typeof value === 'object' && 'length' in value) { + return value + } + + if (typeof value === 'number') { + return [CONTINUE$y, value] + } + + return [value] +} + +var unistUtilVisit$h = visit$h; + + + +var CONTINUE$z = unistUtilVisitParents$h.CONTINUE; +var SKIP$z = unistUtilVisitParents$h.SKIP; +var EXIT$z = unistUtilVisitParents$h.EXIT; + +visit$h.CONTINUE = CONTINUE$z; +visit$h.SKIP = SKIP$z; +visit$h.EXIT = EXIT$z; + +function visit$h(tree, test, visitor, reverse) { + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + unistUtilVisitParents$h(tree, test, overload, reverse); + + function overload(node, parents) { + var parent = parents[parents.length - 1]; + var index = parent ? parent.children.indexOf(node) : null; + return visitor(node, index, parent) + } +} + +var remarkLintBlockquoteIndentation = unifiedLintRule( + 'remark-lint:blockquote-indentation', + blockquoteIndentation +); + +function blockquoteIndentation(tree, file, option) { + var preferred = typeof option === 'number' && !isNaN(option) ? option : null; + + unistUtilVisit$h(tree, 'blockquote', visitor); + + function visitor(node) { + var abs; + var diff; + var reason; + + if (unistUtilGenerated(node) || node.children.length === 0) { + return + } + + if (preferred) { + diff = preferred - check$3(node); + + if (diff !== 0) { + abs = Math.abs(diff); + reason = + (diff > 0 ? 'Add' : 'Remove') + + ' ' + + abs + + ' ' + + pluralize('space', abs) + + ' between block quote and content'; + + file.message(reason, unistUtilPosition.start(node.children[0])); + } + } else { + preferred = check$3(node); + } + } +} + +function check$3(node) { + var head = node.children[0]; + var indentation = unistUtilPosition.start(head).column - unistUtilPosition.start(node).column; + var padding = mdastUtilToString(head).match(/^ +/); + + if (padding) { + indentation += padding[0].length; + } + + return indentation +} + +var vfileLocation$4 = factory$c; + +function factory$c(file) { + var contents = indices$4(String(file)); + + return { + toPosition: offsetToPositionFactory$4(contents), + toOffset: positionToOffsetFactory$4(contents) + } +} + +// Factory to get the line and column-based `position` for `offset` in the bound +// indices. +function offsetToPositionFactory$4(indices) { + return offsetToPosition + + // Get the line and column-based `position` for `offset` in the bound indices. + function offsetToPosition(offset) { + var index = -1; + var length = indices.length; + + if (offset < 0) { + return {} + } + + while (++index < length) { + if (indices[index] > offset) { + return { + line: index + 1, + column: offset - (indices[index - 1] || 0) + 1, + offset: offset + } + } + } + + return {} + } +} + +// Factory to get the `offset` for a line and column-based `position` in the +// bound indices. +function positionToOffsetFactory$4(indices) { + return positionToOffset + + // Get the `offset` for a line and column-based `position` in the bound + // indices. + function positionToOffset(position) { + var line = position && position.line; + var column = position && position.column; + + if (!isNaN(line) && !isNaN(column) && line - 1 in indices) { + return (indices[line - 2] || 0) + column - 1 || 0 + } + + return -1 + } +} + +// Get indices of line-breaks in `value`. +function indices$4(value) { + var result = []; + var index = value.indexOf('\n'); + + while (index !== -1) { + result.push(index + 1); + index = value.indexOf('\n', index + 1); + } + + result.push(value.length + 1); + + return result +} + +var convert_1$i = convert$j; + +function convert$j(test) { + if (typeof test === 'string') { + return typeFactory$i(test) + } + + if (test === null || test === undefined) { + return ok$j + } + + if (typeof test === 'object') { + return ('length' in test ? anyFactory$i : matchesFactory$i)(test) + } + + if (typeof test === 'function') { + return test + } + + throw new Error('Expected function, string, or object as test') +} + +function convertAll$i(tests) { + var results = []; + var length = tests.length; + var index = -1; + + while (++index < length) { + results[index] = convert$j(tests[index]); + } + + return results +} + +// Utility assert each property in `test` is represented in `node`, and each +// values are strictly equal. +function matchesFactory$i(test) { + return matches + + function matches(node) { + var key; + + for (key in test) { + if (node[key] !== test[key]) { + return false + } + } + + return true + } +} + +function anyFactory$i(tests) { + var checks = convertAll$i(tests); + var length = checks.length; + + return matches + + function matches() { + var index = -1; + + while (++index < length) { + if (checks[index].apply(this, arguments)) { + return true + } + } + + return false + } +} + +// Utility to convert a string into a function which checks a given node’s type +// for said string. +function typeFactory$i(test) { + return type + + function type(node) { + return Boolean(node && node.type === test) + } +} + +// Utility to return true. +function ok$j() { + return true +} + +var unistUtilVisitParents$i = visitParents$i; + + + +var CONTINUE$A = true; +var SKIP$A = 'skip'; +var EXIT$A = false; + +visitParents$i.CONTINUE = CONTINUE$A; +visitParents$i.SKIP = SKIP$A; +visitParents$i.EXIT = EXIT$A; + +function visitParents$i(tree, test, visitor, reverse) { + var is; + + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + is = convert_1$i(test); + + one(tree, null, []); + + // Visit a single node. + function one(node, index, parents) { + var result = []; + var subresult; + + if (!test || is(node, index, parents[parents.length - 1] || null)) { + result = toResult$i(visitor(node, parents)); + + if (result[0] === EXIT$A) { + return result + } + } + + if (node.children && result[0] !== SKIP$A) { + subresult = toResult$i(all(node.children, parents.concat(node))); + return subresult[0] === EXIT$A ? subresult : result + } + + return result + } + + // Visit children in `parent`. + function all(children, parents) { + var min = -1; + var step = reverse ? -1 : 1; + var index = (reverse ? children.length : min) + step; + var result; + + while (index > min && index < children.length) { + result = one(children[index], index, parents); + + if (result[0] === EXIT$A) { + return result + } + + index = typeof result[1] === 'number' ? result[1] : index + step; + } + } +} + +function toResult$i(value) { + if (value !== null && typeof value === 'object' && 'length' in value) { + return value + } + + if (typeof value === 'number') { + return [CONTINUE$A, value] + } + + return [value] +} + +var unistUtilVisit$i = visit$i; + + + +var CONTINUE$B = unistUtilVisitParents$i.CONTINUE; +var SKIP$B = unistUtilVisitParents$i.SKIP; +var EXIT$B = unistUtilVisitParents$i.EXIT; + +visit$i.CONTINUE = CONTINUE$B; +visit$i.SKIP = SKIP$B; +visit$i.EXIT = EXIT$B; + +function visit$i(tree, test, visitor, reverse) { + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + unistUtilVisitParents$i(tree, test, overload, reverse); + + function overload(node, parents) { + var parent = parents[parents.length - 1]; + var index = parent ? parent.children.indexOf(node) : null; + return visitor(node, index, parent) + } +} + +var remarkLintCheckboxCharacterStyle = unifiedLintRule( + 'remark-lint:checkbox-character-style', + checkboxCharacterStyle +); + +var start$8 = unistUtilPosition.start; +var end$4 = unistUtilPosition.end; + +var checked = {x: true, X: true}; +var unchecked = {' ': true, '\t': true}; +var types$1 = {true: 'checked', false: 'unchecked'}; + +function checkboxCharacterStyle(tree, file, option) { + var contents = String(file); + var location = vfileLocation$4(file); + var preferred = typeof option === 'object' ? option : {}; + + if (preferred.unchecked && unchecked[preferred.unchecked] !== true) { + file.fail( + 'Incorrect unchecked checkbox marker `' + + preferred.unchecked + + "`: use either `'\\t'`, or `' '`" + ); + } + + if (preferred.checked && checked[preferred.checked] !== true) { + file.fail( + 'Incorrect checked checkbox marker `' + + preferred.checked + + "`: use either `'x'`, or `'X'`" + ); + } + + unistUtilVisit$i(tree, 'listItem', visitor); + + function visitor(node) { + var type; + var initial; + var final; + var value; + var style; + var character; + var reason; + + // Exit early for items without checkbox. + if (typeof node.checked !== 'boolean' || unistUtilGenerated(node)) { + return + } + + type = types$1[node.checked]; + initial = start$8(node).offset; + final = (node.children.length === 0 ? end$4(node) : start$8(node.children[0])) + .offset; + + // For a checkbox to be parsed, it must be followed by a whitespace. + value = contents.slice(initial, final).replace(/\s+$/, '').slice(0, -1); + + // The checkbox character is behind a square bracket. + character = value.charAt(value.length - 1); + style = preferred[type]; + + if (style) { + if (character !== style) { + reason = + type.charAt(0).toUpperCase() + + type.slice(1) + + ' checkboxes should use `' + + style + + '` as a marker'; + + file.message(reason, { + start: location.toPosition(initial + value.length - 1), + end: location.toPosition(initial + value.length) + }); + } + } else { + preferred[type] = character; + } + } +} + +var vfileLocation$5 = factory$d; + +function factory$d(file) { + var contents = indices$5(String(file)); + + return { + toPosition: offsetToPositionFactory$5(contents), + toOffset: positionToOffsetFactory$5(contents) + } +} + +// Factory to get the line and column-based `position` for `offset` in the bound +// indices. +function offsetToPositionFactory$5(indices) { + return offsetToPosition + + // Get the line and column-based `position` for `offset` in the bound indices. + function offsetToPosition(offset) { + var index = -1; + var length = indices.length; + + if (offset < 0) { + return {} + } + + while (++index < length) { + if (indices[index] > offset) { + return { + line: index + 1, + column: offset - (indices[index - 1] || 0) + 1, + offset: offset + } + } + } + + return {} + } +} + +// Factory to get the `offset` for a line and column-based `position` in the +// bound indices. +function positionToOffsetFactory$5(indices) { + return positionToOffset + + // Get the `offset` for a line and column-based `position` in the bound + // indices. + function positionToOffset(position) { + var line = position && position.line; + var column = position && position.column; + + if (!isNaN(line) && !isNaN(column) && line - 1 in indices) { + return (indices[line - 2] || 0) + column - 1 || 0 + } + + return -1 + } +} + +// Get indices of line-breaks in `value`. +function indices$5(value) { + var result = []; + var index = value.indexOf('\n'); + + while (index !== -1) { + result.push(index + 1); + index = value.indexOf('\n', index + 1); + } + + result.push(value.length + 1); + + return result +} + +var convert_1$j = convert$k; + +function convert$k(test) { + if (typeof test === 'string') { + return typeFactory$j(test) + } + + if (test === null || test === undefined) { + return ok$k + } + + if (typeof test === 'object') { + return ('length' in test ? anyFactory$j : matchesFactory$j)(test) + } + + if (typeof test === 'function') { + return test + } + + throw new Error('Expected function, string, or object as test') +} + +function convertAll$j(tests) { + var results = []; + var length = tests.length; + var index = -1; + + while (++index < length) { + results[index] = convert$k(tests[index]); + } + + return results +} + +// Utility assert each property in `test` is represented in `node`, and each +// values are strictly equal. +function matchesFactory$j(test) { + return matches + + function matches(node) { + var key; + + for (key in test) { + if (node[key] !== test[key]) { + return false + } + } + + return true + } +} + +function anyFactory$j(tests) { + var checks = convertAll$j(tests); + var length = checks.length; + + return matches + + function matches() { + var index = -1; + + while (++index < length) { + if (checks[index].apply(this, arguments)) { + return true + } + } + + return false + } +} + +// Utility to convert a string into a function which checks a given node’s type +// for said string. +function typeFactory$j(test) { + return type + + function type(node) { + return Boolean(node && node.type === test) + } +} + +// Utility to return true. +function ok$k() { + return true +} + +var unistUtilVisitParents$j = visitParents$j; + + + +var CONTINUE$C = true; +var SKIP$C = 'skip'; +var EXIT$C = false; + +visitParents$j.CONTINUE = CONTINUE$C; +visitParents$j.SKIP = SKIP$C; +visitParents$j.EXIT = EXIT$C; + +function visitParents$j(tree, test, visitor, reverse) { + var is; + + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + is = convert_1$j(test); + + one(tree, null, []); + + // Visit a single node. + function one(node, index, parents) { + var result = []; + var subresult; + + if (!test || is(node, index, parents[parents.length - 1] || null)) { + result = toResult$j(visitor(node, parents)); + + if (result[0] === EXIT$C) { + return result + } + } + + if (node.children && result[0] !== SKIP$C) { + subresult = toResult$j(all(node.children, parents.concat(node))); + return subresult[0] === EXIT$C ? subresult : result + } + + return result + } + + // Visit children in `parent`. + function all(children, parents) { + var min = -1; + var step = reverse ? -1 : 1; + var index = (reverse ? children.length : min) + step; + var result; + + while (index > min && index < children.length) { + result = one(children[index], index, parents); + + if (result[0] === EXIT$C) { + return result + } + + index = typeof result[1] === 'number' ? result[1] : index + step; + } + } +} + +function toResult$j(value) { + if (value !== null && typeof value === 'object' && 'length' in value) { + return value + } + + if (typeof value === 'number') { + return [CONTINUE$C, value] + } + + return [value] +} + +var unistUtilVisit$j = visit$j; + + + +var CONTINUE$D = unistUtilVisitParents$j.CONTINUE; +var SKIP$D = unistUtilVisitParents$j.SKIP; +var EXIT$D = unistUtilVisitParents$j.EXIT; + +visit$j.CONTINUE = CONTINUE$D; +visit$j.SKIP = SKIP$D; +visit$j.EXIT = EXIT$D; + +function visit$j(tree, test, visitor, reverse) { + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + unistUtilVisitParents$j(tree, test, overload, reverse); + + function overload(node, parents) { + var parent = parents[parents.length - 1]; + var index = parent ? parent.children.indexOf(node) : null; + return visitor(node, index, parent) + } +} + +var remarkLintCheckboxContentIndent = unifiedLintRule( + 'remark-lint:checkbox-content-indent', + checkboxContentIndent +); + +var start$9 = unistUtilPosition.start; +var end$5 = unistUtilPosition.end; + +var reason$9 = 'Checkboxes should be followed by a single character'; + +function checkboxContentIndent(tree, file) { + var contents = String(file); + var location = vfileLocation$5(file); + + unistUtilVisit$j(tree, 'listItem', visitor); + + function visitor(node) { + var initial; + var final; + var value; + + // Exit early for items without checkbox. + if (typeof node.checked !== 'boolean' || unistUtilGenerated(node)) { + return + } + + initial = start$9(node).offset; + /* istanbul ignore next - hard to test, couldn’t find a case. */ + final = (node.children.length === 0 ? end$5(node) : start$9(node.children[0])) + .offset; + + while (/[^\S\n]/.test(contents.charAt(final))) { + final++; + } + + // For a checkbox to be parsed, it must be followed by a whitespace. + value = contents.slice(initial, final); + value = value.slice(value.indexOf(']') + 1); + + if (value.length !== 1) { + file.message(reason$9, { + start: location.toPosition(final - value.length + 1), + end: location.toPosition(final) + }); + } + } +} + +var convert_1$k = convert$l; + +function convert$l(test) { + if (typeof test === 'string') { + return typeFactory$k(test) + } + + if (test === null || test === undefined) { + return ok$l + } + + if (typeof test === 'object') { + return ('length' in test ? anyFactory$k : matchesFactory$k)(test) + } + + if (typeof test === 'function') { + return test + } + + throw new Error('Expected function, string, or object as test') +} + +function convertAll$k(tests) { + var results = []; + var length = tests.length; + var index = -1; + + while (++index < length) { + results[index] = convert$l(tests[index]); + } + + return results +} + +// Utility assert each property in `test` is represented in `node`, and each +// values are strictly equal. +function matchesFactory$k(test) { + return matches + + function matches(node) { + var key; + + for (key in test) { + if (node[key] !== test[key]) { + return false + } + } + + return true + } +} + +function anyFactory$k(tests) { + var checks = convertAll$k(tests); + var length = checks.length; + + return matches + + function matches() { + var index = -1; + + while (++index < length) { + if (checks[index].apply(this, arguments)) { + return true + } + } + + return false + } +} + +// Utility to convert a string into a function which checks a given node’s type +// for said string. +function typeFactory$k(test) { + return type + + function type(node) { + return Boolean(node && node.type === test) + } +} + +// Utility to return true. +function ok$l() { + return true +} + +var unistUtilVisitParents$k = visitParents$k; + + + +var CONTINUE$E = true; +var SKIP$E = 'skip'; +var EXIT$E = false; + +visitParents$k.CONTINUE = CONTINUE$E; +visitParents$k.SKIP = SKIP$E; +visitParents$k.EXIT = EXIT$E; + +function visitParents$k(tree, test, visitor, reverse) { + var is; + + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + is = convert_1$k(test); + + one(tree, null, []); + + // Visit a single node. + function one(node, index, parents) { + var result = []; + var subresult; + + if (!test || is(node, index, parents[parents.length - 1] || null)) { + result = toResult$k(visitor(node, parents)); + + if (result[0] === EXIT$E) { + return result + } + } + + if (node.children && result[0] !== SKIP$E) { + subresult = toResult$k(all(node.children, parents.concat(node))); + return subresult[0] === EXIT$E ? subresult : result + } + + return result + } + + // Visit children in `parent`. + function all(children, parents) { + var min = -1; + var step = reverse ? -1 : 1; + var index = (reverse ? children.length : min) + step; + var result; + + while (index > min && index < children.length) { + result = one(children[index], index, parents); + + if (result[0] === EXIT$E) { + return result + } + + index = typeof result[1] === 'number' ? result[1] : index + step; + } + } +} + +function toResult$k(value) { + if (value !== null && typeof value === 'object' && 'length' in value) { + return value + } + + if (typeof value === 'number') { + return [CONTINUE$E, value] + } + + return [value] +} + +var unistUtilVisit$k = visit$k; + + + +var CONTINUE$F = unistUtilVisitParents$k.CONTINUE; +var SKIP$F = unistUtilVisitParents$k.SKIP; +var EXIT$F = unistUtilVisitParents$k.EXIT; + +visit$k.CONTINUE = CONTINUE$F; +visit$k.SKIP = SKIP$F; +visit$k.EXIT = EXIT$F; + +function visit$k(tree, test, visitor, reverse) { + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + unistUtilVisitParents$k(tree, test, overload, reverse); + + function overload(node, parents) { + var parent = parents[parents.length - 1]; + var index = parent ? parent.children.indexOf(node) : null; + return visitor(node, index, parent) + } +} + +var remarkLintCodeBlockStyle = unifiedLintRule('remark-lint:code-block-style', codeBlockStyle); + +var start$a = unistUtilPosition.start; +var end$6 = unistUtilPosition.end; + +var styles$2 = {null: true, fenced: true, indented: true}; + +function codeBlockStyle(tree, file, option) { + var contents = String(file); + var preferred = + typeof option === 'string' && option !== 'consistent' ? option : null; + + if (styles$2[preferred] !== true) { + file.fail( + 'Incorrect code block style `' + + preferred + + "`: use either `'consistent'`, `'fenced'`, or `'indented'`" + ); + } + + unistUtilVisit$k(tree, 'code', visitor); + + function visitor(node) { + var initial; + var final; + var current; + + if (unistUtilGenerated(node)) { + return null + } + + initial = start$a(node).offset; + final = end$6(node).offset; + + current = + node.lang || /^\s*([~`])\1{2,}/.test(contents.slice(initial, final)) + ? 'fenced' + : 'indented'; + + if (preferred) { + if (preferred !== current) { + file.message('Code blocks should be ' + preferred, node); + } + } else { + preferred = current; + } + } +} + +var convert_1$l = convert$m; + +function convert$m(test) { + if (typeof test === 'string') { + return typeFactory$l(test) + } + + if (test === null || test === undefined) { + return ok$m + } + + if (typeof test === 'object') { + return ('length' in test ? anyFactory$l : matchesFactory$l)(test) + } + + if (typeof test === 'function') { + return test + } + + throw new Error('Expected function, string, or object as test') +} + +function convertAll$l(tests) { + var results = []; + var length = tests.length; + var index = -1; + + while (++index < length) { + results[index] = convert$m(tests[index]); + } + + return results +} + +// Utility assert each property in `test` is represented in `node`, and each +// values are strictly equal. +function matchesFactory$l(test) { + return matches + + function matches(node) { + var key; + + for (key in test) { + if (node[key] !== test[key]) { + return false + } + } + + return true + } +} + +function anyFactory$l(tests) { + var checks = convertAll$l(tests); + var length = checks.length; + + return matches + + function matches() { + var index = -1; + + while (++index < length) { + if (checks[index].apply(this, arguments)) { + return true + } + } + + return false + } +} + +// Utility to convert a string into a function which checks a given node’s type +// for said string. +function typeFactory$l(test) { + return type + + function type(node) { + return Boolean(node && node.type === test) + } +} + +// Utility to return true. +function ok$m() { + return true +} + +var unistUtilVisitParents$l = visitParents$l; + + + +var CONTINUE$G = true; +var SKIP$G = 'skip'; +var EXIT$G = false; + +visitParents$l.CONTINUE = CONTINUE$G; +visitParents$l.SKIP = SKIP$G; +visitParents$l.EXIT = EXIT$G; + +function visitParents$l(tree, test, visitor, reverse) { + var is; + + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + is = convert_1$l(test); + + one(tree, null, []); + + // Visit a single node. + function one(node, index, parents) { + var result = []; + var subresult; + + if (!test || is(node, index, parents[parents.length - 1] || null)) { + result = toResult$l(visitor(node, parents)); + + if (result[0] === EXIT$G) { + return result + } + } + + if (node.children && result[0] !== SKIP$G) { + subresult = toResult$l(all(node.children, parents.concat(node))); + return subresult[0] === EXIT$G ? subresult : result + } + + return result + } + + // Visit children in `parent`. + function all(children, parents) { + var min = -1; + var step = reverse ? -1 : 1; + var index = (reverse ? children.length : min) + step; + var result; + + while (index > min && index < children.length) { + result = one(children[index], index, parents); + + if (result[0] === EXIT$G) { + return result + } + + index = typeof result[1] === 'number' ? result[1] : index + step; + } + } +} + +function toResult$l(value) { + if (value !== null && typeof value === 'object' && 'length' in value) { + return value + } + + if (typeof value === 'number') { + return [CONTINUE$G, value] + } + + return [value] +} + +var unistUtilVisit$l = visit$l; + + + +var CONTINUE$H = unistUtilVisitParents$l.CONTINUE; +var SKIP$H = unistUtilVisitParents$l.SKIP; +var EXIT$H = unistUtilVisitParents$l.EXIT; + +visit$l.CONTINUE = CONTINUE$H; +visit$l.SKIP = SKIP$H; +visit$l.EXIT = EXIT$H; + +function visit$l(tree, test, visitor, reverse) { + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + unistUtilVisitParents$l(tree, test, overload, reverse); + + function overload(node, parents) { + var parent = parents[parents.length - 1]; + var index = parent ? parent.children.indexOf(node) : null; + return visitor(node, index, parent) + } +} + +var remarkLintDefinitionSpacing = unifiedLintRule('remark-lint:definition-spacing', definitionSpacing); + +var label$1 = /^\s*\[((?:\\[\s\S]|[^[\]])+)]/; +var reason$a = 'Do not use consecutive whitespace in definition labels'; + +function definitionSpacing(tree, file) { + var contents = String(file); + + unistUtilVisit$l(tree, ['definition', 'footnoteDefinition'], check); + + function check(node) { + var start = unistUtilPosition.start(node).offset; + var end = unistUtilPosition.end(node).offset; + + if ( + !unistUtilGenerated(node) && + /[ \t\n]{2,}/.test(contents.slice(start, end).match(label$1)[1]) + ) { + file.message(reason$a, node); + } + } +} + +var convert_1$m = convert$n; + +function convert$n(test) { + if (typeof test === 'string') { + return typeFactory$m(test) + } + + if (test === null || test === undefined) { + return ok$n + } + + if (typeof test === 'object') { + return ('length' in test ? anyFactory$m : matchesFactory$m)(test) + } + + if (typeof test === 'function') { + return test + } + + throw new Error('Expected function, string, or object as test') +} + +function convertAll$m(tests) { + var results = []; + var length = tests.length; + var index = -1; + + while (++index < length) { + results[index] = convert$n(tests[index]); + } + + return results +} + +// Utility assert each property in `test` is represented in `node`, and each +// values are strictly equal. +function matchesFactory$m(test) { + return matches + + function matches(node) { + var key; + + for (key in test) { + if (node[key] !== test[key]) { + return false + } + } + + return true + } +} + +function anyFactory$m(tests) { + var checks = convertAll$m(tests); + var length = checks.length; + + return matches + + function matches() { + var index = -1; + + while (++index < length) { + if (checks[index].apply(this, arguments)) { + return true + } + } + + return false + } +} + +// Utility to convert a string into a function which checks a given node’s type +// for said string. +function typeFactory$m(test) { + return type + + function type(node) { + return Boolean(node && node.type === test) + } +} + +// Utility to return true. +function ok$n() { + return true +} + +var unistUtilVisitParents$m = visitParents$m; + + + +var CONTINUE$I = true; +var SKIP$I = 'skip'; +var EXIT$I = false; + +visitParents$m.CONTINUE = CONTINUE$I; +visitParents$m.SKIP = SKIP$I; +visitParents$m.EXIT = EXIT$I; + +function visitParents$m(tree, test, visitor, reverse) { + var is; + + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + is = convert_1$m(test); + + one(tree, null, []); + + // Visit a single node. + function one(node, index, parents) { + var result = []; + var subresult; + + if (!test || is(node, index, parents[parents.length - 1] || null)) { + result = toResult$m(visitor(node, parents)); + + if (result[0] === EXIT$I) { + return result + } + } + + if (node.children && result[0] !== SKIP$I) { + subresult = toResult$m(all(node.children, parents.concat(node))); + return subresult[0] === EXIT$I ? subresult : result + } + + return result + } + + // Visit children in `parent`. + function all(children, parents) { + var min = -1; + var step = reverse ? -1 : 1; + var index = (reverse ? children.length : min) + step; + var result; + + while (index > min && index < children.length) { + result = one(children[index], index, parents); + + if (result[0] === EXIT$I) { + return result + } + + index = typeof result[1] === 'number' ? result[1] : index + step; + } + } +} + +function toResult$m(value) { + if (value !== null && typeof value === 'object' && 'length' in value) { + return value + } + + if (typeof value === 'number') { + return [CONTINUE$I, value] + } + + return [value] +} + +var unistUtilVisit$m = visit$m; + + + +var CONTINUE$J = unistUtilVisitParents$m.CONTINUE; +var SKIP$J = unistUtilVisitParents$m.SKIP; +var EXIT$J = unistUtilVisitParents$m.EXIT; + +visit$m.CONTINUE = CONTINUE$J; +visit$m.SKIP = SKIP$J; +visit$m.EXIT = EXIT$J; + +function visit$m(tree, test, visitor, reverse) { + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + unistUtilVisitParents$m(tree, test, overload, reverse); + + function overload(node, parents) { + var parent = parents[parents.length - 1]; + var index = parent ? parent.children.indexOf(node) : null; + return visitor(node, index, parent) + } +} + +var remarkLintFencedCodeFlag = unifiedLintRule('remark-lint:fenced-code-flag', fencedCodeFlag); + +var start$b = unistUtilPosition.start; +var end$7 = unistUtilPosition.end; + +var fence$2 = /^ {0,3}([~`])\1{2,}/; +var reasonIncorrect = 'Incorrect code language flag'; +var reasonMissing = 'Missing code language flag'; + +function fencedCodeFlag(tree, file, option) { + var contents = String(file); + var allowEmpty = false; + var allowed = []; + var flags = option; + + if (typeof flags === 'object' && !('length' in flags)) { + allowEmpty = Boolean(flags.allowEmpty); + flags = flags.flags; + } + + if (typeof flags === 'object' && 'length' in flags) { + allowed = String(flags).split(','); + } + + unistUtilVisit$m(tree, 'code', visitor); + + function visitor(node) { + var value; + + if (!unistUtilGenerated(node)) { + if (node.lang) { + if (allowed.length !== 0 && allowed.indexOf(node.lang) === -1) { + file.message(reasonIncorrect, node); + } + } else { + value = contents.slice(start$b(node).offset, end$7(node).offset); + + if (!allowEmpty && fence$2.test(value)) { + file.message(reasonMissing, node); + } + } + } + } +} + +var convert_1$n = convert$o; + +function convert$o(test) { + if (typeof test === 'string') { + return typeFactory$n(test) + } + + if (test === null || test === undefined) { + return ok$o + } + + if (typeof test === 'object') { + return ('length' in test ? anyFactory$n : matchesFactory$n)(test) + } + + if (typeof test === 'function') { + return test + } + + throw new Error('Expected function, string, or object as test') +} + +function convertAll$n(tests) { + var results = []; + var length = tests.length; + var index = -1; + + while (++index < length) { + results[index] = convert$o(tests[index]); + } + + return results +} + +// Utility assert each property in `test` is represented in `node`, and each +// values are strictly equal. +function matchesFactory$n(test) { + return matches + + function matches(node) { + var key; + + for (key in test) { + if (node[key] !== test[key]) { + return false + } + } + + return true + } +} + +function anyFactory$n(tests) { + var checks = convertAll$n(tests); + var length = checks.length; + + return matches + + function matches() { + var index = -1; + + while (++index < length) { + if (checks[index].apply(this, arguments)) { + return true + } + } + + return false + } +} + +// Utility to convert a string into a function which checks a given node’s type +// for said string. +function typeFactory$n(test) { + return type + + function type(node) { + return Boolean(node && node.type === test) + } +} + +// Utility to return true. +function ok$o() { + return true +} + +var unistUtilVisitParents$n = visitParents$n; + + + +var CONTINUE$K = true; +var SKIP$K = 'skip'; +var EXIT$K = false; + +visitParents$n.CONTINUE = CONTINUE$K; +visitParents$n.SKIP = SKIP$K; +visitParents$n.EXIT = EXIT$K; + +function visitParents$n(tree, test, visitor, reverse) { + var is; + + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + is = convert_1$n(test); + + one(tree, null, []); + + // Visit a single node. + function one(node, index, parents) { + var result = []; + var subresult; + + if (!test || is(node, index, parents[parents.length - 1] || null)) { + result = toResult$n(visitor(node, parents)); + + if (result[0] === EXIT$K) { + return result + } + } + + if (node.children && result[0] !== SKIP$K) { + subresult = toResult$n(all(node.children, parents.concat(node))); + return subresult[0] === EXIT$K ? subresult : result + } + + return result + } + + // Visit children in `parent`. + function all(children, parents) { + var min = -1; + var step = reverse ? -1 : 1; + var index = (reverse ? children.length : min) + step; + var result; + + while (index > min && index < children.length) { + result = one(children[index], index, parents); + + if (result[0] === EXIT$K) { + return result + } + + index = typeof result[1] === 'number' ? result[1] : index + step; + } + } +} + +function toResult$n(value) { + if (value !== null && typeof value === 'object' && 'length' in value) { + return value + } + + if (typeof value === 'number') { + return [CONTINUE$K, value] + } + + return [value] +} + +var unistUtilVisit$n = visit$n; + + + +var CONTINUE$L = unistUtilVisitParents$n.CONTINUE; +var SKIP$L = unistUtilVisitParents$n.SKIP; +var EXIT$L = unistUtilVisitParents$n.EXIT; + +visit$n.CONTINUE = CONTINUE$L; +visit$n.SKIP = SKIP$L; +visit$n.EXIT = EXIT$L; + +function visit$n(tree, test, visitor, reverse) { + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + unistUtilVisitParents$n(tree, test, overload, reverse); + + function overload(node, parents) { + var parent = parents[parents.length - 1]; + var index = parent ? parent.children.indexOf(node) : null; + return visitor(node, index, parent) + } +} + +var remarkLintFencedCodeMarker = unifiedLintRule('remark-lint:fenced-code-marker', fencedCodeMarker); + +var markers = { + '`': true, + '~': true, + null: true +}; + +function fencedCodeMarker(tree, file, option) { + var contents = String(file); + var preferred = + typeof option === 'string' && option !== 'consistent' ? option : null; + + if (markers[preferred] !== true) { + file.fail( + 'Incorrect fenced code marker `' + + preferred + + "`: use either `'consistent'`, `` '`' ``, or `'~'`" + ); + } + + unistUtilVisit$n(tree, 'code', visitor); + + function visitor(node) { + var start; + var marker; + var label; + + if (!unistUtilGenerated(node)) { + start = unistUtilPosition.start(node).offset; + marker = contents + .slice(start, start + 4) + .replace(/^\s+/, '') + .charAt(0); + + // Ignore unfenced code blocks. + if (markers[marker] === true) { + if (preferred) { + if (marker !== preferred) { + label = preferred === '~' ? preferred : '` ` `'; + file.message( + 'Fenced code should use `' + label + '` as a marker', + node + ); + } + } else { + preferred = marker; + } + } + } + } +} + +var remarkLintFileExtension = unifiedLintRule('remark-lint:file-extension', fileExtension); + +function fileExtension(tree, file, option) { + var ext = file.extname; + var preferred = typeof option === 'string' ? option : 'md'; + + if (ext && ext.slice(1) !== preferred) { + file.message('Incorrect extension: use `' + preferred + '`'); + } +} + +var convert_1$o = convert$p; + +function convert$p(test) { + if (typeof test === 'string') { + return typeFactory$o(test) + } + + if (test === null || test === undefined) { + return ok$p + } + + if (typeof test === 'object') { + return ('length' in test ? anyFactory$o : matchesFactory$o)(test) + } + + if (typeof test === 'function') { + return test + } + + throw new Error('Expected function, string, or object as test') +} + +function convertAll$o(tests) { + var results = []; + var length = tests.length; + var index = -1; + + while (++index < length) { + results[index] = convert$p(tests[index]); + } + + return results +} + +// Utility assert each property in `test` is represented in `node`, and each +// values are strictly equal. +function matchesFactory$o(test) { + return matches + + function matches(node) { + var key; + + for (key in test) { + if (node[key] !== test[key]) { + return false + } + } + + return true + } +} + +function anyFactory$o(tests) { + var checks = convertAll$o(tests); + var length = checks.length; + + return matches + + function matches() { + var index = -1; + + while (++index < length) { + if (checks[index].apply(this, arguments)) { + return true + } + } + + return false + } +} + +// Utility to convert a string into a function which checks a given node’s type +// for said string. +function typeFactory$o(test) { + return type + + function type(node) { + return Boolean(node && node.type === test) + } +} + +// Utility to return true. +function ok$p() { + return true +} + +var unistUtilVisitParents$o = visitParents$o; + + + +var CONTINUE$M = true; +var SKIP$M = 'skip'; +var EXIT$M = false; + +visitParents$o.CONTINUE = CONTINUE$M; +visitParents$o.SKIP = SKIP$M; +visitParents$o.EXIT = EXIT$M; + +function visitParents$o(tree, test, visitor, reverse) { + var is; + + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + is = convert_1$o(test); + + one(tree, null, []); + + // Visit a single node. + function one(node, index, parents) { + var result = []; + var subresult; + + if (!test || is(node, index, parents[parents.length - 1] || null)) { + result = toResult$o(visitor(node, parents)); + + if (result[0] === EXIT$M) { + return result + } + } + + if (node.children && result[0] !== SKIP$M) { + subresult = toResult$o(all(node.children, parents.concat(node))); + return subresult[0] === EXIT$M ? subresult : result + } + + return result + } + + // Visit children in `parent`. + function all(children, parents) { + var min = -1; + var step = reverse ? -1 : 1; + var index = (reverse ? children.length : min) + step; + var result; + + while (index > min && index < children.length) { + result = one(children[index], index, parents); + + if (result[0] === EXIT$M) { + return result + } + + index = typeof result[1] === 'number' ? result[1] : index + step; + } + } +} + +function toResult$o(value) { + if (value !== null && typeof value === 'object' && 'length' in value) { + return value + } + + if (typeof value === 'number') { + return [CONTINUE$M, value] + } + + return [value] +} + +var unistUtilVisit$o = visit$o; + + + +var CONTINUE$N = unistUtilVisitParents$o.CONTINUE; +var SKIP$N = unistUtilVisitParents$o.SKIP; +var EXIT$N = unistUtilVisitParents$o.EXIT; + +visit$o.CONTINUE = CONTINUE$N; +visit$o.SKIP = SKIP$N; +visit$o.EXIT = EXIT$N; + +function visit$o(tree, test, visitor, reverse) { + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + unistUtilVisitParents$o(tree, test, overload, reverse); + + function overload(node, parents) { + var parent = parents[parents.length - 1]; + var index = parent ? parent.children.indexOf(node) : null; + return visitor(node, index, parent) + } +} + +var remarkLintFinalDefinition = unifiedLintRule('remark-lint:final-definition', finalDefinition); + +var start$c = unistUtilPosition.start; + +function finalDefinition(tree, file) { + var last = null; + + unistUtilVisit$o(tree, visitor, true); + + function visitor(node) { + var line = start$c(node).line; + + // Ignore generated nodes. + if (node.type === 'root' || unistUtilGenerated(node)) { + return + } + + if (node.type === 'definition') { + if (last !== null && last > line) { + file.message( + 'Move definitions to the end of the file (after the node at line `' + + last + + '`)', + node + ); + } + } else if (last === null) { + last = line; + } + } +} + +var convert_1$p = convert$q; + +function convert$q(test) { + if (typeof test === 'string') { + return typeFactory$p(test) + } + + if (test === null || test === undefined) { + return ok$q + } + + if (typeof test === 'object') { + return ('length' in test ? anyFactory$p : matchesFactory$p)(test) + } + + if (typeof test === 'function') { + return test + } + + throw new Error('Expected function, string, or object as test') +} + +function convertAll$p(tests) { + var results = []; + var length = tests.length; + var index = -1; + + while (++index < length) { + results[index] = convert$q(tests[index]); + } + + return results +} + +// Utility assert each property in `test` is represented in `node`, and each +// values are strictly equal. +function matchesFactory$p(test) { + return matches + + function matches(node) { + var key; + + for (key in test) { + if (node[key] !== test[key]) { + return false + } + } + + return true + } +} + +function anyFactory$p(tests) { + var checks = convertAll$p(tests); + var length = checks.length; + + return matches + + function matches() { + var index = -1; + + while (++index < length) { + if (checks[index].apply(this, arguments)) { + return true + } + } + + return false + } +} + +// Utility to convert a string into a function which checks a given node’s type +// for said string. +function typeFactory$p(test) { + return type + + function type(node) { + return Boolean(node && node.type === test) + } +} + +// Utility to return true. +function ok$q() { + return true +} + +var unistUtilVisitParents$p = visitParents$p; + + + +var CONTINUE$O = true; +var SKIP$O = 'skip'; +var EXIT$O = false; + +visitParents$p.CONTINUE = CONTINUE$O; +visitParents$p.SKIP = SKIP$O; +visitParents$p.EXIT = EXIT$O; + +function visitParents$p(tree, test, visitor, reverse) { + var is; + + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + is = convert_1$p(test); + + one(tree, null, []); + + // Visit a single node. + function one(node, index, parents) { + var result = []; + var subresult; + + if (!test || is(node, index, parents[parents.length - 1] || null)) { + result = toResult$p(visitor(node, parents)); + + if (result[0] === EXIT$O) { + return result + } + } + + if (node.children && result[0] !== SKIP$O) { + subresult = toResult$p(all(node.children, parents.concat(node))); + return subresult[0] === EXIT$O ? subresult : result + } + + return result + } + + // Visit children in `parent`. + function all(children, parents) { + var min = -1; + var step = reverse ? -1 : 1; + var index = (reverse ? children.length : min) + step; + var result; + + while (index > min && index < children.length) { + result = one(children[index], index, parents); + + if (result[0] === EXIT$O) { + return result + } + + index = typeof result[1] === 'number' ? result[1] : index + step; + } + } +} + +function toResult$p(value) { + if (value !== null && typeof value === 'object' && 'length' in value) { + return value + } + + if (typeof value === 'number') { + return [CONTINUE$O, value] + } + + return [value] +} + +var unistUtilVisit$p = visit$p; + + + +var CONTINUE$P = unistUtilVisitParents$p.CONTINUE; +var SKIP$P = unistUtilVisitParents$p.SKIP; +var EXIT$P = unistUtilVisitParents$p.EXIT; + +visit$p.CONTINUE = CONTINUE$P; +visit$p.SKIP = SKIP$P; +visit$p.EXIT = EXIT$P; + +function visit$p(tree, test, visitor, reverse) { + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + unistUtilVisitParents$p(tree, test, overload, reverse); + + function overload(node, parents) { + var parent = parents[parents.length - 1]; + var index = parent ? parent.children.indexOf(node) : null; + return visitor(node, index, parent) + } +} + +var remarkLintFirstHeadingLevel = unifiedLintRule('remark-lint:first-heading-level', firstHeadingLevel); + +var re$3 = / min && index < children.length) { + result = one(children[index], index, parents); + + if (result[0] === EXIT$Q) { + return result + } + + index = typeof result[1] === 'number' ? result[1] : index + step; + } + } +} + +function toResult$q(value) { + if (value !== null && typeof value === 'object' && 'length' in value) { + return value + } + + if (typeof value === 'number') { + return [CONTINUE$Q, value] + } + + return [value] +} + +var unistUtilVisit$q = visit$q; + + + +var CONTINUE$R = unistUtilVisitParents$q.CONTINUE; +var SKIP$R = unistUtilVisitParents$q.SKIP; +var EXIT$R = unistUtilVisitParents$q.EXIT; + +visit$q.CONTINUE = CONTINUE$R; +visit$q.SKIP = SKIP$R; +visit$q.EXIT = EXIT$R; + +function visit$q(tree, test, visitor, reverse) { + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + unistUtilVisitParents$q(tree, test, overload, reverse); + + function overload(node, parents) { + var parent = parents[parents.length - 1]; + var index = parent ? parent.children.indexOf(node) : null; + return visitor(node, index, parent) + } +} + +var remarkLintHeadingStyle = unifiedLintRule('remark-lint:heading-style', headingStyle); + +var types$2 = ['atx', 'atx-closed', 'setext']; + +function headingStyle(tree, file, option) { + var preferred = types$2.indexOf(option) === -1 ? null : option; + + unistUtilVisit$q(tree, 'heading', visitor); + + function visitor(node) { + if (!unistUtilGenerated(node)) { + if (preferred) { + if (mdastUtilHeadingStyle(node, preferred) !== preferred) { + file.message('Headings should use ' + preferred, node); + } + } else { + preferred = mdastUtilHeadingStyle(node, preferred); + } + } + } +} + +var convert_1$r = convert$s; + +function convert$s(test) { + if (typeof test === 'string') { + return typeFactory$r(test) + } + + if (test === null || test === undefined) { + return ok$s + } + + if (typeof test === 'object') { + return ('length' in test ? anyFactory$r : matchesFactory$r)(test) + } + + if (typeof test === 'function') { + return test + } + + throw new Error('Expected function, string, or object as test') +} + +function convertAll$r(tests) { + var results = []; + var length = tests.length; + var index = -1; + + while (++index < length) { + results[index] = convert$s(tests[index]); + } + + return results +} + +// Utility assert each property in `test` is represented in `node`, and each +// values are strictly equal. +function matchesFactory$r(test) { + return matches + + function matches(node) { + var key; + + for (key in test) { + if (node[key] !== test[key]) { + return false + } + } + + return true + } +} + +function anyFactory$r(tests) { + var checks = convertAll$r(tests); + var length = checks.length; + + return matches + + function matches() { + var index = -1; + + while (++index < length) { + if (checks[index].apply(this, arguments)) { + return true + } + } + + return false + } +} + +// Utility to convert a string into a function which checks a given node’s type +// for said string. +function typeFactory$r(test) { + return type + + function type(node) { + return Boolean(node && node.type === test) + } +} + +// Utility to return true. +function ok$s() { + return true +} + +var unistUtilVisitParents$r = visitParents$r; + + + +var CONTINUE$S = true; +var SKIP$S = 'skip'; +var EXIT$S = false; + +visitParents$r.CONTINUE = CONTINUE$S; +visitParents$r.SKIP = SKIP$S; +visitParents$r.EXIT = EXIT$S; + +function visitParents$r(tree, test, visitor, reverse) { + var is; + + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + is = convert_1$r(test); + + one(tree, null, []); + + // Visit a single node. + function one(node, index, parents) { + var result = []; + var subresult; + + if (!test || is(node, index, parents[parents.length - 1] || null)) { + result = toResult$r(visitor(node, parents)); + + if (result[0] === EXIT$S) { + return result + } + } + + if (node.children && result[0] !== SKIP$S) { + subresult = toResult$r(all(node.children, parents.concat(node))); + return subresult[0] === EXIT$S ? subresult : result + } + + return result + } + + // Visit children in `parent`. + function all(children, parents) { + var min = -1; + var step = reverse ? -1 : 1; + var index = (reverse ? children.length : min) + step; + var result; + + while (index > min && index < children.length) { + result = one(children[index], index, parents); + + if (result[0] === EXIT$S) { + return result + } + + index = typeof result[1] === 'number' ? result[1] : index + step; + } + } +} + +function toResult$r(value) { + if (value !== null && typeof value === 'object' && 'length' in value) { + return value + } + + if (typeof value === 'number') { + return [CONTINUE$S, value] + } + + return [value] +} + +var unistUtilVisit$r = visit$r; + + + +var CONTINUE$T = unistUtilVisitParents$r.CONTINUE; +var SKIP$T = unistUtilVisitParents$r.SKIP; +var EXIT$T = unistUtilVisitParents$r.EXIT; + +visit$r.CONTINUE = CONTINUE$T; +visit$r.SKIP = SKIP$T; +visit$r.EXIT = EXIT$T; + +function visit$r(tree, test, visitor, reverse) { + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + unistUtilVisitParents$r(tree, test, overload, reverse); + + function overload(node, parents) { + var parent = parents[parents.length - 1]; + var index = parent ? parent.children.indexOf(node) : null; + return visitor(node, index, parent) + } +} + +var remarkLintMaximumLineLength = unifiedLintRule('remark-lint:maximum-line-length', maximumLineLength); + +var start$d = unistUtilPosition.start; +var end$8 = unistUtilPosition.end; + +function maximumLineLength(tree, file, option) { + var preferred = typeof option === 'number' && !isNaN(option) ? option : 80; + var content = String(file); + var lines = content.split(/\r?\n/); + var length = lines.length; + var index = -1; + var lineLength; + + // Note: JSX is from MDX: . + unistUtilVisit$r(tree, ['heading', 'table', 'code', 'definition', 'html', 'jsx'], ignore); + unistUtilVisit$r(tree, ['link', 'image', 'inlineCode'], inline); + + // Iterate over every line, and warn for violating lines. + while (++index < length) { + lineLength = lines[index].length; + + if (lineLength > preferred) { + file.message('Line must be at most ' + preferred + ' characters', { + line: index + 1, + column: lineLength + 1 + }); + } + } + + // Finally, whitelist some inline spans, but only if they occur at or after + // the wrap. + // However, when they do, and there’s whitespace after it, they are not + // whitelisted. + function inline(node, pos, parent) { + var next = parent.children[pos + 1]; + var initial; + var final; + + /* istanbul ignore if - Nothing to whitelist when generated. */ + if (unistUtilGenerated(node)) { + return + } + + initial = start$d(node); + final = end$8(node); + + // No whitelisting when starting after the border, or ending before it. + if (initial.column > preferred || final.column < preferred) { + return + } + + // No whitelisting when there’s whitespace after the link. + if ( + next && + start$d(next).line === initial.line && + (!next.value || /^(.+?[ \t].+?)/.test(next.value)) + ) { + return + } + + whitelist(initial.line - 1, final.line); + } + + function ignore(node) { + /* istanbul ignore else - Hard to test, as we only run this case on `position: true` */ + if (!unistUtilGenerated(node)) { + whitelist(start$d(node).line - 1, end$8(node).line); + } + } + + // Whitelist from `initial` to `final`, zero-based. + function whitelist(initial, final) { + while (initial < final) { + lines[initial++] = ''; + } + } +} + +var convert_1$s = convert$t; + +function convert$t(test) { + if (typeof test === 'string') { + return typeFactory$s(test) + } + + if (test === null || test === undefined) { + return ok$t + } + + if (typeof test === 'object') { + return ('length' in test ? anyFactory$s : matchesFactory$s)(test) + } + + if (typeof test === 'function') { + return test + } + + throw new Error('Expected function, string, or object as test') +} + +function convertAll$s(tests) { + var results = []; + var length = tests.length; + var index = -1; + + while (++index < length) { + results[index] = convert$t(tests[index]); + } + + return results +} + +// Utility assert each property in `test` is represented in `node`, and each +// values are strictly equal. +function matchesFactory$s(test) { + return matches + + function matches(node) { + var key; + + for (key in test) { + if (node[key] !== test[key]) { + return false + } + } + + return true + } +} + +function anyFactory$s(tests) { + var checks = convertAll$s(tests); + var length = checks.length; + + return matches + + function matches() { + var index = -1; + + while (++index < length) { + if (checks[index].apply(this, arguments)) { + return true + } + } + + return false + } +} + +// Utility to convert a string into a function which checks a given node’s type +// for said string. +function typeFactory$s(test) { + return type + + function type(node) { + return Boolean(node && node.type === test) + } +} + +// Utility to return true. +function ok$t() { + return true +} + +var unistUtilVisitParents$s = visitParents$s; + + + +var CONTINUE$U = true; +var SKIP$U = 'skip'; +var EXIT$U = false; + +visitParents$s.CONTINUE = CONTINUE$U; +visitParents$s.SKIP = SKIP$U; +visitParents$s.EXIT = EXIT$U; + +function visitParents$s(tree, test, visitor, reverse) { + var is; + + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + is = convert_1$s(test); + + one(tree, null, []); + + // Visit a single node. + function one(node, index, parents) { + var result = []; + var subresult; + + if (!test || is(node, index, parents[parents.length - 1] || null)) { + result = toResult$s(visitor(node, parents)); + + if (result[0] === EXIT$U) { + return result + } + } + + if (node.children && result[0] !== SKIP$U) { + subresult = toResult$s(all(node.children, parents.concat(node))); + return subresult[0] === EXIT$U ? subresult : result + } + + return result + } + + // Visit children in `parent`. + function all(children, parents) { + var min = -1; + var step = reverse ? -1 : 1; + var index = (reverse ? children.length : min) + step; + var result; + + while (index > min && index < children.length) { + result = one(children[index], index, parents); + + if (result[0] === EXIT$U) { + return result + } + + index = typeof result[1] === 'number' ? result[1] : index + step; + } + } +} + +function toResult$s(value) { + if (value !== null && typeof value === 'object' && 'length' in value) { + return value + } + + if (typeof value === 'number') { + return [CONTINUE$U, value] + } + + return [value] +} + +var unistUtilVisit$s = visit$s; + + + +var CONTINUE$V = unistUtilVisitParents$s.CONTINUE; +var SKIP$V = unistUtilVisitParents$s.SKIP; +var EXIT$V = unistUtilVisitParents$s.EXIT; + +visit$s.CONTINUE = CONTINUE$V; +visit$s.SKIP = SKIP$V; +visit$s.EXIT = EXIT$V; + +function visit$s(tree, test, visitor, reverse) { + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + unistUtilVisitParents$s(tree, test, overload, reverse); + + function overload(node, parents) { + var parent = parents[parents.length - 1]; + var index = parent ? parent.children.indexOf(node) : null; + return visitor(node, index, parent) + } +} + +var remarkLintNoConsecutiveBlankLines = unifiedLintRule( + 'remark-lint:no-consecutive-blank-lines', + noConsecutiveBlankLines +); + +function noConsecutiveBlankLines(tree, file) { + unistUtilVisit$s(tree, visitor); + + function visitor(node) { + var children = node.children; + var head; + var tail; + + if (!unistUtilGenerated(node) && children) { + head = children[0]; + + if (head && !unistUtilGenerated(head)) { + // Compare parent and first child. + compare(unistUtilPosition.start(node), unistUtilPosition.start(head), 0); + + // Compare between each child. + children.forEach(visitChild); + + tail = children[children.length - 1]; + + // Compare parent and last child. + if (tail !== head && !unistUtilGenerated(tail)) { + compare(unistUtilPosition.end(node), unistUtilPosition.end(tail), 1); + } + } + } + } + + // Compare the difference between `start` and `end`, and warn when that + // difference exceeds `max`. + function compare(start, end, max) { + var diff = end.line - start.line; + var lines = Math.abs(diff) - max; + var reason; + + if (lines > 0) { + reason = + 'Remove ' + + lines + + ' ' + + pluralize('line', Math.abs(lines)) + + ' ' + + (diff > 0 ? 'before' : 'after') + + ' node'; + + file.message(reason, end); + } + } + + function visitChild(child, index, all) { + var previous = all[index - 1]; + var max = 2; + + if (previous && !unistUtilGenerated(previous) && !unistUtilGenerated(child)) { + if ( + (previous.type === 'list' && child.type === 'list') || + (child.type === 'code' && previous.type === 'list' && !child.lang) + ) { + max++; + } + + compare(unistUtilPosition.end(previous), unistUtilPosition.start(child), max); + } + } +} + +var remarkLintNoFileNameArticles = unifiedLintRule('remark-lint:no-file-name-articles', noFileNameArticles); + +function noFileNameArticles(tree, file) { + var match = file.stem && file.stem.match(/^(the|teh|an?)\b/i); + + if (match) { + file.message('Do not start file names with `' + match[0] + '`'); + } +} + +var remarkLintNoFileNameConsecutiveDashes = unifiedLintRule( + 'remark-lint:no-file-name-consecutive-dashes', + noFileNameConsecutiveDashes +); + +var reason$b = 'Do not use consecutive dashes in a file name'; + +function noFileNameConsecutiveDashes(tree, file) { + if (file.stem && /-{2,}/.test(file.stem)) { + file.message(reason$b); + } +} + +var remarkLintNoFileNameOuterDashes = unifiedLintRule( + 'remark-lint:no-file-name-outer-dashes', + noFileNameOuterDashes +); + +var reason$c = 'Do not use initial or final dashes in a file name'; + +function noFileNameOuterDashes(tree, file) { + if (file.stem && /^-|-$/.test(file.stem)) { + file.message(reason$c); + } +} + +var convert_1$t = convert$u; + +function convert$u(test) { + if (typeof test === 'string') { + return typeFactory$t(test) + } + + if (test === null || test === undefined) { + return ok$u + } + + if (typeof test === 'object') { + return ('length' in test ? anyFactory$t : matchesFactory$t)(test) + } + + if (typeof test === 'function') { + return test + } + + throw new Error('Expected function, string, or object as test') +} + +function convertAll$t(tests) { + var results = []; + var length = tests.length; + var index = -1; + + while (++index < length) { + results[index] = convert$u(tests[index]); + } + + return results +} + +// Utility assert each property in `test` is represented in `node`, and each +// values are strictly equal. +function matchesFactory$t(test) { + return matches + + function matches(node) { + var key; + + for (key in test) { + if (node[key] !== test[key]) { + return false + } + } + + return true + } +} + +function anyFactory$t(tests) { + var checks = convertAll$t(tests); + var length = checks.length; + + return matches + + function matches() { + var index = -1; + + while (++index < length) { + if (checks[index].apply(this, arguments)) { + return true + } + } + + return false + } +} + +// Utility to convert a string into a function which checks a given node’s type +// for said string. +function typeFactory$t(test) { + return type + + function type(node) { + return Boolean(node && node.type === test) + } +} + +// Utility to return true. +function ok$u() { + return true +} + +var unistUtilVisitParents$t = visitParents$t; + + + +var CONTINUE$W = true; +var SKIP$W = 'skip'; +var EXIT$W = false; + +visitParents$t.CONTINUE = CONTINUE$W; +visitParents$t.SKIP = SKIP$W; +visitParents$t.EXIT = EXIT$W; + +function visitParents$t(tree, test, visitor, reverse) { + var is; + + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + is = convert_1$t(test); + + one(tree, null, []); + + // Visit a single node. + function one(node, index, parents) { + var result = []; + var subresult; + + if (!test || is(node, index, parents[parents.length - 1] || null)) { + result = toResult$t(visitor(node, parents)); + + if (result[0] === EXIT$W) { + return result + } + } + + if (node.children && result[0] !== SKIP$W) { + subresult = toResult$t(all(node.children, parents.concat(node))); + return subresult[0] === EXIT$W ? subresult : result + } + + return result + } + + // Visit children in `parent`. + function all(children, parents) { + var min = -1; + var step = reverse ? -1 : 1; + var index = (reverse ? children.length : min) + step; + var result; + + while (index > min && index < children.length) { + result = one(children[index], index, parents); + + if (result[0] === EXIT$W) { + return result + } + + index = typeof result[1] === 'number' ? result[1] : index + step; + } + } +} + +function toResult$t(value) { + if (value !== null && typeof value === 'object' && 'length' in value) { + return value + } + + if (typeof value === 'number') { + return [CONTINUE$W, value] + } + + return [value] +} + +var unistUtilVisit$t = visit$t; + + + +var CONTINUE$X = unistUtilVisitParents$t.CONTINUE; +var SKIP$X = unistUtilVisitParents$t.SKIP; +var EXIT$X = unistUtilVisitParents$t.EXIT; + +visit$t.CONTINUE = CONTINUE$X; +visit$t.SKIP = SKIP$X; +visit$t.EXIT = EXIT$X; + +function visit$t(tree, test, visitor, reverse) { + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + unistUtilVisitParents$t(tree, test, overload, reverse); + + function overload(node, parents) { + var parent = parents[parents.length - 1]; + var index = parent ? parent.children.indexOf(node) : null; + return visitor(node, index, parent) + } +} + +var remarkLintNoHeadingIndent = unifiedLintRule('remark-lint:no-heading-indent', noHeadingIndent); + +var start$e = unistUtilPosition.start; + +function noHeadingIndent(tree, file) { + var contents = String(file); + var length = contents.length; + + unistUtilVisit$t(tree, 'heading', visitor); + + function visitor(node) { + var initial; + var begin; + var index; + var character; + var diff; + + if (unistUtilGenerated(node)) { + return + } + + initial = start$e(node); + begin = initial.offset; + index = begin - 1; + + while (++index < length) { + character = contents.charAt(index); + + if (character !== ' ' && character !== '\t') { + break + } + } + + diff = index - begin; + + if (diff) { + file.message( + 'Remove ' + diff + ' ' + pluralize('space', diff) + ' before this heading', + { + line: initial.line, + column: initial.column + diff + } + ); + } + } +} + +var convert_1$u = convert$v; + +function convert$v(test) { + if (typeof test === 'string') { + return typeFactory$u(test) + } + + if (test === null || test === undefined) { + return ok$v + } + + if (typeof test === 'object') { + return ('length' in test ? anyFactory$u : matchesFactory$u)(test) + } + + if (typeof test === 'function') { + return test + } + + throw new Error('Expected function, string, or object as test') +} + +function convertAll$u(tests) { + var results = []; + var length = tests.length; + var index = -1; + + while (++index < length) { + results[index] = convert$v(tests[index]); + } + + return results +} + +// Utility assert each property in `test` is represented in `node`, and each +// values are strictly equal. +function matchesFactory$u(test) { + return matches + + function matches(node) { + var key; + + for (key in test) { + if (node[key] !== test[key]) { + return false + } + } + + return true + } +} + +function anyFactory$u(tests) { + var checks = convertAll$u(tests); + var length = checks.length; - /* istanbul ignore else - just for safety */ - if (character !== ' ' && character !== '\t') { - file.message(reason$1, pos); - break - } + return matches + + function matches() { + var index = -1; + + while (++index < length) { + if (checks[index].apply(this, arguments)) { + return true } } + + return false } } -var remarkLintNoLiteralUrls = unifiedLintRule('remark-lint:no-literal-urls', noLiteralURLs); +// Utility to convert a string into a function which checks a given node’s type +// for said string. +function typeFactory$u(test) { + return type -var start$5 = unistUtilPosition.start; -var end$2 = unistUtilPosition.end; -var mailto$3 = 'mailto:'; -var reason$2 = 'Don’t use literal URLs without angle brackets'; + function type(node) { + return Boolean(node && node.type === test) + } +} -function noLiteralURLs(tree, file) { - unistUtilVisit(tree, 'link', visitor); +// Utility to return true. +function ok$v() { + return true +} - function visitor(node) { - var children = node.children; - var value = mdastUtilToString(node); +var unistUtilVisitParents$u = visitParents$u; - if ( - !unistUtilGenerated(node) && - start$5(node).column === start$5(children[0]).column && - end$2(node).column === end$2(children[children.length - 1]).column && - (node.url === mailto$3 + value || node.url === value) - ) { - file.message(reason$2, node); + + +var CONTINUE$Y = true; +var SKIP$Y = 'skip'; +var EXIT$Y = false; + +visitParents$u.CONTINUE = CONTINUE$Y; +visitParents$u.SKIP = SKIP$Y; +visitParents$u.EXIT = EXIT$Y; + +function visitParents$u(tree, test, visitor, reverse) { + var is; + + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + is = convert_1$u(test); + + one(tree, null, []); + + // Visit a single node. + function one(node, index, parents) { + var result = []; + var subresult; + + if (!test || is(node, index, parents[parents.length - 1] || null)) { + result = toResult$u(visitor(node, parents)); + + if (result[0] === EXIT$Y) { + return result + } + } + + if (node.children && result[0] !== SKIP$Y) { + subresult = toResult$u(all(node.children, parents.concat(node))); + return subresult[0] === EXIT$Y ? subresult : result + } + + return result + } + + // Visit children in `parent`. + function all(children, parents) { + var min = -1; + var step = reverse ? -1 : 1; + var index = (reverse ? children.length : min) + step; + var result; + + while (index > min && index < children.length) { + result = one(children[index], index, parents); + + if (result[0] === EXIT$Y) { + return result + } + + index = typeof result[1] === 'number' ? result[1] : index + step; } } } -var remarkLintOrderedListMarkerStyle = unifiedLintRule( - 'remark-lint:ordered-list-marker-style', - orderedListMarkerStyle -); +function toResult$u(value) { + if (value !== null && typeof value === 'object' && 'length' in value) { + return value + } -var start$6 = unistUtilPosition.start; + if (typeof value === 'number') { + return [CONTINUE$Y, value] + } -var styles$1 = { - ')': true, - '.': true, - null: true -}; + return [value] +} -function orderedListMarkerStyle(tree, file, pref) { - var contents = String(file); +var unistUtilVisit$u = visit$u; - pref = typeof pref !== 'string' || pref === 'consistent' ? null : pref; - if (styles$1[pref] !== true) { - file.fail( - 'Invalid ordered list-item marker style `' + - pref + - "`: use either `'.'` or `')'`" - ); + +var CONTINUE$Z = unistUtilVisitParents$u.CONTINUE; +var SKIP$Z = unistUtilVisitParents$u.SKIP; +var EXIT$Z = unistUtilVisitParents$u.EXIT; + +visit$u.CONTINUE = CONTINUE$Z; +visit$u.SKIP = SKIP$Z; +visit$u.EXIT = EXIT$Z; + +function visit$u(tree, test, visitor, reverse) { + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + unistUtilVisitParents$u(tree, test, overload, reverse); + + function overload(node, parents) { + var parent = parents[parents.length - 1]; + var index = parent ? parent.children.indexOf(node) : null; + return visitor(node, index, parent) } +} + +var start$f = unistUtilPosition.start; - unistUtilVisit(tree, 'list', visitor); + + +var remarkLintNoMultipleToplevelHeadings = unifiedLintRule( + 'remark-lint:no-multiple-toplevel-headings', + noMultipleToplevelHeadings +); + +function noMultipleToplevelHeadings(tree, file, option) { + var preferred = option || 1; + var duplicate; + + unistUtilVisit$u(tree, 'heading', visitor); function visitor(node) { - var children = node.children; - var length = node.ordered ? children.length : 0; - var index = -1; - var marker; - var child; + if (!unistUtilGenerated(node) && node.depth === preferred) { + if (duplicate) { + file.message( + 'Don’t use multiple top level headings (' + duplicate + ')', + node + ); + } else { + duplicate = unistUtilStringifyPosition(start$f(node)); + } + } + } +} - while (++index < length) { - child = children[index]; +var convert_1$v = convert$w; - if (!unistUtilGenerated(child)) { - marker = contents - .slice(start$6(child).offset, start$6(child.children[0]).offset) - .replace(/\s|\d/g, '') - .replace(/\[[x ]?]\s*$/i, ''); +function convert$w(test) { + if (typeof test === 'string') { + return typeFactory$v(test) + } - if (pref) { - if (marker !== pref) { - file.message('Marker style should be `' + pref + '`', child); - } - } else { - pref = marker; - } + if (test === null || test === undefined) { + return ok$w + } + + if (typeof test === 'object') { + return ('length' in test ? anyFactory$v : matchesFactory$v)(test) + } + + if (typeof test === 'function') { + return test + } + + throw new Error('Expected function, string, or object as test') +} + +function convertAll$v(tests) { + var results = []; + var length = tests.length; + var index = -1; + + while (++index < length) { + results[index] = convert$w(tests[index]); + } + + return results +} + +// Utility assert each property in `test` is represented in `node`, and each +// values are strictly equal. +function matchesFactory$v(test) { + return matches + + function matches(node) { + var key; + + for (key in test) { + if (node[key] !== test[key]) { + return false } } + + return true } } -var remarkLintHardBreakSpaces = unifiedLintRule('remark-lint:hard-break-spaces', hardBreakSpaces); +function anyFactory$v(tests) { + var checks = convertAll$v(tests); + var length = checks.length; -var reason$3 = 'Use two spaces for hard line breaks'; + return matches -function hardBreakSpaces(tree, file) { - var contents = String(file); + function matches() { + var index = -1; - unistUtilVisit(tree, 'break', visitor); + while (++index < length) { + if (checks[index].apply(this, arguments)) { + return true + } + } - function visitor(node) { - var value; + return false + } +} - if (!unistUtilGenerated(node)) { - value = contents - .slice(unistUtilPosition.start(node).offset, unistUtilPosition.end(node).offset) - .split('\n', 1)[0] - .replace(/\r$/, ''); +// Utility to convert a string into a function which checks a given node’s type +// for said string. +function typeFactory$v(test) { + return type - if (value.length > 2) { - file.message(reason$3, node); + function type(node) { + return Boolean(node && node.type === test) + } +} + +// Utility to return true. +function ok$w() { + return true +} + +var unistUtilVisitParents$v = visitParents$v; + + + +var CONTINUE$_ = true; +var SKIP$_ = 'skip'; +var EXIT$_ = false; + +visitParents$v.CONTINUE = CONTINUE$_; +visitParents$v.SKIP = SKIP$_; +visitParents$v.EXIT = EXIT$_; + +function visitParents$v(tree, test, visitor, reverse) { + var is; + + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + is = convert_1$v(test); + + one(tree, null, []); + + // Visit a single node. + function one(node, index, parents) { + var result = []; + var subresult; + + if (!test || is(node, index, parents[parents.length - 1] || null)) { + result = toResult$v(visitor(node, parents)); + + if (result[0] === EXIT$_) { + return result + } + } + + if (node.children && result[0] !== SKIP$_) { + subresult = toResult$v(all(node.children, parents.concat(node))); + return subresult[0] === EXIT$_ ? subresult : result + } + + return result + } + + // Visit children in `parent`. + function all(children, parents) { + var min = -1; + var step = reverse ? -1 : 1; + var index = (reverse ? children.length : min) + step; + var result; + + while (index > min && index < children.length) { + result = one(children[index], index, parents); + + if (result[0] === EXIT$_) { + return result } + + index = typeof result[1] === 'number' ? result[1] : index + step; } } } -var remarkLintNoDuplicateDefinitions = unifiedLintRule( - 'remark-lint:no-duplicate-definitions', - noDuplicateDefinitions -); +function toResult$v(value) { + if (value !== null && typeof value === 'object' && 'length' in value) { + return value + } -var reason$4 = 'Do not use definitions with the same identifier'; + if (typeof value === 'number') { + return [CONTINUE$_, value] + } -function noDuplicateDefinitions(tree, file) { - var map = {}; + return [value] +} - unistUtilVisit(tree, ['definition', 'footnoteDefinition'], validate); +var unistUtilVisit$v = visit$v; - function validate(node) { - var identifier; - var duplicate; - if (!unistUtilGenerated(node)) { - identifier = node.identifier; - duplicate = map[identifier]; - if (duplicate && duplicate.type) { - file.message( - reason$4 + ' (' + unistUtilStringifyPosition(unistUtilPosition.start(duplicate)) + ')', - node - ); +var CONTINUE$$ = unistUtilVisitParents$v.CONTINUE; +var SKIP$$ = unistUtilVisitParents$v.SKIP; +var EXIT$$ = unistUtilVisitParents$v.EXIT; + +visit$v.CONTINUE = CONTINUE$$; +visit$v.SKIP = SKIP$$; +visit$v.EXIT = EXIT$$; + +function visit$v(tree, test, visitor, reverse) { + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + unistUtilVisitParents$v(tree, test, overload, reverse); + + function overload(node, parents) { + var parent = parents[parents.length - 1]; + var index = parent ? parent.children.indexOf(node) : null; + return visitor(node, index, parent) + } +} + +var remarkLintNoShellDollars = unifiedLintRule('remark-lint:no-shell-dollars', noShellDollars); + +var reason$d = 'Do not use dollar signs before shell commands'; + +// List of shell script file extensions (also used as code flags for syntax +// highlighting on GitHub): +// See: +var flags = [ + 'sh', + 'bash', + 'bats', + 'cgi', + 'command', + 'fcgi', + 'ksh', + 'tmux', + 'tool', + 'zsh' +]; + +function noShellDollars(tree, file) { + unistUtilVisit$v(tree, 'code', visitor); + + function visitor(node) { + var lines; + var line; + var length; + var index; + + // Check both known shell code and unknown code. + if (!unistUtilGenerated(node) && node.lang && flags.indexOf(node.lang) !== -1) { + lines = node.value.split('\n'); + length = lines.length; + index = -1; + + if (length <= 1) { + return } - map[identifier] = node; + while (++index < length) { + line = lines[index]; + + if (line.trim() && !line.match(/^\s*\$\s*/)) { + return + } + } + + file.message(reason$d, node); } } } -var mdastUtilHeadingStyle = style; +var convert_1$w = convert$x; -function style(node, relative) { - var last = node.children[node.children.length - 1]; - var depth = node.depth; - var pos = node && node.position && node.position.end; - var final = last && last.position && last.position.end; +function convert$x(test) { + if (typeof test === 'string') { + return typeFactory$w(test) + } - if (!pos) { - return null + if (test === null || test === undefined) { + return ok$x } - // This can only occur for `'atx'` and `'atx-closed'` headings. - // This might incorrectly match `'atx'` headings with lots of trailing white - // space as an `'atx-closed'` heading. - if (!last) { - if (pos.column - 1 <= depth * 2) { - return consolidate(depth, relative) + if (typeof test === 'object') { + return ('length' in test ? anyFactory$w : matchesFactory$w)(test) + } + + if (typeof test === 'function') { + return test + } + + throw new Error('Expected function, string, or object as test') +} + +function convertAll$w(tests) { + var results = []; + var length = tests.length; + var index = -1; + + while (++index < length) { + results[index] = convert$x(tests[index]); + } + + return results +} + +// Utility assert each property in `test` is represented in `node`, and each +// values are strictly equal. +function matchesFactory$w(test) { + return matches + + function matches(node) { + var key; + + for (key in test) { + if (node[key] !== test[key]) { + return false + } } - return 'atx-closed' + return true } +} - if (final.line + 1 === pos.line) { - return 'setext' +function anyFactory$w(tests) { + var checks = convertAll$w(tests); + var length = checks.length; + + return matches + + function matches() { + var index = -1; + + while (++index < length) { + if (checks[index].apply(this, arguments)) { + return true + } + } + + return false } +} - if (final.column + depth < pos.column) { - return 'atx-closed' +// Utility to convert a string into a function which checks a given node’s type +// for said string. +function typeFactory$w(test) { + return type + + function type(node) { + return Boolean(node && node.type === test) } +} - return consolidate(depth, relative) +// Utility to return true. +function ok$x() { + return true } -// Get the probable style of an atx-heading, depending on preferred style. -function consolidate(depth, relative) { - return depth < 3 - ? 'atx' - : relative === 'atx' || relative === 'setext' - ? relative - : null +var unistUtilVisitParents$w = visitParents$w; + + + +var CONTINUE$10 = true; +var SKIP$10 = 'skip'; +var EXIT$10 = false; + +visitParents$w.CONTINUE = CONTINUE$10; +visitParents$w.SKIP = SKIP$10; +visitParents$w.EXIT = EXIT$10; + +function visitParents$w(tree, test, visitor, reverse) { + var is; + + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + is = convert_1$w(test); + + one(tree, null, []); + + // Visit a single node. + function one(node, index, parents) { + var result = []; + var subresult; + + if (!test || is(node, index, parents[parents.length - 1] || null)) { + result = toResult$w(visitor(node, parents)); + + if (result[0] === EXIT$10) { + return result + } + } + + if (node.children && result[0] !== SKIP$10) { + subresult = toResult$w(all(node.children, parents.concat(node))); + return subresult[0] === EXIT$10 ? subresult : result + } + + return result + } + + // Visit children in `parent`. + function all(children, parents) { + var min = -1; + var step = reverse ? -1 : 1; + var index = (reverse ? children.length : min) + step; + var result; + + while (index > min && index < children.length) { + result = one(children[index], index, parents); + + if (result[0] === EXIT$10) { + return result + } + + index = typeof result[1] === 'number' ? result[1] : index + step; + } + } } -var remarkLintNoHeadingContentIndent = unifiedLintRule( - 'remark-lint:no-heading-content-indent', - noHeadingContentIndent -); +function toResult$w(value) { + if (value !== null && typeof value === 'object' && 'length' in value) { + return value + } -var start$7 = unistUtilPosition.start; -var end$3 = unistUtilPosition.end; + if (typeof value === 'number') { + return [CONTINUE$10, value] + } -function noHeadingContentIndent(tree, file) { - var contents = String(file); + return [value] +} - unistUtilVisit(tree, 'heading', visitor); +var unistUtilVisit$w = visit$w; - function visitor(node) { - var depth; - var children; - var type; - var head; - var initial; - var final; - var diff; - var index; - var char; - var reason; - if (unistUtilGenerated(node)) { - return - } - depth = node.depth; - children = node.children; - type = mdastUtilHeadingStyle(node, 'atx'); +var CONTINUE$11 = unistUtilVisitParents$w.CONTINUE; +var SKIP$11 = unistUtilVisitParents$w.SKIP; +var EXIT$11 = unistUtilVisitParents$w.EXIT; - if (type === 'atx' || type === 'atx-closed') { - initial = start$7(node); - index = initial.offset; - char = contents.charAt(index); +visit$w.CONTINUE = CONTINUE$11; +visit$w.SKIP = SKIP$11; +visit$w.EXIT = EXIT$11; - while (char && char !== '#') { - char = contents.charAt(++index); - } +function visit$w(tree, test, visitor, reverse) { + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } - /* istanbul ignore if - CR/LF bug: remarkjs/remark#195. */ - if (!char) { - return - } + unistUtilVisitParents$w(tree, test, overload, reverse); - index = depth + (index - initial.offset); - head = start$7(children[0]).column; + function overload(node, parents) { + var parent = parents[parents.length - 1]; + var index = parent ? parent.children.indexOf(node) : null; + return visitor(node, index, parent) + } +} - // Ignore empty headings. - if (!head) { - return - } +var remarkLintNoTableIndentation = unifiedLintRule('remark-lint:no-table-indentation', noTableIndentation); - diff = head - initial.column - 1 - index; +var reason$e = 'Do not indent table rows'; - if (diff) { - reason = - (diff > 0 ? 'Remove' : 'Add') + - ' ' + - Math.abs(diff) + - ' ' + - plur('space', diff) + - ' before this heading’s content'; +function noTableIndentation(tree, file) { + var contents = String(file); - file.message(reason, start$7(children[0])); - } + unistUtilVisit$w(tree, 'table', visitor); + + function visitor(node) { + if (!unistUtilGenerated(node)) { + node.children.forEach(each); } - // Closed ATX-heading always must have a space between their content and the - // final hashes, thus, there is no `add x spaces`. - if (type === 'atx-closed') { - final = end$3(children[children.length - 1]); - diff = end$3(node).column - final.column - 1 - depth; + return unistUtilVisit$w.SKIP + } - if (diff) { - reason = - 'Remove ' + - diff + - ' ' + - plur('space', diff) + - ' after this heading’s content'; + function each(row) { + var fence = contents.slice( + unistUtilPosition.start(row).offset, + unistUtilPosition.start(row.children[0]).offset + ); - file.message(reason, final); - } + if (fence.indexOf('|') > 1) { + file.message(reason$e, row); } } } -var remarkLintNoInlinePadding = unifiedLintRule('remark-lint:no-inline-padding', noInlinePadding); - -function noInlinePadding(tree, file) { - unistUtilVisit(tree, ['emphasis', 'strong', 'delete', 'image', 'link'], visitor); - - function visitor(node) { - var contents; +var vfileLocation$6 = factory$e; - if (!unistUtilGenerated(node)) { - contents = mdastUtilToString(node); +function factory$e(file) { + var contents = indices$6(String(file)); - if ( - contents.charAt(0) === ' ' || - contents.charAt(contents.length - 1) === ' ' - ) { - file.message('Don’t pad `' + node.type + '` with inner spaces', node); - } - } + return { + toPosition: offsetToPositionFactory$6(contents), + toOffset: positionToOffsetFactory$6(contents) } } -var remarkLintNoShortcutReferenceImage = unifiedLintRule( - 'remark-lint:no-shortcut-reference-image', - noShortcutReferenceImage -); +// Factory to get the line and column-based `position` for `offset` in the bound +// indices. +function offsetToPositionFactory$6(indices) { + return offsetToPosition -var reason$5 = 'Use the trailing [] on reference images'; + // Get the line and column-based `position` for `offset` in the bound indices. + function offsetToPosition(offset) { + var index = -1; + var length = indices.length; -function noShortcutReferenceImage(tree, file) { - unistUtilVisit(tree, 'imageReference', visitor); + if (offset < 0) { + return {} + } - function visitor(node) { - if (!unistUtilGenerated(node) && node.referenceType === 'shortcut') { - file.message(reason$5, node); + while (++index < length) { + if (indices[index] > offset) { + return { + line: index + 1, + column: offset - (indices[index - 1] || 0) + 1, + offset: offset + } + } } + + return {} } } -var remarkLintNoShortcutReferenceLink = unifiedLintRule( - 'remark-lint:no-shortcut-reference-link', - noShortcutReferenceLink -); - -var reason$6 = 'Use the trailing [] on reference links'; +// Factory to get the `offset` for a line and column-based `position` in the +// bound indices. +function positionToOffsetFactory$6(indices) { + return positionToOffset -function noShortcutReferenceLink(tree, file) { - unistUtilVisit(tree, 'linkReference', visitor); + // Get the `offset` for a line and column-based `position` in the bound + // indices. + function positionToOffset(position) { + var line = position && position.line; + var column = position && position.column; - function visitor(node) { - if (!unistUtilGenerated(node) && node.referenceType === 'shortcut') { - file.message(reason$6, node); + if (!isNaN(line) && !isNaN(column) && line - 1 in indices) { + return (indices[line - 2] || 0) + column - 1 || 0 } + + return -1 } } -var remarkLintNoUndefinedReferences = unifiedLintRule( - 'remark-lint:no-undefined-references', - noUndefinedReferences -); +// Get indices of line-breaks in `value`. +function indices$6(value) { + var result = []; + var index = value.indexOf('\n'); -var reason$7 = 'Found reference to undefined definition'; + while (index !== -1) { + result.push(index + 1); + index = value.indexOf('\n', index + 1); + } -// The identifier is upcased to avoid naming collisions with properties -// inherited from `Object.prototype`. Were `Object.create(null)` to be -// used in place of `{}`, downcasing would work equally well. -function normalize$3(s) { - return collapseWhiteSpace(s.toUpperCase()) + result.push(value.length + 1); + + return result } -function noUndefinedReferences(tree, file, pref) { - var allow = - pref != null && Array.isArray(pref.allow) ? pref.allow.map(normalize$3) : []; +var remarkLintNoTabs = unifiedLintRule('remark-lint:no-tabs', noTabs); - var map = {}; +var reason$f = 'Use spaces instead of tabs'; - unistUtilVisit(tree, ['definition', 'footnoteDefinition'], mark); - unistUtilVisit(tree, ['imageReference', 'linkReference', 'footnoteReference'], find); +function noTabs(tree, file) { + var content = String(file); + var position = vfileLocation$6(file).toPosition; + var index = content.indexOf('\t'); - function mark(node) { - if (!unistUtilGenerated(node)) { - map[normalize$3(node.identifier)] = true; - } + while (index !== -1) { + file.message(reason$f, position(index)); + index = content.indexOf('\t', index + 1); } +} - function find(node) { - if ( - !( - unistUtilGenerated(node) || - allow.includes(normalize$3(node.identifier)) || - normalize$3(node.identifier) in map - ) - ) { - file.message(reason$7, node); +var remarkLintNoTrailingSpaces = unifiedLintRule('remark-lint:no-trailing-spaces', noTrailingSpaces); + +/** + * Lines that are just space characters are not present in + * the AST, which is why we loop through lines manually. + */ + +function noTrailingSpaces(ast, file) { + var lines = file.toString().split(/\r?\n/); + for (var i = 0; i < lines.length; i++) { + var currentLine = lines[i]; + var lineIndex = i + 1; + if (/\s$/.test(currentLine)) { + file.message('Remove trailing whitespace', { + position: { + start: { line: lineIndex, column: currentLine.length + 1 }, + end: { line: lineIndex } + } + }); } } } -var remarkLintNoUnusedDefinitions = unifiedLintRule('remark-lint:no-unused-definitions', noUnusedDefinitions); - -var reason$8 = 'Found unused definition'; - -function noUnusedDefinitions(tree, file) { - var map = {}; - var identifier; - var entry; +var escapeStringRegexp$1 = string => { + if (typeof string !== 'string') { + throw new TypeError('Expected a string'); + } - unistUtilVisit(tree, ['definition', 'footnoteDefinition'], find); - unistUtilVisit(tree, ['imageReference', 'linkReference', 'footnoteReference'], mark); + // Escape characters with special meaning either inside or outside character sets. + // Use a simple backslash escape when it’s always valid, and a \unnnn escape when the simpler form would be disallowed by Unicode patterns’ stricter grammar. + return string + .replace(/[|\\{}()[\]^$+*?.]/g, '\\$&') + .replace(/-/g, '\\x2d'); +}; - for (identifier in map) { - entry = map[identifier]; +var convert_1$x = convert$y; - if (!entry.used) { - file.message(reason$8, entry.node); - } +function convert$y(test) { + if (typeof test === 'string') { + return typeFactory$x(test) } - function find(node) { - if (!unistUtilGenerated(node)) { - map[node.identifier.toUpperCase()] = {node: node, used: false}; - } + if (test === null || test === undefined) { + return ok$y } - function mark(node) { - var info = map[node.identifier.toUpperCase()]; + if (typeof test === 'object') { + return ('length' in test ? anyFactory$x : matchesFactory$x)(test) + } - if (!unistUtilGenerated(node) && info) { - info.used = true; - } + if (typeof test === 'function') { + return test } -} -var plugins$1 = [ - remarkLint, - // Unix compatibility. - remarkLintFinalNewline, - // Rendering across vendors differs greatly if using other styles. - remarkLintListItemBulletIndent, - [remarkLintListItemIndent, 'tab-size'], - // Differs or unsupported across vendors. - remarkLintNoAutoLinkWithoutProtocol, - remarkLintNoBlockquoteWithoutMarker, - remarkLintNoLiteralUrls, - [remarkLintOrderedListMarkerStyle, '.'], - // Mistakes. - remarkLintHardBreakSpaces, - remarkLintNoDuplicateDefinitions, - remarkLintNoHeadingContentIndent, - remarkLintNoInlinePadding, - remarkLintNoShortcutReferenceImage, - remarkLintNoShortcutReferenceLink, - remarkLintNoUndefinedReferences, - remarkLintNoUnusedDefinitions -]; + throw new Error('Expected function, string, or object as test') +} -var remarkPresetLintRecommended = { - plugins: plugins$1 -}; +function convertAll$x(tests) { + var results = []; + var length = tests.length; + var index = -1; -var remarkLintBlockquoteIndentation = unifiedLintRule( - 'remark-lint:blockquote-indentation', - blockquoteIndentation -); + while (++index < length) { + results[index] = convert$y(tests[index]); + } -function blockquoteIndentation(tree, file, pref) { - pref = typeof pref === 'number' && !isNaN(pref) ? pref : null; + return results +} - unistUtilVisit(tree, 'blockquote', visitor); +// Utility assert each property in `test` is represented in `node`, and each +// values are strictly equal. +function matchesFactory$x(test) { + return matches - function visitor(node) { - var diff; - var reason; + function matches(node) { + var key; - if (unistUtilGenerated(node) || node.children.length === 0) { - return + for (key in test) { + if (node[key] !== test[key]) { + return false + } } - if (pref) { - diff = pref - check$3(node); + return true + } +} - if (diff !== 0) { - reason = - (diff > 0 ? 'Add' : 'Remove') + - ' ' + - Math.abs(diff) + - ' ' + - plur('space', diff) + - ' between blockquote and content'; +function anyFactory$x(tests) { + var checks = convertAll$x(tests); + var length = checks.length; - file.message(reason, unistUtilPosition.start(node.children[0])); + return matches + + function matches() { + var index = -1; + + while (++index < length) { + if (checks[index].apply(this, arguments)) { + return true } - } else { - pref = check$3(node); } + + return false } } -function check$3(node) { - var head = node.children[0]; - var indentation = unistUtilPosition.start(head).column - unistUtilPosition.start(node).column; - var padding = mdastUtilToString(head).match(/^ +/); +// Utility to convert a string into a function which checks a given node’s type +// for said string. +function typeFactory$x(test) { + return type - if (padding) { - indentation += padding[0].length; + function type(node) { + return Boolean(node && node.type === test) } +} - return indentation +// Utility to return true. +function ok$y() { + return true } -var remarkLintCheckboxCharacterStyle = unifiedLintRule( - 'remark-lint:checkbox-character-style', - checkboxCharacterStyle -); +var unistUtilVisitParents$x = visitParents$x; -var start$8 = unistUtilPosition.start; -var end$4 = unistUtilPosition.end; -var checked = {x: true, X: true}; -var unchecked = {' ': true, '\t': true}; -var types$1 = {true: 'checked', false: 'unchecked'}; -function checkboxCharacterStyle(tree, file, pref) { - var contents = String(file); - var location = vfileLocation(file); +var CONTINUE$12 = true; +var SKIP$12 = 'skip'; +var EXIT$12 = false; - pref = typeof pref === 'object' ? pref : {}; +visitParents$x.CONTINUE = CONTINUE$12; +visitParents$x.SKIP = SKIP$12; +visitParents$x.EXIT = EXIT$12; - if (pref.unchecked && unchecked[pref.unchecked] !== true) { - file.fail( - 'Invalid unchecked checkbox marker `' + - pref.unchecked + - "`: use either `'\\t'`, or `' '`" - ); - } +function visitParents$x(tree, test, visitor, reverse) { + var is; - if (pref.checked && checked[pref.checked] !== true) { - file.fail( - 'Invalid checked checkbox marker `' + - pref.checked + - "`: use either `'x'`, or `'X'`" - ); + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; } - unistUtilVisit(tree, 'listItem', visitor); + is = convert_1$x(test); - function visitor(node) { - var type; - var initial; - var final; - var value; - var style; - var character; - var reason; + one(tree, null, []); - // Exit early for items without checkbox. - if (typeof node.checked !== 'boolean' || unistUtilGenerated(node)) { - return + // Visit a single node. + function one(node, index, parents) { + var result = []; + var subresult; + + if (!test || is(node, index, parents[parents.length - 1] || null)) { + result = toResult$x(visitor(node, parents)); + + if (result[0] === EXIT$12) { + return result + } } - type = types$1[node.checked]; - initial = start$8(node).offset; - final = (node.children.length === 0 ? end$4(node) : start$8(node.children[0])) - .offset; + if (node.children && result[0] !== SKIP$12) { + subresult = toResult$x(all(node.children, parents.concat(node))); + return subresult[0] === EXIT$12 ? subresult : result + } - // For a checkbox to be parsed, it must be followed by a whitespace. - value = contents - .slice(initial, final) - .trimRight() - .slice(0, -1); + return result + } - // The checkbox character is behind a square bracket. - character = value.charAt(value.length - 1); - style = pref[type]; + // Visit children in `parent`. + function all(children, parents) { + var min = -1; + var step = reverse ? -1 : 1; + var index = (reverse ? children.length : min) + step; + var result; - if (style) { - if (character !== style) { - reason = - type.charAt(0).toUpperCase() + - type.slice(1) + - ' checkboxes should use `' + - style + - '` as a marker'; + while (index > min && index < children.length) { + result = one(children[index], index, parents); - file.message(reason, { - start: location.toPosition(initial + value.length - 1), - end: location.toPosition(initial + value.length) - }); + if (result[0] === EXIT$12) { + return result } - } else { - pref[type] = character; + + index = typeof result[1] === 'number' ? result[1] : index + step; } } } -var remarkLintCheckboxContentIndent = unifiedLintRule( - 'remark-lint:checkbox-content-indent', - checkboxContentIndent -); +function toResult$x(value) { + if (value !== null && typeof value === 'object' && 'length' in value) { + return value + } -var start$9 = unistUtilPosition.start; -var end$5 = unistUtilPosition.end; + if (typeof value === 'number') { + return [CONTINUE$12, value] + } -var reason$9 = 'Checkboxes should be followed by a single character'; + return [value] +} -function checkboxContentIndent(tree, file) { - var contents = String(file); - var location = vfileLocation(file); +var unistUtilVisit$x = visit$x; - unistUtilVisit(tree, 'listItem', visitor); - function visitor(node) { - var initial; - var final; - var value; - // Exit early for items without checkbox. - if (typeof node.checked !== 'boolean' || unistUtilGenerated(node)) { - return - } +var CONTINUE$13 = unistUtilVisitParents$x.CONTINUE; +var SKIP$13 = unistUtilVisitParents$x.SKIP; +var EXIT$13 = unistUtilVisitParents$x.EXIT; - initial = start$9(node).offset; - /* istanbul ignore next - hard to test, couldn’t find a case. */ - final = (node.children.length === 0 ? end$5(node) : start$9(node.children[0])) - .offset; +visit$x.CONTINUE = CONTINUE$13; +visit$x.SKIP = SKIP$13; +visit$x.EXIT = EXIT$13; - while (/[^\S\n]/.test(contents.charAt(final))) { - final++; - } +function visit$x(tree, test, visitor, reverse) { + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } - // For a checkbox to be parsed, it must be followed by a whitespace. - value = contents.slice(initial, final); - value = value.slice(value.indexOf(']') + 1); + unistUtilVisitParents$x(tree, test, overload, reverse); - if (value.length !== 1) { - file.message(reason$9, { - start: location.toPosition(final - value.length + 1), - end: location.toPosition(final) - }); - } + function overload(node, parents) { + var parent = parents[parents.length - 1]; + var index = parent ? parent.children.indexOf(node) : null; + return visitor(node, index, parent) } } -var remarkLintCodeBlockStyle = unifiedLintRule('remark-lint:code-block-style', codeBlockStyle); - -var start$a = unistUtilPosition.start; -var end$6 = unistUtilPosition.end; - -var styles$2 = {null: true, fenced: true, indented: true}; - -function codeBlockStyle(tree, file, pref) { - var contents = String(file); +var vfileLocation$7 = factory$f; - pref = typeof pref === 'string' && pref !== 'consistent' ? pref : null; +function factory$f(file) { + var contents = indices$7(String(file)); - if (styles$2[pref] !== true) { - file.fail( - 'Invalid code block style `' + - pref + - "`: use either `'consistent'`, `'fenced'`, or `'indented'`" - ); + return { + toPosition: offsetToPositionFactory$7(contents), + toOffset: positionToOffsetFactory$7(contents) } +} - unistUtilVisit(tree, 'code', visitor); +// Factory to get the line and column-based `position` for `offset` in the bound +// indices. +function offsetToPositionFactory$7(indices) { + return offsetToPosition - function visitor(node) { - var current = check(node); + // Get the line and column-based `position` for `offset` in the bound indices. + function offsetToPosition(offset) { + var index = -1; + var length = indices.length; - if (current) { - if (!pref) { - pref = current; - } else if (pref !== current) { - file.message('Code blocks should be ' + pref, node); + if (offset < 0) { + return {} + } + + while (++index < length) { + if (indices[index] > offset) { + return { + line: index + 1, + column: offset - (indices[index - 1] || 0) + 1, + offset: offset + } } } + + return {} } +} - // Get the style of `node`. - function check(node) { - var initial = start$a(node).offset; - var final = end$6(node).offset; +// Factory to get the `offset` for a line and column-based `position` in the +// bound indices. +function positionToOffsetFactory$7(indices) { + return positionToOffset - if (unistUtilGenerated(node)) { - return null + // Get the `offset` for a line and column-based `position` in the bound + // indices. + function positionToOffset(position) { + var line = position && position.line; + var column = position && position.column; + + if (!isNaN(line) && !isNaN(column) && line - 1 in indices) { + return (indices[line - 2] || 0) + column - 1 || 0 } - return node.lang || /^\s*([~`])\1{2,}/.test(contents.slice(initial, final)) - ? 'fenced' - : 'indented' + return -1 } } -var remarkLintDefinitionSpacing = unifiedLintRule('remark-lint:definition-spacing', definitionSpacing); +// Get indices of line-breaks in `value`. +function indices$7(value) { + var result = []; + var index = value.indexOf('\n'); + + while (index !== -1) { + result.push(index + 1); + index = value.indexOf('\n', index + 1); + } + + result.push(value.length + 1); -var label$1 = /^\s*\[((?:\\[\s\S]|[^[\]])+)]/; -var reason$a = 'Do not use consecutive white-space in definition labels'; + return result +} -function definitionSpacing(tree, file) { - var contents = String(file); +const start$g = unistUtilPosition.start; - unistUtilVisit(tree, ['definition', 'footnoteDefinition'], validate); +var remarkLintProhibitedStrings = unifiedLintRule('remark-lint:prohibited-strings', prohibitedStrings); - function validate(node) { - var start = unistUtilPosition.start(node).offset; - var end = unistUtilPosition.end(node).offset; +function testProhibited (val, content) { + let regexpFlags = 'g'; - if ( - !unistUtilGenerated(node) && - /[ \t\n]{2,}/.test(contents.slice(start, end).match(label$1)[1]) - ) { - file.message(reason$a, node); - } + if (!val.no) { + val.no = escapeStringRegexp$1(val.yes); + regexpFlags += 'i'; } -} -var remarkLintFencedCodeFlag = unifiedLintRule('remark-lint:fenced-code-flag', fencedCodeFlag); + let regexpString = '(? { + const results = testProhibited(val, content); + if (results.length) { + results.forEach(({ result, index }) => { + const message = val.yes ? `Use "${val.yes}" instead of "${result}"` : `Do not use "${result}"`; + file.message(message, { + start: location.toPosition(initial + index), + end: location.toPosition(initial + index + [...result].length) + }); + }); } - } + }); } } -var remarkLintFencedCodeMarker = unifiedLintRule('remark-lint:fenced-code-marker', fencedCodeMarker); - -var markers = { - '`': true, - '~': true, - null: true -}; +var convert_1$y = convert$z; -function fencedCodeMarker(tree, file, pref) { - var contents = String(file); +function convert$z(test) { + if (typeof test === 'string') { + return typeFactory$y(test) + } - pref = typeof pref === 'string' && pref !== 'consistent' ? pref : null; + if (test === null || test === undefined) { + return ok$z + } - if (markers[pref] !== true) { - file.fail( - 'Invalid fenced code marker `' + - pref + - "`: use either `'consistent'`, `` '`' ``, or `'~'`" - ); + if (typeof test === 'object') { + return ('length' in test ? anyFactory$y : matchesFactory$y)(test) } - unistUtilVisit(tree, 'code', visitor); + if (typeof test === 'function') { + return test + } - function visitor(node) { - var marker; + throw new Error('Expected function, string, or object as test') +} - if (!unistUtilGenerated(node)) { - marker = contents - .substr(unistUtilPosition.start(node).offset, 4) - .trimLeft() - .charAt(0); +function convertAll$y(tests) { + var results = []; + var length = tests.length; + var index = -1; - // Ignore unfenced code blocks. - if (markers[marker] === true) { - if (pref) { - if (marker !== pref) { - file.message( - 'Fenced code should use ' + pref + ' as a marker', - node - ); - } - } else { - pref = marker; - } - } - } + while (++index < length) { + results[index] = convert$z(tests[index]); } + + return results } -var remarkLintFileExtension = unifiedLintRule('remark-lint:file-extension', fileExtension); +// Utility assert each property in `test` is represented in `node`, and each +// values are strictly equal. +function matchesFactory$y(test) { + return matches -function fileExtension(tree, file, pref) { - var ext = file.extname; + function matches(node) { + var key; - pref = typeof pref === 'string' ? pref : 'md'; + for (key in test) { + if (node[key] !== test[key]) { + return false + } + } - if (ext && ext.slice(1) !== pref) { - file.message('Invalid extension: use `' + pref + '`'); + return true } } -var remarkLintFinalDefinition = unifiedLintRule('remark-lint:final-definition', finalDefinition); +function anyFactory$y(tests) { + var checks = convertAll$y(tests); + var length = checks.length; -var start$c = unistUtilPosition.start; + return matches -function finalDefinition(tree, file) { - var last = null; + function matches() { + var index = -1; - unistUtilVisit(tree, visitor, true); + while (++index < length) { + if (checks[index].apply(this, arguments)) { + return true + } + } - function visitor(node) { - var line = start$c(node).line; + return false + } +} - // Ignore generated nodes. - if (node.type === 'root' || unistUtilGenerated(node)) { - return - } +// Utility to convert a string into a function which checks a given node’s type +// for said string. +function typeFactory$y(test) { + return type - if (node.type === 'definition') { - if (last !== null && last > line) { - file.message( - 'Move definitions to the end of the file (after the node at line `' + - last + - '`)', - node - ); - } - } else if (last === null) { - last = line; - } + function type(node) { + return Boolean(node && node.type === test) } } -var remarkLintFirstHeadingLevel = unifiedLintRule('remark-lint:first-heading-level', firstHeadingLevel); +// Utility to return true. +function ok$z() { + return true +} -var re$3 = /. - unistUtilVisit(tree, ['heading', 'table', 'code', 'definition', 'html', 'jsx'], ignore); - unistUtilVisit(tree, ['link', 'image', 'inlineCode'], inline); + while (index > min && index < children.length) { + result = one(children[index], index, parents); - // Iterate over every line, and warn for violating lines. - while (++index < length) { - lineLength = lines[index].length; + if (result[0] === EXIT$14) { + return result + } - if (lineLength > style) { - file.message('Line must be at most ' + style + ' characters', { - line: index + 1, - column: lineLength + 1 - }); + index = typeof result[1] === 'number' ? result[1] : index + step; } } +} - // Finally, whitelist some inline spans, but only if they occur at or after - // the wrap. - // However, when they do, and there’s whitespace after it, they are not - // whitelisted. - function inline(node, pos, parent) { - var next = parent.children[pos + 1]; - var initial; - var final; +function toResult$y(value) { + if (value !== null && typeof value === 'object' && 'length' in value) { + return value + } - /* istanbul ignore if - Nothing to whitelist when generated. */ - if (unistUtilGenerated(node)) { - return - } + if (typeof value === 'number') { + return [CONTINUE$14, value] + } - initial = start$d(node); - final = end$8(node); + return [value] +} - // No whitelisting when starting after the border, or ending before it. - if (initial.column > style || final.column < style) { - return - } +var unistUtilVisit$y = visit$y; - // No whitelisting when there’s whitespace after the link. - if ( - next && - start$d(next).line === initial.line && - (!next.value || /^(.+?[ \t].+?)/.test(next.value)) - ) { - return - } - whitelist(initial.line - 1, final.line); - } - function ignore(node) { - /* istanbul ignore else - Hard to test, as we only run this case on `position: true` */ - if (!unistUtilGenerated(node)) { - whitelist(start$d(node).line - 1, end$8(node).line); - } +var CONTINUE$15 = unistUtilVisitParents$y.CONTINUE; +var SKIP$15 = unistUtilVisitParents$y.SKIP; +var EXIT$15 = unistUtilVisitParents$y.EXIT; + +visit$y.CONTINUE = CONTINUE$15; +visit$y.SKIP = SKIP$15; +visit$y.EXIT = EXIT$15; + +function visit$y(tree, test, visitor, reverse) { + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; } - // Whitelist from `initial` to `final`, zero-based. - function whitelist(initial, final) { - while (initial < final) { - lines[initial++] = ''; - } + unistUtilVisitParents$y(tree, test, overload, reverse); + + function overload(node, parents) { + var parent = parents[parents.length - 1]; + var index = parent ? parent.children.indexOf(node) : null; + return visitor(node, index, parent) } } -var remarkLintNoConsecutiveBlankLines = unifiedLintRule( - 'remark-lint:no-consecutive-blank-lines', - noConsecutiveBlankLines -); +var rule = unifiedLintRule; -function noConsecutiveBlankLines(tree, file) { - unistUtilVisit(tree, visitor); - function visitor(node) { - var children = node.children; - var head; - var tail; - if (!unistUtilGenerated(node) && children) { - head = children[0]; - if (head && !unistUtilGenerated(head)) { - // Compare parent and first child. - compare(unistUtilPosition.start(node), unistUtilPosition.start(head), 0); +var remarkLintRuleStyle = rule('remark-lint:rule-style', ruleStyle); - // Compare between each child. - children.forEach(visitChild); +var start$h = unistUtilPosition.start; +var end$9 = unistUtilPosition.end; - tail = children[children.length - 1]; +function ruleStyle(tree, file, option) { + var contents = String(file); + var preferred = + typeof option === 'string' && option !== 'consistent' ? option : null; - // Compare parent and last child. - if (tail !== head && !unistUtilGenerated(tail)) { - compare(unistUtilPosition.end(node), unistUtilPosition.end(tail), 1); - } - } - } + if (preferred !== null && /[^-_* ]/.test(preferred)) { + file.fail( + "Incorrect preferred rule style: provide a correct markdown rule or `'consistent'`" + ); } - // Compare the difference between `start` and `end`, and warn when that - // difference exceeds `max`. - function compare(start, end, max) { - var diff = end.line - start.line; - var lines = Math.abs(diff) - max; - var reason; - - if (lines > 0) { - reason = - 'Remove ' + - lines + - ' ' + - plur('line', lines) + - ' ' + - (diff > 0 ? 'before' : 'after') + - ' node'; + unistUtilVisit$y(tree, 'thematicBreak', visitor); - file.message(reason, end); - } - } + function visitor(node) { + var initial = start$h(node).offset; + var final = end$9(node).offset; + var rule; - function visitChild(child, index, all) { - var prev = all[index - 1]; - var max = 2; + if (!unistUtilGenerated(node)) { + rule = contents.slice(initial, final); - if (prev && !unistUtilGenerated(prev) && !unistUtilGenerated(child)) { - if ( - (prev.type === 'list' && child.type === 'list') || - (child.type === 'code' && prev.type === 'list' && !child.lang) - ) { - max++; + if (preferred) { + if (rule !== preferred) { + file.message('Rules should use `' + preferred + '`', node); + } + } else { + preferred = rule; } - - compare(unistUtilPosition.end(prev), unistUtilPosition.start(child), max); } } } -var remarkLintNoFileNameArticles = unifiedLintRule('remark-lint:no-file-name-articles', noFileNameArticles); - -function noFileNameArticles(tree, file) { - var match = file.stem && file.stem.match(/^(the|teh|an?)\b/i); +var convert_1$z = convert$A; - if (match) { - file.message('Do not start file names with `' + match[0] + '`'); +function convert$A(test) { + if (typeof test === 'string') { + return typeFactory$z(test) } -} -var remarkLintNoFileNameConsecutiveDashes = unifiedLintRule( - 'remark-lint:no-file-name-consecutive-dashes', - noFileNameConsecutiveDashes -); + if (test === null || test === undefined) { + return ok$A + } -var reason$b = 'Do not use consecutive dashes in a file name'; + if (typeof test === 'object') { + return ('length' in test ? anyFactory$z : matchesFactory$z)(test) + } -function noFileNameConsecutiveDashes(tree, file) { - if (file.stem && /-{2,}/.test(file.stem)) { - file.message(reason$b); + if (typeof test === 'function') { + return test } -} -var remarkLintNoFileNameOuterDashes = unifiedLintRule( - 'remark-lint:no-file-name-outer-dashes', - noFileNameOuterDashes -); + throw new Error('Expected function, string, or object as test') +} -var reason$c = 'Do not use initial or final dashes in a file name'; +function convertAll$z(tests) { + var results = []; + var length = tests.length; + var index = -1; -function noFileNameOuterDashes(tree, file) { - if (file.stem && /^-|-$/.test(file.stem)) { - file.message(reason$c); + while (++index < length) { + results[index] = convert$A(tests[index]); } + + return results } -var remarkLintNoHeadingIndent = unifiedLintRule('remark-lint:no-heading-indent', noHeadingIndent); +// Utility assert each property in `test` is represented in `node`, and each +// values are strictly equal. +function matchesFactory$z(test) { + return matches -var start$e = unistUtilPosition.start; + function matches(node) { + var key; -function noHeadingIndent(tree, file) { - var contents = String(file); - var length = contents.length; + for (key in test) { + if (node[key] !== test[key]) { + return false + } + } - unistUtilVisit(tree, 'heading', visitor); + return true + } +} - function visitor(node) { - var initial; - var begin; - var index; - var character; - var diff; +function anyFactory$z(tests) { + var checks = convertAll$z(tests); + var length = checks.length; - if (unistUtilGenerated(node)) { - return - } + return matches - initial = start$e(node); - begin = initial.offset; - index = begin - 1; + function matches() { + var index = -1; while (++index < length) { - character = contents.charAt(index); - - if (character !== ' ' && character !== '\t') { - break + if (checks[index].apply(this, arguments)) { + return true } } - diff = index - begin; + return false + } +} - if (diff) { - file.message( - 'Remove ' + diff + ' ' + plur('space', diff) + ' before this heading', - { - line: initial.line, - column: initial.column + diff - } - ); - } +// Utility to convert a string into a function which checks a given node’s type +// for said string. +function typeFactory$z(test) { + return type + + function type(node) { + return Boolean(node && node.type === test) } } -var start$f = unistUtilPosition.start; +// Utility to return true. +function ok$A() { + return true +} +var unistUtilVisitParents$z = visitParents$z; -var remarkLintNoMultipleToplevelHeadings = unifiedLintRule( - 'remark-lint:no-multiple-toplevel-headings', - noMultipleToplevelHeadings -); -function noMultipleToplevelHeadings(tree, file, pref) { - var style = pref ? pref : 1; - var duplicate; +var CONTINUE$16 = true; +var SKIP$16 = 'skip'; +var EXIT$16 = false; - unistUtilVisit(tree, 'heading', visitor); +visitParents$z.CONTINUE = CONTINUE$16; +visitParents$z.SKIP = SKIP$16; +visitParents$z.EXIT = EXIT$16; - function visitor(node) { - if (!unistUtilGenerated(node) && node.depth === style) { - if (duplicate) { - file.message( - 'Don’t use multiple top level headings (' + duplicate + ')', - node - ); - } else { - duplicate = unistUtilStringifyPosition(start$f(node)); - } - } +function visitParents$z(tree, test, visitor, reverse) { + var is; + + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; } -} -var remarkLintNoShellDollars = unifiedLintRule('remark-lint:no-shell-dollars', noShellDollars); + is = convert_1$z(test); -var reason$d = 'Do not use dollar signs before shell-commands'; + one(tree, null, []); -// List of shell script file extensions (also used as code flags for syntax -// highlighting on GitHub): -// See: -var flags = [ - 'sh', - 'bash', - 'bats', - 'cgi', - 'command', - 'fcgi', - 'ksh', - 'tmux', - 'tool', - 'zsh' -]; + // Visit a single node. + function one(node, index, parents) { + var result = []; + var subresult; -function noShellDollars(tree, file) { - unistUtilVisit(tree, 'code', visitor); + if (!test || is(node, index, parents[parents.length - 1] || null)) { + result = toResult$z(visitor(node, parents)); - function visitor(node) { - var lines; - var line; - var length; - var index; + if (result[0] === EXIT$16) { + return result + } + } - // Check both known shell code and unknown code. - if (!unistUtilGenerated(node) && node.lang && flags.indexOf(node.lang) !== -1) { - lines = node.value.split('\n'); - length = lines.length; - index = -1; + if (node.children && result[0] !== SKIP$16) { + subresult = toResult$z(all(node.children, parents.concat(node))); + return subresult[0] === EXIT$16 ? subresult : result + } - if (length <= 1) { - return - } + return result + } - while (++index < length) { - line = lines[index]; + // Visit children in `parent`. + function all(children, parents) { + var min = -1; + var step = reverse ? -1 : 1; + var index = (reverse ? children.length : min) + step; + var result; - if (line.trim() && !line.match(/^\s*\$\s*/)) { - return - } + while (index > min && index < children.length) { + result = one(children[index], index, parents); + + if (result[0] === EXIT$16) { + return result } - file.message(reason$d, node); + index = typeof result[1] === 'number' ? result[1] : index + step; } } } -var remarkLintNoTableIndentation = unifiedLintRule('remark-lint:no-table-indentation', noTableIndentation); +function toResult$z(value) { + if (value !== null && typeof value === 'object' && 'length' in value) { + return value + } -var reason$e = 'Do not indent table rows'; + if (typeof value === 'number') { + return [CONTINUE$16, value] + } -function noTableIndentation(tree, file) { - var contents = String(file); + return [value] +} - unistUtilVisit(tree, 'table', visitor); +var unistUtilVisit$z = visit$z; - function visitor(node) { - if (!unistUtilGenerated(node)) { - node.children.forEach(each); - } - return unistUtilVisit.SKIP + +var CONTINUE$17 = unistUtilVisitParents$z.CONTINUE; +var SKIP$17 = unistUtilVisitParents$z.SKIP; +var EXIT$17 = unistUtilVisitParents$z.EXIT; + +visit$z.CONTINUE = CONTINUE$17; +visit$z.SKIP = SKIP$17; +visit$z.EXIT = EXIT$17; + +function visit$z(tree, test, visitor, reverse) { + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; } - function each(row) { - var fence = contents.slice( - unistUtilPosition.start(row).offset, - unistUtilPosition.start(row.children[0]).offset - ); + unistUtilVisitParents$z(tree, test, overload, reverse); - if (fence.indexOf('|') > 1) { - file.message(reason$e, row); - } + function overload(node, parents) { + var parent = parents[parents.length - 1]; + var index = parent ? parent.children.indexOf(node) : null; + return visitor(node, index, parent) } } -var remarkLintNoTabs = unifiedLintRule('remark-lint:no-tabs', noTabs); +var remarkLintStrongMarker = unifiedLintRule('remark-lint:strong-marker', strongMarker); -var reason$f = 'Use spaces instead of hard-tabs'; +var markers$1 = {'*': true, _: true, null: true}; -function noTabs(tree, file) { - var content = String(file); - var position = vfileLocation(file).toPosition; - var index = content.indexOf('\t'); +function strongMarker(tree, file, option) { + var contents = String(file); + var preferred = + typeof option === 'string' && option !== 'consistent' ? option : null; - while (index !== -1) { - file.message(reason$f, position(index)); - index = content.indexOf('\t', index + 1); + if (markers$1[preferred] !== true) { + file.fail( + 'Incorrect strong marker `' + + preferred + + "`: use either `'consistent'`, `'*'`, or `'_'`" + ); } -} -var remarkLintNoTrailingSpaces = unifiedLintRule('remark-lint:no-trailing-spaces', noTrailingSpaces); + unistUtilVisit$z(tree, 'strong', visitor); -/** - * Lines that are just space characters are not present in - * the AST, which is why we loop through lines manually. - */ + function visitor(node) { + var marker = contents.charAt(unistUtilPosition.start(node).offset); -function noTrailingSpaces(ast, file) { - var lines = file.toString().split(/\r?\n/); - for (var i = 0; i < lines.length; i++) { - var currentLine = lines[i]; - var lineIndex = i + 1; - if (/\s$/.test(currentLine)) { - file.message('Remove trailing whitespace', { - position: { - start: { line: lineIndex, column: currentLine.length + 1 }, - end: { line: lineIndex } + if (!unistUtilGenerated(node)) { + if (preferred) { + if (marker !== preferred) { + file.message( + 'Strong should use `' + preferred + '` as a marker', + node + ); } - }); + } else { + preferred = marker; + } } } } -var convert_1$1 = convert$2; +var convert_1$A = convert$B; -function convert$2(test) { +function convert$B(test) { if (typeof test === 'string') { - return typeFactory$1(test) + return typeFactory$A(test) } if (test === null || test === undefined) { - return ok$2 + return ok$B } if (typeof test === 'object') { - return ('length' in test ? anyFactory$1 : matchesFactory$1)(test) + return ('length' in test ? anyFactory$A : matchesFactory$A)(test) } if (typeof test === 'function') { @@ -43965,13 +51665,13 @@ function convert$2(test) { throw new Error('Expected function, string, or object as test') } -function convertAll$1(tests) { +function convertAll$A(tests) { var results = []; var length = tests.length; var index = -1; while (++index < length) { - results[index] = convert$2(tests[index]); + results[index] = convert$B(tests[index]); } return results @@ -43979,7 +51679,7 @@ function convertAll$1(tests) { // Utility assert each property in `test` is represented in `node`, and each // values are strictly equal. -function matchesFactory$1(test) { +function matchesFactory$A(test) { return matches function matches(node) { @@ -43995,8 +51695,8 @@ function matchesFactory$1(test) { } } -function anyFactory$1(tests) { - var checks = convertAll$1(tests); +function anyFactory$A(tests) { + var checks = convertAll$A(tests); var length = checks.length; return matches @@ -44016,7 +51716,7 @@ function anyFactory$1(tests) { // Utility to convert a string into a function which checks a given node’s type // for said string. -function typeFactory$1(test) { +function typeFactory$A(test) { return type function type(node) { @@ -44025,23 +51725,23 @@ function typeFactory$1(test) { } // Utility to return true. -function ok$2() { +function ok$B() { return true } -var unistUtilVisitParents$1 = visitParents$1; +var unistUtilVisitParents$A = visitParents$A; -var CONTINUE$2 = true; -var SKIP$2 = 'skip'; -var EXIT$2 = false; +var CONTINUE$18 = true; +var SKIP$18 = 'skip'; +var EXIT$18 = false; -visitParents$1.CONTINUE = CONTINUE$2; -visitParents$1.SKIP = SKIP$2; -visitParents$1.EXIT = EXIT$2; +visitParents$A.CONTINUE = CONTINUE$18; +visitParents$A.SKIP = SKIP$18; +visitParents$A.EXIT = EXIT$18; -function visitParents$1(tree, test, visitor, reverse) { +function visitParents$A(tree, test, visitor, reverse) { var is; if (typeof test === 'function' && typeof visitor !== 'function') { @@ -44050,7 +51750,7 @@ function visitParents$1(tree, test, visitor, reverse) { test = null; } - is = convert_1$1(test); + is = convert_1$A(test); one(tree, null, []); @@ -44060,16 +51760,16 @@ function visitParents$1(tree, test, visitor, reverse) { var subresult; if (!test || is(node, index, parents[parents.length - 1] || null)) { - result = toResult$1(visitor(node, parents)); + result = toResult$A(visitor(node, parents)); - if (result[0] === EXIT$2) { + if (result[0] === EXIT$18) { return result } } - if (node.children && result[0] !== SKIP$2) { - subresult = toResult$1(all(node.children, parents.concat(node))); - return subresult[0] === EXIT$2 ? subresult : result + if (node.children && result[0] !== SKIP$18) { + subresult = toResult$A(all(node.children, parents.concat(node))); + return subresult[0] === EXIT$18 ? subresult : result } return result @@ -44085,7 +51785,7 @@ function visitParents$1(tree, test, visitor, reverse) { while (index > min && index < children.length) { result = one(children[index], index, parents); - if (result[0] === EXIT$2) { + if (result[0] === EXIT$18) { return result } @@ -44094,38 +51794,38 @@ function visitParents$1(tree, test, visitor, reverse) { } } -function toResult$1(value) { +function toResult$A(value) { if (value !== null && typeof value === 'object' && 'length' in value) { return value } if (typeof value === 'number') { - return [CONTINUE$2, value] + return [CONTINUE$18, value] } return [value] } -var unistUtilVisit$1 = visit$1; +var unistUtilVisit$A = visit$A; -var CONTINUE$3 = unistUtilVisitParents$1.CONTINUE; -var SKIP$3 = unistUtilVisitParents$1.SKIP; -var EXIT$3 = unistUtilVisitParents$1.EXIT; +var CONTINUE$19 = unistUtilVisitParents$A.CONTINUE; +var SKIP$19 = unistUtilVisitParents$A.SKIP; +var EXIT$19 = unistUtilVisitParents$A.EXIT; -visit$1.CONTINUE = CONTINUE$3; -visit$1.SKIP = SKIP$3; -visit$1.EXIT = EXIT$3; +visit$A.CONTINUE = CONTINUE$19; +visit$A.SKIP = SKIP$19; +visit$A.EXIT = EXIT$19; -function visit$1(tree, test, visitor, reverse) { +function visit$A(tree, test, visitor, reverse) { if (typeof test === 'function' && typeof visitor !== 'function') { reverse = visitor; visitor = test; test = null; } - unistUtilVisitParents$1(tree, test, overload, reverse); + unistUtilVisitParents$A(tree, test, overload, reverse); function overload(node, parents) { var parent = parents[parents.length - 1]; @@ -44134,142 +51834,27 @@ function visit$1(tree, test, visitor, reverse) { } } -var remarkLintProhibitedStrings = unifiedLintRule('remark-lint:prohibited-strings', prohibitedStrings); - -function testProhibited(val, content) { - let regexpString = '(\\.|@[a-z0-9/-]*)?'; - - // If it starts with a letter, make sure it is a word break. - if (/^\b/.test(val.no)) { - regexpString += '\\b'; - } - regexpString += `(${val.no})`; - - // If it ends with a letter, make sure it is a word break. - if (/\b$/.test(val.no)) { - regexpString += '\\b'; - } - regexpString += '(\\.\\w)?'; - const re = new RegExp(regexpString, 'g'); - - let result = null; - while (result = re.exec(content)) { - if (!result[1] && !result[3]) { - return result[2]; - } - } - - return false; -} - -function prohibitedStrings(ast, file, strings) { - unistUtilVisit$1(ast, 'text', checkText); - - function checkText(node) { - const content = node.value; - - strings.forEach((val) => { - const result = testProhibited(val, content); - if (result) { - file.message(`Use "${val.yes}" instead of "${result}"`, node); - } - }); - } -} - -var rule = unifiedLintRule; - - - - -var remarkLintRuleStyle = rule('remark-lint:rule-style', ruleStyle); - -var start$g = unistUtilPosition.start; -var end$9 = unistUtilPosition.end; - -function ruleStyle(tree, file, pref) { - var contents = String(file); - - pref = typeof pref === 'string' && pref !== 'consistent' ? pref : null; - - if (pref !== null && /[^-_* ]/.test(pref)) { - file.fail( - "Invalid preferred rule-style: provide a valid markdown rule, or `'consistent'`" - ); - } - - unistUtilVisit(tree, 'thematicBreak', visitor); - - function visitor(node) { - var initial = start$g(node).offset; - var final = end$9(node).offset; - var rule; - - if (!unistUtilGenerated(node)) { - rule = contents.slice(initial, final); - - if (pref) { - if (rule !== pref) { - file.message('Rules should use `' + pref + '`', node); - } - } else { - pref = rule; - } - } - } -} - -var remarkLintStrongMarker = unifiedLintRule('remark-lint:strong-marker', strongMarker); - -var markers$1 = {'*': true, _: true, null: true}; - -function strongMarker(tree, file, pref) { - var contents = String(file); - - pref = typeof pref === 'string' && pref !== 'consistent' ? pref : null; - - if (markers$1[pref] !== true) { - file.fail( - 'Invalid strong marker `' + - pref + - "`: use either `'consistent'`, `'*'`, or `'_'`" - ); - } - - unistUtilVisit(tree, 'strong', visitor); - - function visitor(node) { - var marker = contents.charAt(unistUtilPosition.start(node).offset); - - if (!unistUtilGenerated(node)) { - if (pref) { - if (marker !== pref) { - file.message('Strong should use `' + pref + '` as a marker', node); - } - } else { - pref = marker; - } - } - } -} - var remarkLintTableCellPadding = unifiedLintRule('remark-lint:table-cell-padding', tableCellPadding); -var start$h = unistUtilPosition.start; +var start$i = unistUtilPosition.start; var end$a = unistUtilPosition.end; var styles$3 = {null: true, padded: true, compact: true}; -function tableCellPadding(tree, file, pref) { +function tableCellPadding(tree, file, option) { var contents = String(file); + var preferred = + typeof option === 'string' && option !== 'consistent' ? option : null; - pref = typeof pref === 'string' && pref !== 'consistent' ? pref : null; - - if (styles$3[pref] !== true) { - file.fail('Invalid table-cell-padding style `' + pref + '`'); + if (styles$3[preferred] !== true) { + file.fail( + 'Incorrect table cell padding style `' + + preferred + + "`, expected `'padded'`, `'compact'`, or `'consistent'`" + ); } - unistUtilVisit(tree, 'table', visitor); + unistUtilVisit$A(tree, 'table', visitor); function visitor(node) { var rows = node.children; @@ -44304,8 +51889,8 @@ function tableCellPadding(tree, file, pref) { next = cells[column + 1]; fence = contents.slice( - cell ? end$a(cell).offset : start$h(row).offset, - next ? start$h(next).offset : end$a(row).offset + cell ? end$a(cell).offset : start$i(row).offset, + next ? start$i(next).offset : end$a(row).offset ); pos = fence.indexOf('|'); @@ -44327,8 +51912,8 @@ function tableCellPadding(tree, file, pref) { } } - if (pref) { - style = pref === 'padded' ? 1 : 0; + if (preferred) { + style = preferred === 'padded' ? 1 : 0; } else { style = entries[0] && (!entries[0].start || !entries[0].end) ? 0 : 1; } @@ -44342,7 +51927,7 @@ function tableCellPadding(tree, file, pref) { checkSide('end', entry, style, sizes); } - return unistUtilVisit.SKIP + return unistUtilVisit$A.SKIP } function checkSide(side, entry, style, sizes) { @@ -44382,12 +51967,203 @@ function tableCellPadding(tree, file, pref) { } function size(node) { - return end$a(node).offset - start$h(node).offset + return end$a(node).offset - start$i(node).offset +} + +var convert_1$B = convert$C; + +function convert$C(test) { + if (typeof test === 'string') { + return typeFactory$B(test) + } + + if (test === null || test === undefined) { + return ok$C + } + + if (typeof test === 'object') { + return ('length' in test ? anyFactory$B : matchesFactory$B)(test) + } + + if (typeof test === 'function') { + return test + } + + throw new Error('Expected function, string, or object as test') +} + +function convertAll$B(tests) { + var results = []; + var length = tests.length; + var index = -1; + + while (++index < length) { + results[index] = convert$C(tests[index]); + } + + return results +} + +// Utility assert each property in `test` is represented in `node`, and each +// values are strictly equal. +function matchesFactory$B(test) { + return matches + + function matches(node) { + var key; + + for (key in test) { + if (node[key] !== test[key]) { + return false + } + } + + return true + } +} + +function anyFactory$B(tests) { + var checks = convertAll$B(tests); + var length = checks.length; + + return matches + + function matches() { + var index = -1; + + while (++index < length) { + if (checks[index].apply(this, arguments)) { + return true + } + } + + return false + } +} + +// Utility to convert a string into a function which checks a given node’s type +// for said string. +function typeFactory$B(test) { + return type + + function type(node) { + return Boolean(node && node.type === test) + } +} + +// Utility to return true. +function ok$C() { + return true +} + +var unistUtilVisitParents$B = visitParents$B; + + + +var CONTINUE$1a = true; +var SKIP$1a = 'skip'; +var EXIT$1a = false; + +visitParents$B.CONTINUE = CONTINUE$1a; +visitParents$B.SKIP = SKIP$1a; +visitParents$B.EXIT = EXIT$1a; + +function visitParents$B(tree, test, visitor, reverse) { + var is; + + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + is = convert_1$B(test); + + one(tree, null, []); + + // Visit a single node. + function one(node, index, parents) { + var result = []; + var subresult; + + if (!test || is(node, index, parents[parents.length - 1] || null)) { + result = toResult$B(visitor(node, parents)); + + if (result[0] === EXIT$1a) { + return result + } + } + + if (node.children && result[0] !== SKIP$1a) { + subresult = toResult$B(all(node.children, parents.concat(node))); + return subresult[0] === EXIT$1a ? subresult : result + } + + return result + } + + // Visit children in `parent`. + function all(children, parents) { + var min = -1; + var step = reverse ? -1 : 1; + var index = (reverse ? children.length : min) + step; + var result; + + while (index > min && index < children.length) { + result = one(children[index], index, parents); + + if (result[0] === EXIT$1a) { + return result + } + + index = typeof result[1] === 'number' ? result[1] : index + step; + } + } +} + +function toResult$B(value) { + if (value !== null && typeof value === 'object' && 'length' in value) { + return value + } + + if (typeof value === 'number') { + return [CONTINUE$1a, value] + } + + return [value] +} + +var unistUtilVisit$B = visit$B; + + + +var CONTINUE$1b = unistUtilVisitParents$B.CONTINUE; +var SKIP$1b = unistUtilVisitParents$B.SKIP; +var EXIT$1b = unistUtilVisitParents$B.EXIT; + +visit$B.CONTINUE = CONTINUE$1b; +visit$B.SKIP = SKIP$1b; +visit$B.EXIT = EXIT$1b; + +function visit$B(tree, test, visitor, reverse) { + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + unistUtilVisitParents$B(tree, test, overload, reverse); + + function overload(node, parents) { + var parent = parents[parents.length - 1]; + var index = parent ? parent.children.indexOf(node) : null; + return visitor(node, index, parent) + } } var remarkLintTablePipes = unifiedLintRule('remark-lint:table-pipes', tablePipes); -var start$i = unistUtilPosition.start; +var start$j = unistUtilPosition.start; var end$b = unistUtilPosition.end; var reasonStart = 'Missing initial pipe in table fence'; @@ -44396,7 +52172,7 @@ var reasonEnd = 'Missing final pipe in table fence'; function tablePipes(tree, file) { var contents = String(file); - unistUtilVisit(tree, 'table', visitor); + unistUtilVisit$B(tree, 'table', visitor); function visitor(node) { var rows = node.children; @@ -44416,11 +52192,11 @@ function tablePipes(tree, file) { cells = row.children; head = cells[0]; tail = cells[cells.length - 1]; - initial = contents.slice(start$i(row).offset, start$i(head).offset); + initial = contents.slice(start$j(row).offset, start$j(head).offset); final = contents.slice(end$b(tail).offset, end$b(row).offset); if (initial.indexOf('|') === -1) { - file.message(reasonStart, start$i(row)); + file.message(reasonStart, start$j(row)); } if (final.indexOf('|') === -1) { @@ -44431,12 +52207,203 @@ function tablePipes(tree, file) { } } +var convert_1$C = convert$D; + +function convert$D(test) { + if (typeof test === 'string') { + return typeFactory$C(test) + } + + if (test === null || test === undefined) { + return ok$D + } + + if (typeof test === 'object') { + return ('length' in test ? anyFactory$C : matchesFactory$C)(test) + } + + if (typeof test === 'function') { + return test + } + + throw new Error('Expected function, string, or object as test') +} + +function convertAll$C(tests) { + var results = []; + var length = tests.length; + var index = -1; + + while (++index < length) { + results[index] = convert$D(tests[index]); + } + + return results +} + +// Utility assert each property in `test` is represented in `node`, and each +// values are strictly equal. +function matchesFactory$C(test) { + return matches + + function matches(node) { + var key; + + for (key in test) { + if (node[key] !== test[key]) { + return false + } + } + + return true + } +} + +function anyFactory$C(tests) { + var checks = convertAll$C(tests); + var length = checks.length; + + return matches + + function matches() { + var index = -1; + + while (++index < length) { + if (checks[index].apply(this, arguments)) { + return true + } + } + + return false + } +} + +// Utility to convert a string into a function which checks a given node’s type +// for said string. +function typeFactory$C(test) { + return type + + function type(node) { + return Boolean(node && node.type === test) + } +} + +// Utility to return true. +function ok$D() { + return true +} + +var unistUtilVisitParents$C = visitParents$C; + + + +var CONTINUE$1c = true; +var SKIP$1c = 'skip'; +var EXIT$1c = false; + +visitParents$C.CONTINUE = CONTINUE$1c; +visitParents$C.SKIP = SKIP$1c; +visitParents$C.EXIT = EXIT$1c; + +function visitParents$C(tree, test, visitor, reverse) { + var is; + + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + is = convert_1$C(test); + + one(tree, null, []); + + // Visit a single node. + function one(node, index, parents) { + var result = []; + var subresult; + + if (!test || is(node, index, parents[parents.length - 1] || null)) { + result = toResult$C(visitor(node, parents)); + + if (result[0] === EXIT$1c) { + return result + } + } + + if (node.children && result[0] !== SKIP$1c) { + subresult = toResult$C(all(node.children, parents.concat(node))); + return subresult[0] === EXIT$1c ? subresult : result + } + + return result + } + + // Visit children in `parent`. + function all(children, parents) { + var min = -1; + var step = reverse ? -1 : 1; + var index = (reverse ? children.length : min) + step; + var result; + + while (index > min && index < children.length) { + result = one(children[index], index, parents); + + if (result[0] === EXIT$1c) { + return result + } + + index = typeof result[1] === 'number' ? result[1] : index + step; + } + } +} + +function toResult$C(value) { + if (value !== null && typeof value === 'object' && 'length' in value) { + return value + } + + if (typeof value === 'number') { + return [CONTINUE$1c, value] + } + + return [value] +} + +var unistUtilVisit$C = visit$C; + + + +var CONTINUE$1d = unistUtilVisitParents$C.CONTINUE; +var SKIP$1d = unistUtilVisitParents$C.SKIP; +var EXIT$1d = unistUtilVisitParents$C.EXIT; + +visit$C.CONTINUE = CONTINUE$1d; +visit$C.SKIP = SKIP$1d; +visit$C.EXIT = EXIT$1d; + +function visit$C(tree, test, visitor, reverse) { + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + unistUtilVisitParents$C(tree, test, overload, reverse); + + function overload(node, parents) { + var parent = parents[parents.length - 1]; + var index = parent ? parent.children.indexOf(node) : null; + return visitor(node, index, parent) + } +} + var remarkLintUnorderedListMarkerStyle = unifiedLintRule( 'remark-lint:unordered-list-marker-style', unorderedListMarkerStyle ); -var start$j = unistUtilPosition.start; +var start$k = unistUtilPosition.start; var styles$4 = { '-': true, @@ -44445,20 +52412,20 @@ var styles$4 = { null: true }; -function unorderedListMarkerStyle(tree, file, pref) { +function unorderedListMarkerStyle(tree, file, option) { var contents = String(file); + var preferred = + typeof option === 'string' && option !== 'consistent' ? option : null; - pref = typeof pref === 'string' && pref !== 'consistent' ? pref : null; - - if (styles$4[pref] !== true) { + if (styles$4[preferred] !== true) { file.fail( - 'Invalid unordered list-item marker style `' + - pref + + 'Incorrect unordered list item marker style `' + + preferred + "`: use either `'-'`, `'*'`, or `'+'`" ); } - unistUtilVisit(tree, 'list', visitor); + unistUtilVisit$C(tree, 'list', visitor); function visitor(node) { var children = node.children; @@ -44472,16 +52439,16 @@ function unorderedListMarkerStyle(tree, file, pref) { if (!unistUtilGenerated(child)) { marker = contents - .slice(start$j(child).offset, start$j(child.children[0]).offset) + .slice(start$k(child).offset, start$k(child.children[0]).offset) .replace(/\[[x ]?]\s*$/i, '') .replace(/\s/g, ''); - if (pref) { - if (marker !== pref) { - file.message('Marker style should be `' + pref + '`', child); + if (preferred) { + if (marker !== preferred) { + file.message('Marker style should be `' + preferred + '`', child); } } else { - pref = marker; + preferred = marker; } } } @@ -44498,8 +52465,8 @@ var plugins$2 = [ remarkLintCheckboxCharacterStyle, { checked: "x", - unchecked: " " - } + unchecked: " ", + }, ], remarkLintCheckboxContentIndent, [remarkLintCodeBlockStyle, "fenced"], @@ -44517,7 +52484,6 @@ var plugins$2 = [ remarkLintNoFileNameConsecutiveDashes, remarkLintNoFileNameOuterDashes, remarkLintNoHeadingIndent, - [remarkLintNoLiteralUrls, false], remarkLintNoMultipleToplevelHeadings, remarkLintNoShellDollars, remarkLintNoTableIndentation, @@ -44526,29 +52492,25 @@ var plugins$2 = [ [ remarkLintProhibitedStrings, [ - { no: "End-Of-Life", yes: "End-of-Life" }, - { no: "End-of-life", yes: "End-of-Life" }, - { no: "Github", yes: "GitHub" }, + { yes: "End-of-Life" }, + { yes: "GitHub" }, { no: "hostname", yes: "host name" }, - { no: "[Jj]avascript", yes: "JavaScript" }, + { yes: "JavaScript" }, { no: "Node", yes: "Node.js" }, - { no: "Node\\.JS", yes: "Node.js" }, - { no: "node\\.js", yes: "Node.js" }, + { yes: "Node.js" }, { no: "Node\\.js's?", yes: "the Node.js" }, { no: "[Nn]ote that", yes: "" }, - { no: "Rfc", yes: "RFC" }, + { yes: "RFC" }, { no: "[Rr][Ff][Cc]\\d+", yes: "RFC " }, - { no: "rfc", yes: "RFC" }, - { no: "UNIX", yes: "Unix" }, - { no: "unix", yes: "Unix" }, - { no: "v8", yes: "V8" } - ] + { yes: "Unix" }, + { yes: "V8" }, + ], ], remarkLintRuleStyle, [remarkLintStrongMarker, "*"], [remarkLintTableCellPadding, "padded"], remarkLintTablePipes, - [remarkLintUnorderedListMarkerStyle, "*"] + [remarkLintUnorderedListMarkerStyle, "*"], ]; var remarkPresetLintNode = { diff --git a/tools/node-lint-md-cli-rollup/package-lock.json b/tools/node-lint-md-cli-rollup/package-lock.json index e6597cfdd506fe..bc92428a113cf7 100644 --- a/tools/node-lint-md-cli-rollup/package-lock.json +++ b/tools/node-lint-md-cli-rollup/package-lock.json @@ -401,11 +401,6 @@ "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==", "dev": true }, - "irregular-plurals": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/irregular-plurals/-/irregular-plurals-2.0.0.tgz", - "integrity": "sha512-Y75zBYLkh0lJ9qxeHlMjQ7bSbyiSqNW/UOPWDmzC7cXskL1hekSITh1Oc6JV0XCWWZ9DE8VYSB71xocLk3gmGw==" - }, "is-alphabetical": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.3.tgz", @@ -595,14 +590,14 @@ } }, "mdast-util-heading-style": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/mdast-util-heading-style/-/mdast-util-heading-style-1.0.5.tgz", - "integrity": "sha512-8zQkb3IUwiwOdUw6jIhnwM6DPyib+mgzQuHAe7j2Hy1rIarU4VUxe472bp9oktqULW3xqZE+Kz6OD4Gi7IA3vw==" + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/mdast-util-heading-style/-/mdast-util-heading-style-1.0.6.tgz", + "integrity": "sha512-8ZuuegRqS0KESgjAGW8zTx4tJ3VNIiIaGFNEzFpRSAQBavVc7AvOo9I4g3crcZBfYisHs4seYh0rAVimO6HyOw==" }, "mdast-util-to-string": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-1.0.7.tgz", - "integrity": "sha512-P+gdtssCoHOX+eJUrrC30Sixqao86ZPlVjR5NEAoy0U79Pfxb1Y0Gntei0+GrnQD4T04X9xA8tcugp90cSmNow==" + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-1.1.0.tgz", + "integrity": "sha512-jVU0Nr2B9X3MU4tSK7JP1CMkSvOj7X5l/GboG1tKRw52lLF1x2Ju92Ms9tNetCcbfX3hzlM73zYo2NKkWSfF/A==" }, "minimatch": { "version": "3.0.4", @@ -688,13 +683,10 @@ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.1.tgz", "integrity": "sha512-ISBaA8xQNmwELC7eOjqFKMESB2VIqt4PPDD0nsS95b/9dZXvVKOlz9keMSnoGGKcOHXfTvDD6WMaRoSc9UuhRA==" }, - "plur": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/plur/-/plur-3.1.1.tgz", - "integrity": "sha512-t1Ax8KUvV3FFII8ltczPn2tJdjqbd1sIzu6t4JL7nQ3EyeL/lTrj5PWKb06ic5/6XYDr65rQ4uzQEGN70/6X5w==", - "requires": { - "irregular-plurals": "^2.0.0" - } + "pluralize": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", + "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==" }, "rc": { "version": "1.2.8", @@ -753,360 +745,1084 @@ } }, "remark-lint-blockquote-indentation": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/remark-lint-blockquote-indentation/-/remark-lint-blockquote-indentation-1.0.3.tgz", - "integrity": "sha512-qK4C1l2VmeOVWEAkDYP0CaDtSFoaEBEo5l4oyz1kTkY7YB0Jh7llW2KjuhJz5IzMLmloKJzIyGwlu/odcwaHpg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/remark-lint-blockquote-indentation/-/remark-lint-blockquote-indentation-2.0.0.tgz", + "integrity": "sha512-Ma/lk+egYzvzV9+RLxR7iaNcFqwsF02guxY2nFF7gaVFXWDhbRy+hbiRZiTQe3y8AK+smc2yE79I+JRUVL15LQ==", "requires": { "mdast-util-to-string": "^1.0.2", - "plur": "^3.0.0", + "pluralize": "^8.0.0", "unified-lint-rule": "^1.0.0", "unist-util-generated": "^1.1.0", "unist-util-position": "^3.0.0", - "unist-util-visit": "^1.1.1" + "unist-util-visit": "^2.0.0" + }, + "dependencies": { + "unist-util-is": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.0.2.tgz", + "integrity": "sha512-Ofx8uf6haexJwI1gxWMGg6I/dLnF2yE+KibhD3/diOqY2TinLcqHXCV6OI5gFVn3xQqDH+u0M625pfKwIwgBKQ==" + }, + "unist-util-visit": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-2.0.2.tgz", + "integrity": "sha512-HoHNhGnKj6y+Sq+7ASo2zpVdfdRifhTgX2KTU3B/sO/TTlZchp7E3S4vjRzDJ7L60KmrCPsQkVK3lEF3cz36XQ==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0", + "unist-util-visit-parents": "^3.0.0" + } + }, + "unist-util-visit-parents": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.0.2.tgz", + "integrity": "sha512-yJEfuZtzFpQmg1OSCyS9M5NJRrln/9FbYosH3iW0MG402QbdbaB8ZESwUv9RO6nRfLAKvWcMxCwdLWOov36x/g==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0" + } + } } }, "remark-lint-checkbox-character-style": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/remark-lint-checkbox-character-style/-/remark-lint-checkbox-character-style-1.0.3.tgz", - "integrity": "sha512-bQGrGHLlguTxOzuywHtYxNcg58TYhNgeEAMCTvdAggt5bYZIwmh/otx51JsQ0a96qxd/6/G0Ri2xzgyxf9wB8w==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/remark-lint-checkbox-character-style/-/remark-lint-checkbox-character-style-2.0.0.tgz", + "integrity": "sha512-V+eTXFHrHCpFFG2RWaQM6lSetLLvpYC8WEZ9dMYSAUbeS/h0PhA7cB7j5kGH86RUwGCihawfzNAKbRmgGxL+DQ==", "requires": { "unified-lint-rule": "^1.0.0", "unist-util-generated": "^1.1.0", "unist-util-position": "^3.0.0", - "unist-util-visit": "^1.1.1", - "vfile-location": "^2.0.1" + "unist-util-visit": "^2.0.0", + "vfile-location": "^3.0.0" + }, + "dependencies": { + "unist-util-is": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.0.2.tgz", + "integrity": "sha512-Ofx8uf6haexJwI1gxWMGg6I/dLnF2yE+KibhD3/diOqY2TinLcqHXCV6OI5gFVn3xQqDH+u0M625pfKwIwgBKQ==" + }, + "unist-util-visit": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-2.0.2.tgz", + "integrity": "sha512-HoHNhGnKj6y+Sq+7ASo2zpVdfdRifhTgX2KTU3B/sO/TTlZchp7E3S4vjRzDJ7L60KmrCPsQkVK3lEF3cz36XQ==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0", + "unist-util-visit-parents": "^3.0.0" + } + }, + "unist-util-visit-parents": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.0.2.tgz", + "integrity": "sha512-yJEfuZtzFpQmg1OSCyS9M5NJRrln/9FbYosH3iW0MG402QbdbaB8ZESwUv9RO6nRfLAKvWcMxCwdLWOov36x/g==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0" + } + }, + "vfile-location": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-3.0.1.tgz", + "integrity": "sha512-yYBO06eeN/Ki6Kh1QAkgzYpWT1d3Qln+ZCtSbJqFExPl1S3y2qqotJQXoh6qEvl/jDlgpUJolBn3PItVnnZRqQ==" + } } }, "remark-lint-checkbox-content-indent": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/remark-lint-checkbox-content-indent/-/remark-lint-checkbox-content-indent-1.0.3.tgz", - "integrity": "sha512-YaM1yy8RdnM0DUaP0r2X8kF+inUTmjkCpj5Xjn7QTOV1T5jqJMJnRRilirAWgOGa1QBZBUew7uj0L1Je9SJIZw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/remark-lint-checkbox-content-indent/-/remark-lint-checkbox-content-indent-2.0.0.tgz", + "integrity": "sha512-02Xytexe8nso1ofPC6wN3FE48302nmteSIwydeIDFhJq7mG14SxF4xgay+Kjbhs/O5NoRIF2ju9qcPNJ5gFsXA==", "requires": { "unified-lint-rule": "^1.0.0", "unist-util-generated": "^1.1.0", "unist-util-position": "^3.0.0", - "unist-util-visit": "^1.1.1", - "vfile-location": "^2.0.1" + "unist-util-visit": "^2.0.0", + "vfile-location": "^3.0.0" + }, + "dependencies": { + "unist-util-is": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.0.2.tgz", + "integrity": "sha512-Ofx8uf6haexJwI1gxWMGg6I/dLnF2yE+KibhD3/diOqY2TinLcqHXCV6OI5gFVn3xQqDH+u0M625pfKwIwgBKQ==" + }, + "unist-util-visit": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-2.0.2.tgz", + "integrity": "sha512-HoHNhGnKj6y+Sq+7ASo2zpVdfdRifhTgX2KTU3B/sO/TTlZchp7E3S4vjRzDJ7L60KmrCPsQkVK3lEF3cz36XQ==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0", + "unist-util-visit-parents": "^3.0.0" + } + }, + "unist-util-visit-parents": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.0.2.tgz", + "integrity": "sha512-yJEfuZtzFpQmg1OSCyS9M5NJRrln/9FbYosH3iW0MG402QbdbaB8ZESwUv9RO6nRfLAKvWcMxCwdLWOov36x/g==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0" + } + }, + "vfile-location": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-3.0.1.tgz", + "integrity": "sha512-yYBO06eeN/Ki6Kh1QAkgzYpWT1d3Qln+ZCtSbJqFExPl1S3y2qqotJQXoh6qEvl/jDlgpUJolBn3PItVnnZRqQ==" + } } }, "remark-lint-code-block-style": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/remark-lint-code-block-style/-/remark-lint-code-block-style-1.0.3.tgz", - "integrity": "sha512-DL+rudnd9ILP5YXm74tLpMzfWZLqziX7NwIwUhqRefaOyWwxgPPy7hbT59FJqcFc6E/zvDz+Oq4nR1BSV5kEdw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/remark-lint-code-block-style/-/remark-lint-code-block-style-2.0.0.tgz", + "integrity": "sha512-bXT1b9MvYDxKdLfzWTW3eSXWy7v57LXtU5ySLzlD1g3DWoSA6rSWjJT5l/2mA+iOuswg18ssY3SSjwExmTyWUA==", "requires": { "unified-lint-rule": "^1.0.0", "unist-util-generated": "^1.1.0", "unist-util-position": "^3.0.0", - "unist-util-visit": "^1.1.1" + "unist-util-visit": "^2.0.0" + }, + "dependencies": { + "unist-util-is": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.0.2.tgz", + "integrity": "sha512-Ofx8uf6haexJwI1gxWMGg6I/dLnF2yE+KibhD3/diOqY2TinLcqHXCV6OI5gFVn3xQqDH+u0M625pfKwIwgBKQ==" + }, + "unist-util-visit": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-2.0.2.tgz", + "integrity": "sha512-HoHNhGnKj6y+Sq+7ASo2zpVdfdRifhTgX2KTU3B/sO/TTlZchp7E3S4vjRzDJ7L60KmrCPsQkVK3lEF3cz36XQ==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0", + "unist-util-visit-parents": "^3.0.0" + } + }, + "unist-util-visit-parents": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.0.2.tgz", + "integrity": "sha512-yJEfuZtzFpQmg1OSCyS9M5NJRrln/9FbYosH3iW0MG402QbdbaB8ZESwUv9RO6nRfLAKvWcMxCwdLWOov36x/g==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0" + } + } } }, "remark-lint-definition-spacing": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/remark-lint-definition-spacing/-/remark-lint-definition-spacing-1.0.4.tgz", - "integrity": "sha512-UderghITmru72OXB5ErCFhVsY7up2wK/m1bUD3E2dm/TFn73/7WpykENt5UirCDT/aeyoHYl8QXUVL20rAc3XQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/remark-lint-definition-spacing/-/remark-lint-definition-spacing-2.0.0.tgz", + "integrity": "sha512-kE+ffEGsyxgUDlcKSVrnhqyHjQfH0RtUVN/OdA/iSzKfTy/Yc9VMMaNu6xT14xhwjTnSVPrd38rUOnDt1LZhAw==", "requires": { "unified-lint-rule": "^1.0.0", "unist-util-generated": "^1.1.0", "unist-util-position": "^3.0.0", - "unist-util-visit": "^1.4.0" + "unist-util-visit": "^2.0.0" + }, + "dependencies": { + "unist-util-is": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.0.2.tgz", + "integrity": "sha512-Ofx8uf6haexJwI1gxWMGg6I/dLnF2yE+KibhD3/diOqY2TinLcqHXCV6OI5gFVn3xQqDH+u0M625pfKwIwgBKQ==" + }, + "unist-util-visit": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-2.0.2.tgz", + "integrity": "sha512-HoHNhGnKj6y+Sq+7ASo2zpVdfdRifhTgX2KTU3B/sO/TTlZchp7E3S4vjRzDJ7L60KmrCPsQkVK3lEF3cz36XQ==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0", + "unist-util-visit-parents": "^3.0.0" + } + }, + "unist-util-visit-parents": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.0.2.tgz", + "integrity": "sha512-yJEfuZtzFpQmg1OSCyS9M5NJRrln/9FbYosH3iW0MG402QbdbaB8ZESwUv9RO6nRfLAKvWcMxCwdLWOov36x/g==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0" + } + } } }, "remark-lint-fenced-code-flag": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/remark-lint-fenced-code-flag/-/remark-lint-fenced-code-flag-1.0.3.tgz", - "integrity": "sha512-X8Oi6dhfqV9NI3cVg29myvT/NATDHVgRGCpnNz76w7VXwzhBvQtJr1MxZzuPxfWLox+ARCXF2rY9n9hbYFHYTg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/remark-lint-fenced-code-flag/-/remark-lint-fenced-code-flag-2.0.0.tgz", + "integrity": "sha512-SyQ31cdQlbsS+eBw2DUxkuzNwGIGlWnnCLyHLz3D1nxtZBVUaUOnIAturSA3PsguIrnxH4qD2JYCTp5aPbZhzQ==", "requires": { "unified-lint-rule": "^1.0.0", "unist-util-generated": "^1.1.0", "unist-util-position": "^3.0.0", - "unist-util-visit": "^1.1.1" + "unist-util-visit": "^2.0.0" + }, + "dependencies": { + "unist-util-is": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.0.2.tgz", + "integrity": "sha512-Ofx8uf6haexJwI1gxWMGg6I/dLnF2yE+KibhD3/diOqY2TinLcqHXCV6OI5gFVn3xQqDH+u0M625pfKwIwgBKQ==" + }, + "unist-util-visit": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-2.0.2.tgz", + "integrity": "sha512-HoHNhGnKj6y+Sq+7ASo2zpVdfdRifhTgX2KTU3B/sO/TTlZchp7E3S4vjRzDJ7L60KmrCPsQkVK3lEF3cz36XQ==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0", + "unist-util-visit-parents": "^3.0.0" + } + }, + "unist-util-visit-parents": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.0.2.tgz", + "integrity": "sha512-yJEfuZtzFpQmg1OSCyS9M5NJRrln/9FbYosH3iW0MG402QbdbaB8ZESwUv9RO6nRfLAKvWcMxCwdLWOov36x/g==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0" + } + } } }, "remark-lint-fenced-code-marker": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/remark-lint-fenced-code-marker/-/remark-lint-fenced-code-marker-1.0.3.tgz", - "integrity": "sha512-JKnojSQ8JkwpIpbNm6wtKEfx8iiv8QIwNHFM06iTCHExMhXa4pJ3wb5M5f0wsWNHtoND3lrw6AcVPoZxEPnflg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/remark-lint-fenced-code-marker/-/remark-lint-fenced-code-marker-2.0.0.tgz", + "integrity": "sha512-ZkJ4/o0A34nQefhsu6AU2cftQjCwzXClbZ5TrwgtkQQHG9BSu9/vo3PSLxGGw7XBX63oKcrx5HWGrWXaeLTN2g==", "requires": { "unified-lint-rule": "^1.0.0", "unist-util-generated": "^1.1.0", "unist-util-position": "^3.0.0", - "unist-util-visit": "^1.1.1" + "unist-util-visit": "^2.0.0" + }, + "dependencies": { + "unist-util-is": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.0.2.tgz", + "integrity": "sha512-Ofx8uf6haexJwI1gxWMGg6I/dLnF2yE+KibhD3/diOqY2TinLcqHXCV6OI5gFVn3xQqDH+u0M625pfKwIwgBKQ==" + }, + "unist-util-visit": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-2.0.2.tgz", + "integrity": "sha512-HoHNhGnKj6y+Sq+7ASo2zpVdfdRifhTgX2KTU3B/sO/TTlZchp7E3S4vjRzDJ7L60KmrCPsQkVK3lEF3cz36XQ==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0", + "unist-util-visit-parents": "^3.0.0" + } + }, + "unist-util-visit-parents": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.0.2.tgz", + "integrity": "sha512-yJEfuZtzFpQmg1OSCyS9M5NJRrln/9FbYosH3iW0MG402QbdbaB8ZESwUv9RO6nRfLAKvWcMxCwdLWOov36x/g==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0" + } + } } }, "remark-lint-file-extension": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/remark-lint-file-extension/-/remark-lint-file-extension-1.0.3.tgz", - "integrity": "sha512-P5gzsxKmuAVPN7Kq1W0f8Ss0cFKfu+OlezYJWXf+5qOa+9Y5GqHEUOobPnsmNFZrVMiM7JoqJN2C9ZjrUx3N6Q==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/remark-lint-file-extension/-/remark-lint-file-extension-1.0.4.tgz", + "integrity": "sha512-Zfp1mXNwpg7STjTWynZjL+/JtvIOCrmOAZzL3uK+tYpT0ZDPdQ1EQEl5D92+Eiu5OcYlenzG42jiLcyJjv+Q2g==", "requires": { "unified-lint-rule": "^1.0.0" } }, "remark-lint-final-definition": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/remark-lint-final-definition/-/remark-lint-final-definition-1.0.3.tgz", - "integrity": "sha512-QhbBYy99enfQDeUTElioCHrhgg+SgjMNRlru7/JlOguOufP6wn7AXgn2EVTrLZRoByY0VsNS2jCayXxUTzQ8KA==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/remark-lint-final-definition/-/remark-lint-final-definition-2.0.0.tgz", + "integrity": "sha512-oGObGXt/CdQfvnoQHWrFPtpTQK7oHiw5kBGzG5GbPSj3rrv30ohD5K+11ljEle9e3wO048EiWDROO5eKzIeeGw==", "requires": { "unified-lint-rule": "^1.0.0", "unist-util-generated": "^1.1.0", "unist-util-position": "^3.0.0", - "unist-util-visit": "^1.1.1" + "unist-util-visit": "^2.0.0" + }, + "dependencies": { + "unist-util-is": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.0.2.tgz", + "integrity": "sha512-Ofx8uf6haexJwI1gxWMGg6I/dLnF2yE+KibhD3/diOqY2TinLcqHXCV6OI5gFVn3xQqDH+u0M625pfKwIwgBKQ==" + }, + "unist-util-visit": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-2.0.2.tgz", + "integrity": "sha512-HoHNhGnKj6y+Sq+7ASo2zpVdfdRifhTgX2KTU3B/sO/TTlZchp7E3S4vjRzDJ7L60KmrCPsQkVK3lEF3cz36XQ==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0", + "unist-util-visit-parents": "^3.0.0" + } + }, + "unist-util-visit-parents": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.0.2.tgz", + "integrity": "sha512-yJEfuZtzFpQmg1OSCyS9M5NJRrln/9FbYosH3iW0MG402QbdbaB8ZESwUv9RO6nRfLAKvWcMxCwdLWOov36x/g==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0" + } + } } }, "remark-lint-final-newline": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/remark-lint-final-newline/-/remark-lint-final-newline-1.0.3.tgz", - "integrity": "sha512-ETAadktv75EwUS3XDhyZUVstXKxfPAEn7SmfN9kZ4+Jb4qo4hHE9gtTOzhE6HxLUxxl9BBhpC5mMO3JcL8UZ5A==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/remark-lint-final-newline/-/remark-lint-final-newline-1.0.4.tgz", + "integrity": "sha512-pUwqX8TVTTfqX5arMnu9Dr2ufg6wZ6Pk1VeqlnWfK92PBXLG8Zc3yrLpYXOJy1fHdWpqUECRRowG0H/OkZIEbw==", "requires": { "unified-lint-rule": "^1.0.0" } }, "remark-lint-first-heading-level": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/remark-lint-first-heading-level/-/remark-lint-first-heading-level-1.1.4.tgz", - "integrity": "sha512-iU5G4ZmGx8/2p/U2rPc6qhjyQ/BCcOuj07KzI7XxapYfJqZF6Xxz2rC2b/5xsDJAz2vXG74U4iG3c9vmbyH9WQ==", - "requires": { - "unified-lint-rule": "^1.0.0", - "unist-util-generated": "^1.1.0", - "unist-util-visit": "^1.4.0" - } - }, - "remark-lint-hard-break-spaces": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/remark-lint-hard-break-spaces/-/remark-lint-hard-break-spaces-1.0.4.tgz", - "integrity": "sha512-YM82UpgliZCZhGNmFxEe7ArfhqR5CplFf2bc0k0+8w3rKWKx7EJcGMar2NK410tIi40gGeWtH/pIEypPJFCCiA==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/remark-lint-first-heading-level/-/remark-lint-first-heading-level-2.0.0.tgz", + "integrity": "sha512-LFjKO6nQAPo0oarhLZqHaGUqCpLvjeVuJTr58yo3jpC4v0Gmb1iG8X53hrLtxPz+MP4J5WVz/83eAXCH+Vh3vA==", "requires": { "unified-lint-rule": "^1.0.0", "unist-util-generated": "^1.1.0", - "unist-util-position": "^3.0.0", - "unist-util-visit": "^1.1.1" - } + "unist-util-visit": "^2.0.0" + }, + "dependencies": { + "unist-util-is": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.0.2.tgz", + "integrity": "sha512-Ofx8uf6haexJwI1gxWMGg6I/dLnF2yE+KibhD3/diOqY2TinLcqHXCV6OI5gFVn3xQqDH+u0M625pfKwIwgBKQ==" + }, + "unist-util-visit": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-2.0.2.tgz", + "integrity": "sha512-HoHNhGnKj6y+Sq+7ASo2zpVdfdRifhTgX2KTU3B/sO/TTlZchp7E3S4vjRzDJ7L60KmrCPsQkVK3lEF3cz36XQ==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0", + "unist-util-visit-parents": "^3.0.0" + } + }, + "unist-util-visit-parents": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.0.2.tgz", + "integrity": "sha512-yJEfuZtzFpQmg1OSCyS9M5NJRrln/9FbYosH3iW0MG402QbdbaB8ZESwUv9RO6nRfLAKvWcMxCwdLWOov36x/g==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0" + } + } + } + }, + "remark-lint-hard-break-spaces": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/remark-lint-hard-break-spaces/-/remark-lint-hard-break-spaces-2.0.0.tgz", + "integrity": "sha512-dmB8GucOSDtEctwa+Y8JlSAWF4q8HcquvLr+OpFOSE1QCrpFoZdb2mcSY+rZuTtfeg4S60orhhzArd2aiHvUPQ==", + "requires": { + "unified-lint-rule": "^1.0.0", + "unist-util-generated": "^1.1.0", + "unist-util-position": "^3.0.0", + "unist-util-visit": "^2.0.0" + }, + "dependencies": { + "unist-util-is": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.0.2.tgz", + "integrity": "sha512-Ofx8uf6haexJwI1gxWMGg6I/dLnF2yE+KibhD3/diOqY2TinLcqHXCV6OI5gFVn3xQqDH+u0M625pfKwIwgBKQ==" + }, + "unist-util-visit": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-2.0.2.tgz", + "integrity": "sha512-HoHNhGnKj6y+Sq+7ASo2zpVdfdRifhTgX2KTU3B/sO/TTlZchp7E3S4vjRzDJ7L60KmrCPsQkVK3lEF3cz36XQ==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0", + "unist-util-visit-parents": "^3.0.0" + } + }, + "unist-util-visit-parents": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.0.2.tgz", + "integrity": "sha512-yJEfuZtzFpQmg1OSCyS9M5NJRrln/9FbYosH3iW0MG402QbdbaB8ZESwUv9RO6nRfLAKvWcMxCwdLWOov36x/g==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0" + } + } + } }, "remark-lint-heading-style": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/remark-lint-heading-style/-/remark-lint-heading-style-1.0.3.tgz", - "integrity": "sha512-ZUhMav0HHUxo5gzLqxQsOf2ZpP/I3m6EEK8q25/kqpCYnwm1uRJ5CQ40PDQx46pmKtVibIMzDmraYovxNG3ovw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/remark-lint-heading-style/-/remark-lint-heading-style-2.0.0.tgz", + "integrity": "sha512-LZvnAq5zWh9i/oRAEocth8yajEEH4kRgCrL4dE547Nkv6zaR2SKcym+uXMZ+GF6WEWcjXMiwSxIL7MHaT6XexA==", "requires": { "mdast-util-heading-style": "^1.0.2", "unified-lint-rule": "^1.0.0", "unist-util-generated": "^1.1.0", - "unist-util-visit": "^1.1.1" + "unist-util-visit": "^2.0.0" + }, + "dependencies": { + "unist-util-is": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.0.2.tgz", + "integrity": "sha512-Ofx8uf6haexJwI1gxWMGg6I/dLnF2yE+KibhD3/diOqY2TinLcqHXCV6OI5gFVn3xQqDH+u0M625pfKwIwgBKQ==" + }, + "unist-util-visit": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-2.0.2.tgz", + "integrity": "sha512-HoHNhGnKj6y+Sq+7ASo2zpVdfdRifhTgX2KTU3B/sO/TTlZchp7E3S4vjRzDJ7L60KmrCPsQkVK3lEF3cz36XQ==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0", + "unist-util-visit-parents": "^3.0.0" + } + }, + "unist-util-visit-parents": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.0.2.tgz", + "integrity": "sha512-yJEfuZtzFpQmg1OSCyS9M5NJRrln/9FbYosH3iW0MG402QbdbaB8ZESwUv9RO6nRfLAKvWcMxCwdLWOov36x/g==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0" + } + } } }, "remark-lint-list-item-bullet-indent": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/remark-lint-list-item-bullet-indent/-/remark-lint-list-item-bullet-indent-1.0.3.tgz", - "integrity": "sha512-iVxQbrgzLpMHG3C6o6wRta/+Bc96etOiBYJnh2zm/aWz6DJ7cGLDykngblP/C4he7LYSeWOD/8Y57HbXZwM2Og==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/remark-lint-list-item-bullet-indent/-/remark-lint-list-item-bullet-indent-2.0.0.tgz", + "integrity": "sha512-8iK+ht771UBf/Iuj4YBgdLnFFOyEgfXY62jBoywtMuiOLVWXDfPe+jUY7pCrnFjsnxXGEnMaxHJqENgrHd0J/w==", "requires": { - "plur": "^3.0.0", + "pluralize": "^8.0.0", "unified-lint-rule": "^1.0.0", "unist-util-generated": "^1.1.0", "unist-util-position": "^3.0.0", - "unist-util-visit": "^1.1.1" + "unist-util-visit": "^2.0.0" + }, + "dependencies": { + "unist-util-is": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.0.2.tgz", + "integrity": "sha512-Ofx8uf6haexJwI1gxWMGg6I/dLnF2yE+KibhD3/diOqY2TinLcqHXCV6OI5gFVn3xQqDH+u0M625pfKwIwgBKQ==" + }, + "unist-util-visit": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-2.0.2.tgz", + "integrity": "sha512-HoHNhGnKj6y+Sq+7ASo2zpVdfdRifhTgX2KTU3B/sO/TTlZchp7E3S4vjRzDJ7L60KmrCPsQkVK3lEF3cz36XQ==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0", + "unist-util-visit-parents": "^3.0.0" + } + }, + "unist-util-visit-parents": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.0.2.tgz", + "integrity": "sha512-yJEfuZtzFpQmg1OSCyS9M5NJRrln/9FbYosH3iW0MG402QbdbaB8ZESwUv9RO6nRfLAKvWcMxCwdLWOov36x/g==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0" + } + } } }, "remark-lint-list-item-indent": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/remark-lint-list-item-indent/-/remark-lint-list-item-indent-1.0.4.tgz", - "integrity": "sha512-Sv0gVH6qP1/nFpbJuyyguB9sAD2o42StD2WbEZeUcEexXwRO4u/YaX0Pm5pMtCiEHyN+qyL6ShKBQMtgol9BeA==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/remark-lint-list-item-indent/-/remark-lint-list-item-indent-2.0.0.tgz", + "integrity": "sha512-qnKsq2UQpCC8gnI1O23dgoKsd+5RAJrAJuvHXrlkRgzsab7BOMluptxRlyLVXn0P71l4Wo/bfo84Ual7qpOyWw==", "requires": { - "plur": "^3.0.0", + "pluralize": "^8.0.0", "unified-lint-rule": "^1.0.0", "unist-util-generated": "^1.1.0", "unist-util-position": "^3.0.0", - "unist-util-visit": "^1.1.1" + "unist-util-visit": "^2.0.0" + }, + "dependencies": { + "unist-util-is": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.0.2.tgz", + "integrity": "sha512-Ofx8uf6haexJwI1gxWMGg6I/dLnF2yE+KibhD3/diOqY2TinLcqHXCV6OI5gFVn3xQqDH+u0M625pfKwIwgBKQ==" + }, + "unist-util-visit": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-2.0.2.tgz", + "integrity": "sha512-HoHNhGnKj6y+Sq+7ASo2zpVdfdRifhTgX2KTU3B/sO/TTlZchp7E3S4vjRzDJ7L60KmrCPsQkVK3lEF3cz36XQ==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0", + "unist-util-visit-parents": "^3.0.0" + } + }, + "unist-util-visit-parents": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.0.2.tgz", + "integrity": "sha512-yJEfuZtzFpQmg1OSCyS9M5NJRrln/9FbYosH3iW0MG402QbdbaB8ZESwUv9RO6nRfLAKvWcMxCwdLWOov36x/g==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0" + } + } } }, "remark-lint-maximum-line-length": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/remark-lint-maximum-line-length/-/remark-lint-maximum-line-length-1.2.1.tgz", - "integrity": "sha512-CSxX1qc+rAqixk8eBrI+yBsUmD8YGfOezFeJWjJRuUaoOvs67oqCIU+I2HbwcUYY8/KnDxF1MCp+uCM0RkjKKw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/remark-lint-maximum-line-length/-/remark-lint-maximum-line-length-2.0.0.tgz", + "integrity": "sha512-Qhe1QwDGisMP/UraUexWIPNBXJO8VQ7LIelz4NdftBQl/FxDVoXn3477Fm+8bGtcTXkMPF+QfllE4L1U7kJQgQ==", "requires": { "unified-lint-rule": "^1.0.0", "unist-util-generated": "^1.1.0", "unist-util-position": "^3.0.0", - "unist-util-visit": "^1.4.0" + "unist-util-visit": "^2.0.0" + }, + "dependencies": { + "unist-util-is": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.0.2.tgz", + "integrity": "sha512-Ofx8uf6haexJwI1gxWMGg6I/dLnF2yE+KibhD3/diOqY2TinLcqHXCV6OI5gFVn3xQqDH+u0M625pfKwIwgBKQ==" + }, + "unist-util-visit": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-2.0.2.tgz", + "integrity": "sha512-HoHNhGnKj6y+Sq+7ASo2zpVdfdRifhTgX2KTU3B/sO/TTlZchp7E3S4vjRzDJ7L60KmrCPsQkVK3lEF3cz36XQ==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0", + "unist-util-visit-parents": "^3.0.0" + } + }, + "unist-util-visit-parents": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.0.2.tgz", + "integrity": "sha512-yJEfuZtzFpQmg1OSCyS9M5NJRrln/9FbYosH3iW0MG402QbdbaB8ZESwUv9RO6nRfLAKvWcMxCwdLWOov36x/g==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0" + } + } } }, "remark-lint-no-auto-link-without-protocol": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/remark-lint-no-auto-link-without-protocol/-/remark-lint-no-auto-link-without-protocol-1.0.3.tgz", - "integrity": "sha512-k+hg2mXnO4Q9WV+UShPLen5oThvFxcRVWkx2hviVd/nu3eiszBKH3o38csBwjeJoMG3l2ZhdUW8dlOBhq8670Q==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/remark-lint-no-auto-link-without-protocol/-/remark-lint-no-auto-link-without-protocol-2.0.0.tgz", + "integrity": "sha512-pIntUa+zNiyRxIt2Wvp1soktDbVnk1SEiJXsjcLYYn9GapgXqOQG5ZfFwR6zxTkGV5mZKo9927EvHQkvIV6cLQ==", "requires": { "mdast-util-to-string": "^1.0.2", "unified-lint-rule": "^1.0.0", "unist-util-generated": "^1.1.0", "unist-util-position": "^3.0.0", - "unist-util-visit": "^1.1.1" + "unist-util-visit": "^2.0.0" + }, + "dependencies": { + "unist-util-is": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.0.2.tgz", + "integrity": "sha512-Ofx8uf6haexJwI1gxWMGg6I/dLnF2yE+KibhD3/diOqY2TinLcqHXCV6OI5gFVn3xQqDH+u0M625pfKwIwgBKQ==" + }, + "unist-util-visit": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-2.0.2.tgz", + "integrity": "sha512-HoHNhGnKj6y+Sq+7ASo2zpVdfdRifhTgX2KTU3B/sO/TTlZchp7E3S4vjRzDJ7L60KmrCPsQkVK3lEF3cz36XQ==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0", + "unist-util-visit-parents": "^3.0.0" + } + }, + "unist-util-visit-parents": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.0.2.tgz", + "integrity": "sha512-yJEfuZtzFpQmg1OSCyS9M5NJRrln/9FbYosH3iW0MG402QbdbaB8ZESwUv9RO6nRfLAKvWcMxCwdLWOov36x/g==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0" + } + } } }, "remark-lint-no-blockquote-without-marker": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/remark-lint-no-blockquote-without-marker/-/remark-lint-no-blockquote-without-marker-2.0.3.tgz", - "integrity": "sha512-faDzKrA6aKidsRXG6gcIlCO8TexLxIxe+n9B3mdnl8mhZGgE0FfWTkIWVMj0IYps/xVsVMf45KxhXgc1wU9kwg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/remark-lint-no-blockquote-without-marker/-/remark-lint-no-blockquote-without-marker-3.0.0.tgz", + "integrity": "sha512-auyAxMVDuhvGw29VilqUfUIUnBT7qmByG/kBPqV/GwM1a5rn4fIUJ7p9Je9BlWMRCBMTNQUMsm3ce0dawouVew==", "requires": { "unified-lint-rule": "^1.0.0", "unist-util-generated": "^1.1.0", "unist-util-position": "^3.0.0", - "unist-util-visit": "^1.1.1", - "vfile-location": "^2.0.1" + "unist-util-visit": "^2.0.0", + "vfile-location": "^3.0.0" + }, + "dependencies": { + "unist-util-is": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.0.2.tgz", + "integrity": "sha512-Ofx8uf6haexJwI1gxWMGg6I/dLnF2yE+KibhD3/diOqY2TinLcqHXCV6OI5gFVn3xQqDH+u0M625pfKwIwgBKQ==" + }, + "unist-util-visit": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-2.0.2.tgz", + "integrity": "sha512-HoHNhGnKj6y+Sq+7ASo2zpVdfdRifhTgX2KTU3B/sO/TTlZchp7E3S4vjRzDJ7L60KmrCPsQkVK3lEF3cz36XQ==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0", + "unist-util-visit-parents": "^3.0.0" + } + }, + "unist-util-visit-parents": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.0.2.tgz", + "integrity": "sha512-yJEfuZtzFpQmg1OSCyS9M5NJRrln/9FbYosH3iW0MG402QbdbaB8ZESwUv9RO6nRfLAKvWcMxCwdLWOov36x/g==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0" + } + }, + "vfile-location": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-3.0.1.tgz", + "integrity": "sha512-yYBO06eeN/Ki6Kh1QAkgzYpWT1d3Qln+ZCtSbJqFExPl1S3y2qqotJQXoh6qEvl/jDlgpUJolBn3PItVnnZRqQ==" + } } }, "remark-lint-no-consecutive-blank-lines": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/remark-lint-no-consecutive-blank-lines/-/remark-lint-no-consecutive-blank-lines-1.0.3.tgz", - "integrity": "sha512-2Ef7fPxrfLditA7sTo2Qfqd+xwh/luWl8GzILE5vcWIxLDqKk3dTLJkB5nP+7Cr4kqWJAwXnRkEDd77ehrRV3A==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/remark-lint-no-consecutive-blank-lines/-/remark-lint-no-consecutive-blank-lines-2.0.0.tgz", + "integrity": "sha512-qIXHW0atHaOmHlu7V+4Krs5IAdIZhcXoeRdOMgqkGNW8CtfL12pP8KnzigAB9D5/X/qxPxZ95Js/KaESFS+3hA==", "requires": { - "plur": "^3.0.0", + "pluralize": "^8.0.0", "unified-lint-rule": "^1.0.0", "unist-util-generated": "^1.1.0", "unist-util-position": "^3.0.0", - "unist-util-visit": "^1.1.1" + "unist-util-visit": "^2.0.0" + }, + "dependencies": { + "unist-util-is": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.0.2.tgz", + "integrity": "sha512-Ofx8uf6haexJwI1gxWMGg6I/dLnF2yE+KibhD3/diOqY2TinLcqHXCV6OI5gFVn3xQqDH+u0M625pfKwIwgBKQ==" + }, + "unist-util-visit": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-2.0.2.tgz", + "integrity": "sha512-HoHNhGnKj6y+Sq+7ASo2zpVdfdRifhTgX2KTU3B/sO/TTlZchp7E3S4vjRzDJ7L60KmrCPsQkVK3lEF3cz36XQ==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0", + "unist-util-visit-parents": "^3.0.0" + } + }, + "unist-util-visit-parents": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.0.2.tgz", + "integrity": "sha512-yJEfuZtzFpQmg1OSCyS9M5NJRrln/9FbYosH3iW0MG402QbdbaB8ZESwUv9RO6nRfLAKvWcMxCwdLWOov36x/g==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0" + } + } } }, "remark-lint-no-duplicate-definitions": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/remark-lint-no-duplicate-definitions/-/remark-lint-no-duplicate-definitions-1.0.5.tgz", - "integrity": "sha512-zKXmfNUODXhJsGQdqfguMG9Nl9v1sLaDsQgMjUtmOSoQRnNud9ThQAZl62eX5jBn5HKcpOifG80tgkyBvU5eEw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/remark-lint-no-duplicate-definitions/-/remark-lint-no-duplicate-definitions-2.0.0.tgz", + "integrity": "sha512-Z5DkYKbmS+r4D0ZhaXgK6L72EWzhiklpXNF/TS+KCsffAFgfy5aJfSA3A8GpVNj1wYMP35STXBGBCLW5TckvGw==", "requires": { "unified-lint-rule": "^1.0.0", "unist-util-generated": "^1.1.0", "unist-util-position": "^3.0.0", "unist-util-stringify-position": "^2.0.0", - "unist-util-visit": "^1.4.0" + "unist-util-visit": "^2.0.0" + }, + "dependencies": { + "unist-util-is": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.0.2.tgz", + "integrity": "sha512-Ofx8uf6haexJwI1gxWMGg6I/dLnF2yE+KibhD3/diOqY2TinLcqHXCV6OI5gFVn3xQqDH+u0M625pfKwIwgBKQ==" + }, + "unist-util-visit": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-2.0.2.tgz", + "integrity": "sha512-HoHNhGnKj6y+Sq+7ASo2zpVdfdRifhTgX2KTU3B/sO/TTlZchp7E3S4vjRzDJ7L60KmrCPsQkVK3lEF3cz36XQ==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0", + "unist-util-visit-parents": "^3.0.0" + } + }, + "unist-util-visit-parents": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.0.2.tgz", + "integrity": "sha512-yJEfuZtzFpQmg1OSCyS9M5NJRrln/9FbYosH3iW0MG402QbdbaB8ZESwUv9RO6nRfLAKvWcMxCwdLWOov36x/g==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0" + } + } } }, "remark-lint-no-file-name-articles": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/remark-lint-no-file-name-articles/-/remark-lint-no-file-name-articles-1.0.3.tgz", - "integrity": "sha512-YZDJDKUWZEmhrO6tHB0u0K0K2qJKxyg/kryr14OaRMvWLS62RgMn97sXPZ38XOSN7mOcCnl0k7/bClghJXx0sg==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/remark-lint-no-file-name-articles/-/remark-lint-no-file-name-articles-1.0.4.tgz", + "integrity": "sha512-Ieqg/2WjYs5M+IoZsFrQUG0niN8zRC6IAYWOVaHi3UK/1P0IdmXKZE6pCFSJrhletawAaPw9Xtl42/45tcccCA==", "requires": { "unified-lint-rule": "^1.0.0" } }, "remark-lint-no-file-name-consecutive-dashes": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/remark-lint-no-file-name-consecutive-dashes/-/remark-lint-no-file-name-consecutive-dashes-1.0.3.tgz", - "integrity": "sha512-7f4vyXn/ca5lAguWWC3eu5hi8oZ7etX7aQlnTSgQZeslnJCbVJm6V6prFJKAzrqbBzMicUXr5pZLBDoXyTvHHw==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/remark-lint-no-file-name-consecutive-dashes/-/remark-lint-no-file-name-consecutive-dashes-1.0.4.tgz", + "integrity": "sha512-Fyc8mL+Fyt2b/BVkCc2Y+GjJ4SwafDKQEUaizeuZQDBTiqRK3S4L9YpvLHTAPgTNntZkXLUsHzFDlGyKzW2gBQ==", "requires": { "unified-lint-rule": "^1.0.0" } }, "remark-lint-no-file-name-outer-dashes": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/remark-lint-no-file-name-outer-dashes/-/remark-lint-no-file-name-outer-dashes-1.0.4.tgz", - "integrity": "sha512-+bZvvme2Bm3Vp5L2iKuvGHYVmHKrTkkRt8JqJPGepuhvBvT4Q7+CgfKyMtC/hIjyl+IcuJQ2H0qPRzdicjy1wQ==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/remark-lint-no-file-name-outer-dashes/-/remark-lint-no-file-name-outer-dashes-1.0.5.tgz", + "integrity": "sha512-5CMrCqyJj4ydM2QMhMAc60o08fJDxBgmO62r+RqVs+aIdIK6TtsF+T8oX+aTEtc3y/euKJ681tqEsSeJZh/h0A==", "requires": { "unified-lint-rule": "^1.0.0" } }, "remark-lint-no-heading-content-indent": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/remark-lint-no-heading-content-indent/-/remark-lint-no-heading-content-indent-1.0.3.tgz", - "integrity": "sha512-7xM6X5E/dt8OXOHdejH+sfYb139a3kMr8ZSSkcp90Ab1y+ZQBNaWsR3mYh8FRKkYPTN5eyd+KjhNpLWyqqCbgg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/remark-lint-no-heading-content-indent/-/remark-lint-no-heading-content-indent-2.0.0.tgz", + "integrity": "sha512-Zqg0WXG60Nan8j7HZtnBXidMxXhlhc7Q5JrB54I3n7H3vSPCyaqhZJ2/obYVLalEVGND8NOJGvfA1rtchaZyYg==", "requires": { "mdast-util-heading-style": "^1.0.2", - "plur": "^3.0.0", + "pluralize": "^8.0.0", "unified-lint-rule": "^1.0.0", "unist-util-generated": "^1.1.0", "unist-util-position": "^3.0.0", - "unist-util-visit": "^1.1.1" + "unist-util-visit": "^2.0.0" + }, + "dependencies": { + "unist-util-is": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.0.2.tgz", + "integrity": "sha512-Ofx8uf6haexJwI1gxWMGg6I/dLnF2yE+KibhD3/diOqY2TinLcqHXCV6OI5gFVn3xQqDH+u0M625pfKwIwgBKQ==" + }, + "unist-util-visit": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-2.0.2.tgz", + "integrity": "sha512-HoHNhGnKj6y+Sq+7ASo2zpVdfdRifhTgX2KTU3B/sO/TTlZchp7E3S4vjRzDJ7L60KmrCPsQkVK3lEF3cz36XQ==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0", + "unist-util-visit-parents": "^3.0.0" + } + }, + "unist-util-visit-parents": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.0.2.tgz", + "integrity": "sha512-yJEfuZtzFpQmg1OSCyS9M5NJRrln/9FbYosH3iW0MG402QbdbaB8ZESwUv9RO6nRfLAKvWcMxCwdLWOov36x/g==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0" + } + } } }, "remark-lint-no-heading-indent": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/remark-lint-no-heading-indent/-/remark-lint-no-heading-indent-1.0.3.tgz", - "integrity": "sha512-RTvsFfiXjHZOxU+t7DtNPk9M9EqGe82MZbo+VOJEUBkQKf17qp4EZkJEvl4h9pn+hJmoKHLb7Vfge8Bxe42gcQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/remark-lint-no-heading-indent/-/remark-lint-no-heading-indent-2.0.0.tgz", + "integrity": "sha512-dBjSP2QdQVypFpwQdjZ6h/VsyY3CBY+IXY2edSWiITOofZrt7knmwrLFUoxPtvc9k4PIBA7XXpiwPPYBQzuLFg==", "requires": { - "plur": "^3.0.0", + "pluralize": "^8.0.0", "unified-lint-rule": "^1.0.0", "unist-util-generated": "^1.1.0", "unist-util-position": "^3.0.0", - "unist-util-visit": "^1.1.1" + "unist-util-visit": "^2.0.0" + }, + "dependencies": { + "unist-util-is": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.0.2.tgz", + "integrity": "sha512-Ofx8uf6haexJwI1gxWMGg6I/dLnF2yE+KibhD3/diOqY2TinLcqHXCV6OI5gFVn3xQqDH+u0M625pfKwIwgBKQ==" + }, + "unist-util-visit": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-2.0.2.tgz", + "integrity": "sha512-HoHNhGnKj6y+Sq+7ASo2zpVdfdRifhTgX2KTU3B/sO/TTlZchp7E3S4vjRzDJ7L60KmrCPsQkVK3lEF3cz36XQ==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0", + "unist-util-visit-parents": "^3.0.0" + } + }, + "unist-util-visit-parents": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.0.2.tgz", + "integrity": "sha512-yJEfuZtzFpQmg1OSCyS9M5NJRrln/9FbYosH3iW0MG402QbdbaB8ZESwUv9RO6nRfLAKvWcMxCwdLWOov36x/g==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0" + } + } } }, "remark-lint-no-inline-padding": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/remark-lint-no-inline-padding/-/remark-lint-no-inline-padding-1.0.4.tgz", - "integrity": "sha512-u5rgbDkcfVv645YxxOwoGBBJbsHEwWm/XqnO8EhfKTxkfKOF4ZItG7Ajhj89EDaeXMkvCcB/avBl4bj50eJH3g==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/remark-lint-no-inline-padding/-/remark-lint-no-inline-padding-2.0.0.tgz", + "integrity": "sha512-0YueQ3SBA8zFQYCN0/afRc6ZuSbM4Azx4sPVeVpAfMT0MrYgmi6msswyhUDXaeN2RwVO6bx/ZW6di8dVqRr7UA==", "requires": { "mdast-util-to-string": "^1.0.2", "unified-lint-rule": "^1.0.0", "unist-util-generated": "^1.1.0", - "unist-util-visit": "^1.4.0" + "unist-util-visit": "^2.0.0" + }, + "dependencies": { + "unist-util-is": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.0.2.tgz", + "integrity": "sha512-Ofx8uf6haexJwI1gxWMGg6I/dLnF2yE+KibhD3/diOqY2TinLcqHXCV6OI5gFVn3xQqDH+u0M625pfKwIwgBKQ==" + }, + "unist-util-visit": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-2.0.2.tgz", + "integrity": "sha512-HoHNhGnKj6y+Sq+7ASo2zpVdfdRifhTgX2KTU3B/sO/TTlZchp7E3S4vjRzDJ7L60KmrCPsQkVK3lEF3cz36XQ==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0", + "unist-util-visit-parents": "^3.0.0" + } + }, + "unist-util-visit-parents": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.0.2.tgz", + "integrity": "sha512-yJEfuZtzFpQmg1OSCyS9M5NJRrln/9FbYosH3iW0MG402QbdbaB8ZESwUv9RO6nRfLAKvWcMxCwdLWOov36x/g==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0" + } + } } }, "remark-lint-no-literal-urls": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/remark-lint-no-literal-urls/-/remark-lint-no-literal-urls-1.0.3.tgz", - "integrity": "sha512-H5quyMzl2kaewK+jYD1FI0G1SIinIsIp4DEyOUwIR+vYUoKwo0B4vvW0cmPpD1dgqqxHYx0B2B0JQQKFVWzGiw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/remark-lint-no-literal-urls/-/remark-lint-no-literal-urls-2.0.0.tgz", + "integrity": "sha512-bZAxr65ftz9joszDkSs2LBeJB2cRE8GydUtxYdA1WRHYmVW1AfM5ilcqLnWhiOmu+XMPH7J0eRvUzbtvu+xerw==", "requires": { "mdast-util-to-string": "^1.0.2", "unified-lint-rule": "^1.0.0", "unist-util-generated": "^1.1.0", "unist-util-position": "^3.0.0", - "unist-util-visit": "^1.1.1" + "unist-util-visit": "^2.0.0" + }, + "dependencies": { + "unist-util-is": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.0.2.tgz", + "integrity": "sha512-Ofx8uf6haexJwI1gxWMGg6I/dLnF2yE+KibhD3/diOqY2TinLcqHXCV6OI5gFVn3xQqDH+u0M625pfKwIwgBKQ==" + }, + "unist-util-visit": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-2.0.2.tgz", + "integrity": "sha512-HoHNhGnKj6y+Sq+7ASo2zpVdfdRifhTgX2KTU3B/sO/TTlZchp7E3S4vjRzDJ7L60KmrCPsQkVK3lEF3cz36XQ==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0", + "unist-util-visit-parents": "^3.0.0" + } + }, + "unist-util-visit-parents": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.0.2.tgz", + "integrity": "sha512-yJEfuZtzFpQmg1OSCyS9M5NJRrln/9FbYosH3iW0MG402QbdbaB8ZESwUv9RO6nRfLAKvWcMxCwdLWOov36x/g==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0" + } + } } }, "remark-lint-no-multiple-toplevel-headings": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/remark-lint-no-multiple-toplevel-headings/-/remark-lint-no-multiple-toplevel-headings-1.0.4.tgz", - "integrity": "sha512-0wDddx6htN5sL9/rofesiQF0oEgwN5224UmueiDx0ZUlYrn6VS0/SS0X3WWxtXmyeqlExfWF3D/g89tNs7dcjw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/remark-lint-no-multiple-toplevel-headings/-/remark-lint-no-multiple-toplevel-headings-2.0.0.tgz", + "integrity": "sha512-vpbdnrqUykyqpjaREg4W07J3gHgR0eTapDkz9RjVwyGNmBry7xUnyvaiPavAKqsA+qO/nnpIH8Qyw/2u5hDsJQ==", "requires": { "unified-lint-rule": "^1.0.0", "unist-util-generated": "^1.1.0", "unist-util-position": "^3.0.0", "unist-util-stringify-position": "^2.0.0", - "unist-util-visit": "^1.1.1" + "unist-util-visit": "^2.0.0" + }, + "dependencies": { + "unist-util-is": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.0.2.tgz", + "integrity": "sha512-Ofx8uf6haexJwI1gxWMGg6I/dLnF2yE+KibhD3/diOqY2TinLcqHXCV6OI5gFVn3xQqDH+u0M625pfKwIwgBKQ==" + }, + "unist-util-visit": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-2.0.2.tgz", + "integrity": "sha512-HoHNhGnKj6y+Sq+7ASo2zpVdfdRifhTgX2KTU3B/sO/TTlZchp7E3S4vjRzDJ7L60KmrCPsQkVK3lEF3cz36XQ==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0", + "unist-util-visit-parents": "^3.0.0" + } + }, + "unist-util-visit-parents": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.0.2.tgz", + "integrity": "sha512-yJEfuZtzFpQmg1OSCyS9M5NJRrln/9FbYosH3iW0MG402QbdbaB8ZESwUv9RO6nRfLAKvWcMxCwdLWOov36x/g==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0" + } + } } }, "remark-lint-no-shell-dollars": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/remark-lint-no-shell-dollars/-/remark-lint-no-shell-dollars-1.0.3.tgz", - "integrity": "sha512-fT3lQMTjEkPryL+63qDP1NfrohP3tG5i3SkNWSSR4VLU6OSsSSXlHGQGjo0ag//+EPKHB5/9frB/YQ0gDEPRGQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/remark-lint-no-shell-dollars/-/remark-lint-no-shell-dollars-2.0.0.tgz", + "integrity": "sha512-1uEM0kSGlV6UY7w3PdIeIf/USFFvVuU1352myQdaiw/Wof7+uVXznFFCPnhJDTVlPN4vrgwFnLb32UwXrjkrQw==", "requires": { "unified-lint-rule": "^1.0.0", "unist-util-generated": "^1.1.0", - "unist-util-visit": "^1.1.1" + "unist-util-visit": "^2.0.0" + }, + "dependencies": { + "unist-util-is": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.0.2.tgz", + "integrity": "sha512-Ofx8uf6haexJwI1gxWMGg6I/dLnF2yE+KibhD3/diOqY2TinLcqHXCV6OI5gFVn3xQqDH+u0M625pfKwIwgBKQ==" + }, + "unist-util-visit": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-2.0.2.tgz", + "integrity": "sha512-HoHNhGnKj6y+Sq+7ASo2zpVdfdRifhTgX2KTU3B/sO/TTlZchp7E3S4vjRzDJ7L60KmrCPsQkVK3lEF3cz36XQ==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0", + "unist-util-visit-parents": "^3.0.0" + } + }, + "unist-util-visit-parents": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.0.2.tgz", + "integrity": "sha512-yJEfuZtzFpQmg1OSCyS9M5NJRrln/9FbYosH3iW0MG402QbdbaB8ZESwUv9RO6nRfLAKvWcMxCwdLWOov36x/g==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0" + } + } } }, "remark-lint-no-shortcut-reference-image": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/remark-lint-no-shortcut-reference-image/-/remark-lint-no-shortcut-reference-image-1.0.3.tgz", - "integrity": "sha512-CGm27X54kXp/5ehXejDTsZjqzK4uIhLGcrFzN3k/KjdwunQouEY92AARGrLSEuJ1hQx0bJsmnvr/hvQyWAfNJg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/remark-lint-no-shortcut-reference-image/-/remark-lint-no-shortcut-reference-image-2.0.0.tgz", + "integrity": "sha512-kgGCQBHibJ0IFVhWjnfjbqkKC0VeL5+cvyjjwfMJlgZrHEXNOYb2FJE2nvF/l6PSXQ17goRZpznTBfP4mQieUA==", "requires": { "unified-lint-rule": "^1.0.0", "unist-util-generated": "^1.1.0", - "unist-util-visit": "^1.1.1" + "unist-util-visit": "^2.0.0" + }, + "dependencies": { + "unist-util-is": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.0.2.tgz", + "integrity": "sha512-Ofx8uf6haexJwI1gxWMGg6I/dLnF2yE+KibhD3/diOqY2TinLcqHXCV6OI5gFVn3xQqDH+u0M625pfKwIwgBKQ==" + }, + "unist-util-visit": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-2.0.2.tgz", + "integrity": "sha512-HoHNhGnKj6y+Sq+7ASo2zpVdfdRifhTgX2KTU3B/sO/TTlZchp7E3S4vjRzDJ7L60KmrCPsQkVK3lEF3cz36XQ==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0", + "unist-util-visit-parents": "^3.0.0" + } + }, + "unist-util-visit-parents": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.0.2.tgz", + "integrity": "sha512-yJEfuZtzFpQmg1OSCyS9M5NJRrln/9FbYosH3iW0MG402QbdbaB8ZESwUv9RO6nRfLAKvWcMxCwdLWOov36x/g==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0" + } + } } }, "remark-lint-no-shortcut-reference-link": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/remark-lint-no-shortcut-reference-link/-/remark-lint-no-shortcut-reference-link-1.0.4.tgz", - "integrity": "sha512-FXdMJYqspZBhPlxYqfVgVluVXjxStg0RHJzqrk8G9wS8fCS62AE3reoaoiCahwoH1tfKcA+poktbKqDAmZo7Jg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/remark-lint-no-shortcut-reference-link/-/remark-lint-no-shortcut-reference-link-2.0.0.tgz", + "integrity": "sha512-rSdGLWpEsHa4b2doUch+B7QtUHH9XuC8Hndb4rAYf8U0d48KfGAIoiicxUho8qZJ4VA3RIaDo4kA/iQ15Al+Vg==", "requires": { "unified-lint-rule": "^1.0.0", "unist-util-generated": "^1.1.0", - "unist-util-visit": "^1.1.1" + "unist-util-visit": "^2.0.0" + }, + "dependencies": { + "unist-util-is": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.0.2.tgz", + "integrity": "sha512-Ofx8uf6haexJwI1gxWMGg6I/dLnF2yE+KibhD3/diOqY2TinLcqHXCV6OI5gFVn3xQqDH+u0M625pfKwIwgBKQ==" + }, + "unist-util-visit": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-2.0.2.tgz", + "integrity": "sha512-HoHNhGnKj6y+Sq+7ASo2zpVdfdRifhTgX2KTU3B/sO/TTlZchp7E3S4vjRzDJ7L60KmrCPsQkVK3lEF3cz36XQ==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0", + "unist-util-visit-parents": "^3.0.0" + } + }, + "unist-util-visit-parents": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.0.2.tgz", + "integrity": "sha512-yJEfuZtzFpQmg1OSCyS9M5NJRrln/9FbYosH3iW0MG402QbdbaB8ZESwUv9RO6nRfLAKvWcMxCwdLWOov36x/g==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0" + } + } } }, "remark-lint-no-table-indentation": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/remark-lint-no-table-indentation/-/remark-lint-no-table-indentation-1.0.4.tgz", - "integrity": "sha512-H4VGHcg1k8sTIbwazFYLNbDqpPR+M0aHHKDf+93b/xyd27Dp0ODQrMnQbls1Cls5qOAQnwAQbx+75wcpFxP3OQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/remark-lint-no-table-indentation/-/remark-lint-no-table-indentation-2.0.0.tgz", + "integrity": "sha512-5akpqHl+5r3Xe2WFiZB1I9eAwn6zTYqXNd0CVsiTF3DJo0KyvvgyrFRV1sCf/l/kzyNaFvpWpFDTMoWc8EI0RQ==", "requires": { "unified-lint-rule": "^1.0.0", "unist-util-generated": "^1.1.0", "unist-util-position": "^3.0.0", - "unist-util-visit": "^1.4.0" + "unist-util-visit": "^2.0.0" + }, + "dependencies": { + "unist-util-is": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.0.2.tgz", + "integrity": "sha512-Ofx8uf6haexJwI1gxWMGg6I/dLnF2yE+KibhD3/diOqY2TinLcqHXCV6OI5gFVn3xQqDH+u0M625pfKwIwgBKQ==" + }, + "unist-util-visit": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-2.0.2.tgz", + "integrity": "sha512-HoHNhGnKj6y+Sq+7ASo2zpVdfdRifhTgX2KTU3B/sO/TTlZchp7E3S4vjRzDJ7L60KmrCPsQkVK3lEF3cz36XQ==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0", + "unist-util-visit-parents": "^3.0.0" + } + }, + "unist-util-visit-parents": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.0.2.tgz", + "integrity": "sha512-yJEfuZtzFpQmg1OSCyS9M5NJRrln/9FbYosH3iW0MG402QbdbaB8ZESwUv9RO6nRfLAKvWcMxCwdLWOov36x/g==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0" + } + } } }, "remark-lint-no-tabs": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/remark-lint-no-tabs/-/remark-lint-no-tabs-1.0.3.tgz", - "integrity": "sha512-GxmG1LLxYoVjKnQ39On4mFEiVwpLfR3BPTXyaC9UCBUj9fnDQ7ANXceeCsPAyxamr0UM4r2tk/hB9mNT4rLskQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/remark-lint-no-tabs/-/remark-lint-no-tabs-2.0.0.tgz", + "integrity": "sha512-aXbqkgjI0611IN651eXK8NxLQLEjReviU6AjtluMVnvGx1B8Y8mEn5pxznrorXaAjOP4mvX0JYeu8kdhcAaHsw==", "requires": { "unified-lint-rule": "^1.0.0", - "vfile-location": "^2.0.1" + "vfile-location": "^3.0.0" + }, + "dependencies": { + "vfile-location": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-3.0.1.tgz", + "integrity": "sha512-yYBO06eeN/Ki6Kh1QAkgzYpWT1d3Qln+ZCtSbJqFExPl1S3y2qqotJQXoh6qEvl/jDlgpUJolBn3PItVnnZRqQ==" + } } }, "remark-lint-no-trailing-spaces": { @@ -1118,46 +1834,132 @@ } }, "remark-lint-no-undefined-references": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/remark-lint-no-undefined-references/-/remark-lint-no-undefined-references-1.1.1.tgz", - "integrity": "sha512-b1eIjWFaCu6m16Ax2uG33o1v+eRYqDTQRUqU6UeQ76JXmDmVtVO75ZuyRpqqE7VTZRW8YLVurXfJPDXfIa5Wng==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/remark-lint-no-undefined-references/-/remark-lint-no-undefined-references-2.0.0.tgz", + "integrity": "sha512-K4k05pmlMRqEMUDYewitRUx8zM+ntJWbG61dILmL7to7uy0JoSbzuDtz1cxC+kKBKzkulPnyE3WOgRZG8RX2Jg==", "requires": { "collapse-white-space": "^1.0.4", "unified-lint-rule": "^1.0.0", "unist-util-generated": "^1.1.0", - "unist-util-visit": "^1.4.0" + "unist-util-visit": "^2.0.0" + }, + "dependencies": { + "unist-util-is": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.0.2.tgz", + "integrity": "sha512-Ofx8uf6haexJwI1gxWMGg6I/dLnF2yE+KibhD3/diOqY2TinLcqHXCV6OI5gFVn3xQqDH+u0M625pfKwIwgBKQ==" + }, + "unist-util-visit": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-2.0.2.tgz", + "integrity": "sha512-HoHNhGnKj6y+Sq+7ASo2zpVdfdRifhTgX2KTU3B/sO/TTlZchp7E3S4vjRzDJ7L60KmrCPsQkVK3lEF3cz36XQ==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0", + "unist-util-visit-parents": "^3.0.0" + } + }, + "unist-util-visit-parents": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.0.2.tgz", + "integrity": "sha512-yJEfuZtzFpQmg1OSCyS9M5NJRrln/9FbYosH3iW0MG402QbdbaB8ZESwUv9RO6nRfLAKvWcMxCwdLWOov36x/g==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0" + } + } } }, "remark-lint-no-unused-definitions": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/remark-lint-no-unused-definitions/-/remark-lint-no-unused-definitions-1.0.5.tgz", - "integrity": "sha512-Bo22e0RNzc1QMW317KTuStGFDG7uTDUQhm/TrW6Qzud0WXnNnqUyvts+e7wTYoj8VnwhhjyjyoA9lKA3uXMdAQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/remark-lint-no-unused-definitions/-/remark-lint-no-unused-definitions-2.0.0.tgz", + "integrity": "sha512-Y8zrulwaf7z6WR1ICfEGjW92iq2SPEN7Zhrs0nloNITHOg22tIPf28TurUz9HSQ3sEd52d9bZCfW9RkdfMq1xw==", "requires": { "unified-lint-rule": "^1.0.0", "unist-util-generated": "^1.1.0", - "unist-util-visit": "^1.4.0" + "unist-util-visit": "^2.0.0" + }, + "dependencies": { + "unist-util-is": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.0.2.tgz", + "integrity": "sha512-Ofx8uf6haexJwI1gxWMGg6I/dLnF2yE+KibhD3/diOqY2TinLcqHXCV6OI5gFVn3xQqDH+u0M625pfKwIwgBKQ==" + }, + "unist-util-visit": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-2.0.2.tgz", + "integrity": "sha512-HoHNhGnKj6y+Sq+7ASo2zpVdfdRifhTgX2KTU3B/sO/TTlZchp7E3S4vjRzDJ7L60KmrCPsQkVK3lEF3cz36XQ==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0", + "unist-util-visit-parents": "^3.0.0" + } + }, + "unist-util-visit-parents": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.0.2.tgz", + "integrity": "sha512-yJEfuZtzFpQmg1OSCyS9M5NJRrln/9FbYosH3iW0MG402QbdbaB8ZESwUv9RO6nRfLAKvWcMxCwdLWOov36x/g==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0" + } + } } }, "remark-lint-ordered-list-marker-style": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/remark-lint-ordered-list-marker-style/-/remark-lint-ordered-list-marker-style-1.0.3.tgz", - "integrity": "sha512-24TmW1eUa/2JlwprZg9jJ8LKLxNGKnlKiI5YOhN4taUp2yv8daqlV9vR54yfn/ZZQh6EQvbIX0jeVY9NYgQUtw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/remark-lint-ordered-list-marker-style/-/remark-lint-ordered-list-marker-style-2.0.0.tgz", + "integrity": "sha512-zYMZA8tQD/slJYKqsstZv0/Q34Hkdlf4DjC8SOr92PSA60R/xr7JdVd/AHHisbMsFvdnHZrxaB8oIOtbAUJCSw==", "requires": { "unified-lint-rule": "^1.0.0", "unist-util-generated": "^1.1.0", "unist-util-position": "^3.0.0", - "unist-util-visit": "^1.1.1" + "unist-util-visit": "^2.0.0" + }, + "dependencies": { + "unist-util-is": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.0.2.tgz", + "integrity": "sha512-Ofx8uf6haexJwI1gxWMGg6I/dLnF2yE+KibhD3/diOqY2TinLcqHXCV6OI5gFVn3xQqDH+u0M625pfKwIwgBKQ==" + }, + "unist-util-visit": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-2.0.2.tgz", + "integrity": "sha512-HoHNhGnKj6y+Sq+7ASo2zpVdfdRifhTgX2KTU3B/sO/TTlZchp7E3S4vjRzDJ7L60KmrCPsQkVK3lEF3cz36XQ==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0", + "unist-util-visit-parents": "^3.0.0" + } + }, + "unist-util-visit-parents": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.0.2.tgz", + "integrity": "sha512-yJEfuZtzFpQmg1OSCyS9M5NJRrln/9FbYosH3iW0MG402QbdbaB8ZESwUv9RO6nRfLAKvWcMxCwdLWOov36x/g==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0" + } + } } }, "remark-lint-prohibited-strings": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/remark-lint-prohibited-strings/-/remark-lint-prohibited-strings-1.2.1.tgz", - "integrity": "sha512-i3LatoJn/eHkgawdi3eoynikQa5zIEDX+GYcvu4ns5LsOvIrT8WcuvgYQ2kbEFbV0KTy7yBAGLJ9040xs1ssXA==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/remark-lint-prohibited-strings/-/remark-lint-prohibited-strings-1.5.1.tgz", + "integrity": "sha512-YZoRWbzIGRIQkngAowwAKG39kUAGSalYvrxqTzUU4LYj1dS37q7i5WDr4m/mnCcc5KwRin08D62Dphs6g9Btnw==", "requires": { + "escape-string-regexp": "^4.0.0", "unified-lint-rule": "^1.0.2", - "unist-util-visit": "^2.0.0" + "unist-util-position": "^3.1.0", + "unist-util-visit": "^2.0.0", + "vfile-location": "^3.0.1" }, "dependencies": { + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==" + }, "unist-util-is": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.0.2.tgz", @@ -1181,62 +1983,197 @@ "@types/unist": "^2.0.0", "unist-util-is": "^4.0.0" } + }, + "vfile-location": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-3.0.1.tgz", + "integrity": "sha512-yYBO06eeN/Ki6Kh1QAkgzYpWT1d3Qln+ZCtSbJqFExPl1S3y2qqotJQXoh6qEvl/jDlgpUJolBn3PItVnnZRqQ==" } } }, "remark-lint-rule-style": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/remark-lint-rule-style/-/remark-lint-rule-style-1.0.3.tgz", - "integrity": "sha512-SJe7IFORYRdo8JUhMSdcTktVAUVNVp36YYl1ZD9CfHqQHWlFD+3vWYzJXOZfog/i+CyWf7Yi0WVYmQes+167dA==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/remark-lint-rule-style/-/remark-lint-rule-style-2.0.0.tgz", + "integrity": "sha512-fdRfLUE5AJiFEn9rWTQrHwOUG3UcYtIxbWnR7YFvuPlFmzcMRwRHP5ZOcrj4KIpwCdVtlPI3h08m0kfO7a1KlQ==", "requires": { "unified-lint-rule": "^1.0.0", "unist-util-generated": "^1.1.0", "unist-util-position": "^3.0.0", - "unist-util-visit": "^1.1.1" + "unist-util-visit": "^2.0.0" + }, + "dependencies": { + "unist-util-is": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.0.2.tgz", + "integrity": "sha512-Ofx8uf6haexJwI1gxWMGg6I/dLnF2yE+KibhD3/diOqY2TinLcqHXCV6OI5gFVn3xQqDH+u0M625pfKwIwgBKQ==" + }, + "unist-util-visit": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-2.0.2.tgz", + "integrity": "sha512-HoHNhGnKj6y+Sq+7ASo2zpVdfdRifhTgX2KTU3B/sO/TTlZchp7E3S4vjRzDJ7L60KmrCPsQkVK3lEF3cz36XQ==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0", + "unist-util-visit-parents": "^3.0.0" + } + }, + "unist-util-visit-parents": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.0.2.tgz", + "integrity": "sha512-yJEfuZtzFpQmg1OSCyS9M5NJRrln/9FbYosH3iW0MG402QbdbaB8ZESwUv9RO6nRfLAKvWcMxCwdLWOov36x/g==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0" + } + } } }, "remark-lint-strong-marker": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/remark-lint-strong-marker/-/remark-lint-strong-marker-1.0.3.tgz", - "integrity": "sha512-PFkH282dCwfRsVEw9IxbYbaZBY4UcTuT2SN+lA3R0cBeocWnOySVw8YEm4sv9JfV8BLcQA5gc4tj66/U3KCScw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/remark-lint-strong-marker/-/remark-lint-strong-marker-2.0.0.tgz", + "integrity": "sha512-1gl6vZF5BvV4kvS4xxhl8cw90La5Cio9ZFDQuspZMRA2KjzpwoU5RlTUbeHv8OqlKJJ2p7s0MDs8bLZNTzzjHA==", "requires": { "unified-lint-rule": "^1.0.0", "unist-util-generated": "^1.1.0", "unist-util-position": "^3.0.0", - "unist-util-visit": "^1.1.1" + "unist-util-visit": "^2.0.0" + }, + "dependencies": { + "unist-util-is": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.0.2.tgz", + "integrity": "sha512-Ofx8uf6haexJwI1gxWMGg6I/dLnF2yE+KibhD3/diOqY2TinLcqHXCV6OI5gFVn3xQqDH+u0M625pfKwIwgBKQ==" + }, + "unist-util-visit": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-2.0.2.tgz", + "integrity": "sha512-HoHNhGnKj6y+Sq+7ASo2zpVdfdRifhTgX2KTU3B/sO/TTlZchp7E3S4vjRzDJ7L60KmrCPsQkVK3lEF3cz36XQ==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0", + "unist-util-visit-parents": "^3.0.0" + } + }, + "unist-util-visit-parents": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.0.2.tgz", + "integrity": "sha512-yJEfuZtzFpQmg1OSCyS9M5NJRrln/9FbYosH3iW0MG402QbdbaB8ZESwUv9RO6nRfLAKvWcMxCwdLWOov36x/g==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0" + } + } } }, "remark-lint-table-cell-padding": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/remark-lint-table-cell-padding/-/remark-lint-table-cell-padding-1.0.4.tgz", - "integrity": "sha512-AQWWtV1yca1PN27QaFRJbBK6Ro/bopv1XnVKxj/iMebhOU2D2FBJ8rXmMZXVMC3G9OB2WSzGgqH3nP6QY12LoA==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/remark-lint-table-cell-padding/-/remark-lint-table-cell-padding-2.0.0.tgz", + "integrity": "sha512-UstIXIaRVRJPKZPv1AXX/p3qCt//RYNsRHIq8KvL5YQPKaKWRkj2cNermCgm0XoUXy0EmRPNiBtUcuAQaP+jXg==", "requires": { "unified-lint-rule": "^1.0.0", "unist-util-generated": "^1.1.0", "unist-util-position": "^3.0.0", - "unist-util-visit": "^1.4.0" + "unist-util-visit": "^2.0.0" + }, + "dependencies": { + "unist-util-is": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.0.2.tgz", + "integrity": "sha512-Ofx8uf6haexJwI1gxWMGg6I/dLnF2yE+KibhD3/diOqY2TinLcqHXCV6OI5gFVn3xQqDH+u0M625pfKwIwgBKQ==" + }, + "unist-util-visit": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-2.0.2.tgz", + "integrity": "sha512-HoHNhGnKj6y+Sq+7ASo2zpVdfdRifhTgX2KTU3B/sO/TTlZchp7E3S4vjRzDJ7L60KmrCPsQkVK3lEF3cz36XQ==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0", + "unist-util-visit-parents": "^3.0.0" + } + }, + "unist-util-visit-parents": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.0.2.tgz", + "integrity": "sha512-yJEfuZtzFpQmg1OSCyS9M5NJRrln/9FbYosH3iW0MG402QbdbaB8ZESwUv9RO6nRfLAKvWcMxCwdLWOov36x/g==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0" + } + } } }, "remark-lint-table-pipes": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/remark-lint-table-pipes/-/remark-lint-table-pipes-1.0.3.tgz", - "integrity": "sha512-K9NnGZp6i0m/CaOH7ZT4Ymt2seyiRPcBIlNMMGXBm6gpy34KJDDxYqsNUrh+j7dR+Zg4rYAQLnr3BiSHvj+rbQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/remark-lint-table-pipes/-/remark-lint-table-pipes-2.0.0.tgz", + "integrity": "sha512-qGIttPFNT+19BEDz2JJWQtJIClFNIpg+XVw6ruX9LSR7xdo5QG9uARG4XS2EGUQQ7fiLIxQYb8g2dHwuXGbfmA==", "requires": { "unified-lint-rule": "^1.0.0", "unist-util-generated": "^1.1.0", "unist-util-position": "^3.0.0", - "unist-util-visit": "^1.1.1" + "unist-util-visit": "^2.0.0" + }, + "dependencies": { + "unist-util-is": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.0.2.tgz", + "integrity": "sha512-Ofx8uf6haexJwI1gxWMGg6I/dLnF2yE+KibhD3/diOqY2TinLcqHXCV6OI5gFVn3xQqDH+u0M625pfKwIwgBKQ==" + }, + "unist-util-visit": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-2.0.2.tgz", + "integrity": "sha512-HoHNhGnKj6y+Sq+7ASo2zpVdfdRifhTgX2KTU3B/sO/TTlZchp7E3S4vjRzDJ7L60KmrCPsQkVK3lEF3cz36XQ==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0", + "unist-util-visit-parents": "^3.0.0" + } + }, + "unist-util-visit-parents": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.0.2.tgz", + "integrity": "sha512-yJEfuZtzFpQmg1OSCyS9M5NJRrln/9FbYosH3iW0MG402QbdbaB8ZESwUv9RO6nRfLAKvWcMxCwdLWOov36x/g==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0" + } + } } }, "remark-lint-unordered-list-marker-style": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/remark-lint-unordered-list-marker-style/-/remark-lint-unordered-list-marker-style-1.0.3.tgz", - "integrity": "sha512-0nn/Yscy5ImO4fqByrk/Ua02UwGx8LRu+0kdCbkVz4IxPO5qxTEfyccUQZR71zTdMJp1d2OeqyD9XtMaO4X7Ww==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/remark-lint-unordered-list-marker-style/-/remark-lint-unordered-list-marker-style-2.0.0.tgz", + "integrity": "sha512-s+ZiBgBDbIiScPPxWG/r2E/4YY+xP6EFLsLXPV/uPx7JqegIP/4+MAPi7Nz2zLmnQ2eekssZrEXma3uDb/dE1Q==", "requires": { "unified-lint-rule": "^1.0.0", "unist-util-generated": "^1.1.0", "unist-util-position": "^3.0.0", - "unist-util-visit": "^1.1.1" + "unist-util-visit": "^2.0.0" + }, + "dependencies": { + "unist-util-is": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.0.2.tgz", + "integrity": "sha512-Ofx8uf6haexJwI1gxWMGg6I/dLnF2yE+KibhD3/diOqY2TinLcqHXCV6OI5gFVn3xQqDH+u0M625pfKwIwgBKQ==" + }, + "unist-util-visit": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-2.0.2.tgz", + "integrity": "sha512-HoHNhGnKj6y+Sq+7ASo2zpVdfdRifhTgX2KTU3B/sO/TTlZchp7E3S4vjRzDJ7L60KmrCPsQkVK3lEF3cz36XQ==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0", + "unist-util-visit-parents": "^3.0.0" + } + }, + "unist-util-visit-parents": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.0.2.tgz", + "integrity": "sha512-yJEfuZtzFpQmg1OSCyS9M5NJRrln/9FbYosH3iW0MG402QbdbaB8ZESwUv9RO6nRfLAKvWcMxCwdLWOov36x/g==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0" + } + } } }, "remark-message-control": { @@ -1272,65 +2209,178 @@ } }, "remark-preset-lint-node": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/remark-preset-lint-node/-/remark-preset-lint-node-1.13.0.tgz", - "integrity": "sha512-UNAoY4wl672d0qE+LM5rA0ILOTJN+siNGj3/qa5Zvl7nMIUwqMcz0G266Ck6OL6GOrpys/e4EOrkXiitEdEqNA==", - "requires": { - "remark-lint": "^6.0.5", - "remark-lint-blockquote-indentation": "^1.0.3", - "remark-lint-checkbox-character-style": "^1.0.3", - "remark-lint-checkbox-content-indent": "^1.0.3", - "remark-lint-code-block-style": "^1.0.3", - "remark-lint-definition-spacing": "^1.0.4", - "remark-lint-fenced-code-flag": "^1.0.3", - "remark-lint-fenced-code-marker": "^1.0.3", + "version": "1.14.0", + "resolved": "https://registry.npmjs.org/remark-preset-lint-node/-/remark-preset-lint-node-1.14.0.tgz", + "integrity": "sha512-1RJkFNrTA+9S43rfZE2uvzKWe233x4byRZ3gpv3+J28ZnhJ37p1m2df23JkBZbV/pji9+LpUtNCLNEPhLBd6KA==", + "requires": { + "remark-lint": "^7.0.0", + "remark-lint-blockquote-indentation": "^2.0.0", + "remark-lint-checkbox-character-style": "^2.0.0", + "remark-lint-checkbox-content-indent": "^2.0.0", + "remark-lint-code-block-style": "^2.0.0", + "remark-lint-definition-spacing": "^2.0.0", + "remark-lint-fenced-code-flag": "^2.0.0", + "remark-lint-fenced-code-marker": "^2.0.0", "remark-lint-file-extension": "^1.0.3", - "remark-lint-final-definition": "^1.0.3", - "remark-lint-first-heading-level": "^1.1.4", - "remark-lint-heading-style": "^1.0.3", - "remark-lint-list-item-indent": "^1.0.4", - "remark-lint-maximum-line-length": "^1.2.1", - "remark-lint-no-consecutive-blank-lines": "^1.0.3", - "remark-lint-no-file-name-articles": "^1.0.3", - "remark-lint-no-file-name-consecutive-dashes": "^1.0.3", - "remark-lint-no-file-name-outer-dashes": "^1.0.4", - "remark-lint-no-heading-indent": "^1.0.3", - "remark-lint-no-literal-urls": "^1.0.3", - "remark-lint-no-multiple-toplevel-headings": "^1.0.4", - "remark-lint-no-shell-dollars": "^1.0.3", - "remark-lint-no-table-indentation": "^1.0.4", - "remark-lint-no-tabs": "^1.0.3", + "remark-lint-final-definition": "^2.0.0", + "remark-lint-first-heading-level": "^2.0.0", + "remark-lint-heading-style": "^2.0.0", + "remark-lint-list-item-indent": "^2.0.0", + "remark-lint-maximum-line-length": "^2.0.0", + "remark-lint-no-consecutive-blank-lines": "^2.0.0", + "remark-lint-no-file-name-articles": "^1.0.4", + "remark-lint-no-file-name-consecutive-dashes": "^1.0.4", + "remark-lint-no-file-name-outer-dashes": "^1.0.5", + "remark-lint-no-heading-indent": "^2.0.0", + "remark-lint-no-multiple-toplevel-headings": "^2.0.0", + "remark-lint-no-shell-dollars": "^2.0.0", + "remark-lint-no-table-indentation": "^2.0.0", + "remark-lint-no-tabs": "^2.0.0", "remark-lint-no-trailing-spaces": "^2.0.1", - "remark-lint-prohibited-strings": "^1.2.1", - "remark-lint-rule-style": "^1.0.3", - "remark-lint-strong-marker": "^1.0.3", - "remark-lint-table-cell-padding": "^1.0.4", - "remark-lint-table-pipes": "^1.0.3", - "remark-lint-unordered-list-marker-style": "^1.0.3", - "remark-preset-lint-recommended": "^3.0.3" + "remark-lint-prohibited-strings": "^1.5.1", + "remark-lint-rule-style": "^2.0.0", + "remark-lint-strong-marker": "^2.0.0", + "remark-lint-table-cell-padding": "^2.0.0", + "remark-lint-table-pipes": "^2.0.0", + "remark-lint-unordered-list-marker-style": "^2.0.0", + "remark-preset-lint-recommended": "^4.0.0" + }, + "dependencies": { + "remark-lint": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/remark-lint/-/remark-lint-7.0.0.tgz", + "integrity": "sha512-OLrWPYy0MUcGLa/2rjuy1kQILTRRK+JiRtyUzqe4XRoHboGuvFDcy/W2e7sq5hu/0xmD+Eh7cEa1Coiqp7LeaA==", + "requires": { + "remark-message-control": "^6.0.0" + } + }, + "remark-message-control": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/remark-message-control/-/remark-message-control-6.0.0.tgz", + "integrity": "sha512-k9bt7BYc3G7YBdmeAhvd3VavrPa/XlKWR3CyHjr4sLO9xJyly8WHHT3Sp+8HPR8lEUv+/sZaffL7IjMLV0f6BA==", + "requires": { + "mdast-comment-marker": "^1.0.0", + "unified-message-control": "^3.0.0" + } + }, + "unified-message-control": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/unified-message-control/-/unified-message-control-3.0.1.tgz", + "integrity": "sha512-K2Kvvp1DBzeuxYLLsumZh/gDWUTl4e2z/P3VReFirC78cfHKtQifbhnfRrSBtKtd1Uc6cvYTW0/SZIUaMAEcTg==", + "requires": { + "unist-util-visit": "^2.0.0", + "vfile-location": "^3.0.0" + } + }, + "unist-util-is": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.0.2.tgz", + "integrity": "sha512-Ofx8uf6haexJwI1gxWMGg6I/dLnF2yE+KibhD3/diOqY2TinLcqHXCV6OI5gFVn3xQqDH+u0M625pfKwIwgBKQ==" + }, + "unist-util-visit": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-2.0.2.tgz", + "integrity": "sha512-HoHNhGnKj6y+Sq+7ASo2zpVdfdRifhTgX2KTU3B/sO/TTlZchp7E3S4vjRzDJ7L60KmrCPsQkVK3lEF3cz36XQ==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0", + "unist-util-visit-parents": "^3.0.0" + } + }, + "unist-util-visit-parents": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.0.2.tgz", + "integrity": "sha512-yJEfuZtzFpQmg1OSCyS9M5NJRrln/9FbYosH3iW0MG402QbdbaB8ZESwUv9RO6nRfLAKvWcMxCwdLWOov36x/g==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0" + } + }, + "vfile-location": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-3.0.1.tgz", + "integrity": "sha512-yYBO06eeN/Ki6Kh1QAkgzYpWT1d3Qln+ZCtSbJqFExPl1S3y2qqotJQXoh6qEvl/jDlgpUJolBn3PItVnnZRqQ==" + } } }, "remark-preset-lint-recommended": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/remark-preset-lint-recommended/-/remark-preset-lint-recommended-3.0.3.tgz", - "integrity": "sha512-5sQ34j1Irlsj6Tt4WWRylZ7UU+1jD5es/LfDZBZp/LXDwC4ldGqKpMmCCR6Z00x1jYM1phmS4M+eGqTdah0qkQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/remark-preset-lint-recommended/-/remark-preset-lint-recommended-4.0.0.tgz", + "integrity": "sha512-Nroe+4Itvk+AHxkMCMu6iRUptE/5pXWgLoEOGdVO/2JIiMk/+15HEogMZ05vMhPct9+Wp4uVt2zqfuvzNzdcww==", "requires": { - "remark-lint": "^6.0.0", + "remark-lint": "^7.0.0", "remark-lint-final-newline": "^1.0.0", - "remark-lint-hard-break-spaces": "^1.0.0", - "remark-lint-list-item-bullet-indent": "^1.0.0", - "remark-lint-list-item-indent": "^1.0.0", - "remark-lint-no-auto-link-without-protocol": "^1.0.0", - "remark-lint-no-blockquote-without-marker": "^2.0.0", - "remark-lint-no-duplicate-definitions": "^1.0.0", - "remark-lint-no-heading-content-indent": "^1.0.0", - "remark-lint-no-inline-padding": "^1.0.0", - "remark-lint-no-literal-urls": "^1.0.0", - "remark-lint-no-shortcut-reference-image": "^1.0.0", - "remark-lint-no-shortcut-reference-link": "^1.0.0", - "remark-lint-no-undefined-references": "^1.0.0", - "remark-lint-no-unused-definitions": "^1.0.0", - "remark-lint-ordered-list-marker-style": "^1.0.0" + "remark-lint-hard-break-spaces": "^2.0.0", + "remark-lint-list-item-bullet-indent": "^2.0.0", + "remark-lint-list-item-indent": "^2.0.0", + "remark-lint-no-auto-link-without-protocol": "^2.0.0", + "remark-lint-no-blockquote-without-marker": "^3.0.0", + "remark-lint-no-duplicate-definitions": "^2.0.0", + "remark-lint-no-heading-content-indent": "^2.0.0", + "remark-lint-no-inline-padding": "^2.0.0", + "remark-lint-no-literal-urls": "^2.0.0", + "remark-lint-no-shortcut-reference-image": "^2.0.0", + "remark-lint-no-shortcut-reference-link": "^2.0.0", + "remark-lint-no-undefined-references": "^2.0.0", + "remark-lint-no-unused-definitions": "^2.0.0", + "remark-lint-ordered-list-marker-style": "^2.0.0" + }, + "dependencies": { + "remark-lint": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/remark-lint/-/remark-lint-7.0.0.tgz", + "integrity": "sha512-OLrWPYy0MUcGLa/2rjuy1kQILTRRK+JiRtyUzqe4XRoHboGuvFDcy/W2e7sq5hu/0xmD+Eh7cEa1Coiqp7LeaA==", + "requires": { + "remark-message-control": "^6.0.0" + } + }, + "remark-message-control": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/remark-message-control/-/remark-message-control-6.0.0.tgz", + "integrity": "sha512-k9bt7BYc3G7YBdmeAhvd3VavrPa/XlKWR3CyHjr4sLO9xJyly8WHHT3Sp+8HPR8lEUv+/sZaffL7IjMLV0f6BA==", + "requires": { + "mdast-comment-marker": "^1.0.0", + "unified-message-control": "^3.0.0" + } + }, + "unified-message-control": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/unified-message-control/-/unified-message-control-3.0.1.tgz", + "integrity": "sha512-K2Kvvp1DBzeuxYLLsumZh/gDWUTl4e2z/P3VReFirC78cfHKtQifbhnfRrSBtKtd1Uc6cvYTW0/SZIUaMAEcTg==", + "requires": { + "unist-util-visit": "^2.0.0", + "vfile-location": "^3.0.0" + } + }, + "unist-util-is": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.0.2.tgz", + "integrity": "sha512-Ofx8uf6haexJwI1gxWMGg6I/dLnF2yE+KibhD3/diOqY2TinLcqHXCV6OI5gFVn3xQqDH+u0M625pfKwIwgBKQ==" + }, + "unist-util-visit": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-2.0.2.tgz", + "integrity": "sha512-HoHNhGnKj6y+Sq+7ASo2zpVdfdRifhTgX2KTU3B/sO/TTlZchp7E3S4vjRzDJ7L60KmrCPsQkVK3lEF3cz36XQ==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0", + "unist-util-visit-parents": "^3.0.0" + } + }, + "unist-util-visit-parents": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.0.2.tgz", + "integrity": "sha512-yJEfuZtzFpQmg1OSCyS9M5NJRrln/9FbYosH3iW0MG402QbdbaB8ZESwUv9RO6nRfLAKvWcMxCwdLWOov36x/g==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0" + } + }, + "vfile-location": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-3.0.1.tgz", + "integrity": "sha512-yYBO06eeN/Ki6Kh1QAkgzYpWT1d3Qln+ZCtSbJqFExPl1S3y2qqotJQXoh6qEvl/jDlgpUJolBn3PItVnnZRqQ==" + } } }, "remark-stringify": { @@ -1608,9 +2658,9 @@ } }, "unified-lint-rule": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/unified-lint-rule/-/unified-lint-rule-1.0.4.tgz", - "integrity": "sha512-q9wY6S+d38xRAuWQVOMjBQYi7zGyKkY23ciNafB8JFVmDroyKjtytXHCg94JnhBCXrNqpfojo3+8D+gmF4zxJQ==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/unified-lint-rule/-/unified-lint-rule-1.0.5.tgz", + "integrity": "sha512-jOPr/fx8lTzqszEfh46p99jUMqgPlIZ8rNKllEepumISvgfj9lUq1c7BSpVihr0L1df3lkjVHAThRPS7dIyjYg==", "requires": { "wrapped": "^1.0.1" } diff --git a/tools/node-lint-md-cli-rollup/package.json b/tools/node-lint-md-cli-rollup/package.json index be155b49e95fce..e444d983b615d6 100644 --- a/tools/node-lint-md-cli-rollup/package.json +++ b/tools/node-lint-md-cli-rollup/package.json @@ -13,7 +13,7 @@ "markdown-extensions": "^1.1.1", "remark": "^11.0.2", "remark-lint": "^6.0.5", - "remark-preset-lint-node": "^1.13.0", + "remark-preset-lint-node": "^1.14.0", "unified-args": "^7.1.0" }, "main": "dist/index.js",