From 8d44c00cba7dbddfdda3a921833be36d324eccea Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Thu, 4 Jun 2020 05:41:27 -0700 Subject: [PATCH] tools: update remark-preset-lint-node from 1.15.0 to 1.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/33727 Reviewed-By: Michaël Zasso Reviewed-By: Richard Lau --- BUILDING.md | 2 +- tools/lint-md.js | 11843 +++------------- .../node-lint-md-cli-rollup/package-lock.json | 1125 +- tools/node-lint-md-cli-rollup/package.json | 2 +- 4 files changed, 2042 insertions(+), 10930 deletions(-) diff --git a/BUILDING.md b/BUILDING.md index c0a133768fac7d..37b79a02570ed9 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -225,7 +225,7 @@ Consult previous versions of this document for older versions of Node.js: The Node.js project uses Python as part of its build process and has historically only been Python 2 compatible. -Python 2 will reach its _end-of-life_ at the end of 2019 at which point the +Python 2 will reach its _End-of-Life_ at the end of 2019 at which point the interpreter will cease receiving updates. See for more information. diff --git a/tools/lint-md.js b/tools/lint-md.js index 5335fafb1e8f6f..f8e54d6d2f3fce 100644 --- a/tools/lint-md.js +++ b/tools/lint-md.js @@ -16744,9 +16744,9 @@ var colorName$1 = { "aliceblue": [240, 248, 255], "antiquewhite": [250, 235, 215], "aqua": [0, 255, 255], - "aquamarine": [127, 255, 212], - "azure": [240, 255, 255], - "beige": [245, 245, 220], + "aquamarine": [127, 255, 212], + "azure": [240, 255, 255], + "beige": [245, 245, 220], "bisque": [255, 228, 196], "black": [0, 0, 0], "blanchedalmond": [255, 235, 205], @@ -16885,9 +16885,9 @@ var colorName$1 = { "turquoise": [64, 224, 208], "violet": [238, 130, 238], "wheat": [245, 222, 179], - "white": [255, 255, 255], - "whitesmoke": [245, 245, 245], - "yellow": [255, 255, 0], + "white": [255, 255, 255], + "whitesmoke": [245, 245, 245], + "yellow": [255, 255, 0], "yellowgreen": [154, 205, 50] }; @@ -43488,7 +43488,7 @@ const dependencies$1 = { "markdown-extensions": "^1.1.1", remark: "^12.0.0", "remark-lint": "^7.0.0", - "remark-preset-lint-node": "^1.15.0", + "remark-preset-lint-node": "^1.15.1", "unified-args": "^8.0.0" }; const main = "dist/index.js"; @@ -44172,1535 +44172,958 @@ function lintMessageControl() { return remarkMessageControl({name: 'lint', source: 'remark-lint'}) } -var vfileLocation$2 = factory$8; +/** + * An Array.prototype.slice.call(arguments) alternative + * + * @param {Object} args something with a length + * @param {Number} slice + * @param {Number} sliceEnd + * @api public + */ + +var sliced = function (args, slice, sliceEnd) { + var ret = []; + var len = args.length; + + if (0 === len) return ret; -function factory$8(file) { - var contents = indices$2(String(file)); + var start = slice < 0 + ? Math.max(0, slice + len) + : slice || 0; - return { - toPosition: offsetToPositionFactory$2(contents), - toOffset: positionToOffsetFactory$2(contents) + if (sliceEnd !== undefined) { + len = sliceEnd < 0 + ? sliceEnd + len + : sliceEnd; } -} -// Factory to get the line and column-based `position` for `offset` in the bound -// indices. -function offsetToPositionFactory$2(indices) { - return offsetToPosition + while (len-- > start) { + ret[len - start] = args[len]; + } - // Get the line and column-based `position` for `offset` in the bound indices. - function offsetToPosition(offset) { - var index = -1; - var length = indices.length; + return ret; +}; - if (offset < 0) { - return {} +/** + * slice() reference. + */ + +var slice$4 = Array.prototype.slice; + +/** + * Expose `co`. + */ + +var co_1 = co; + +/** + * Wrap the given generator `fn` and + * return a thunk. + * + * @param {Function} fn + * @return {Function} + * @api public + */ + +function co(fn) { + var isGenFun = isGeneratorFunction(fn); + + return function (done) { + var ctx = this; + + // in toThunk() below we invoke co() + // with a generator, so optimize for + // this case + var gen = fn; + + // we only need to parse the arguments + // if gen is a generator function. + if (isGenFun) { + var args = slice$4.call(arguments), len = args.length; + var hasCallback = len && 'function' == typeof args[len - 1]; + done = hasCallback ? args.pop() : error; + gen = fn.apply(this, args); + } else { + done = done || error; } - while (++index < length) { - if (indices[index] > offset) { - return { - line: index + 1, - column: offset - (indices[index - 1] || 0) + 1, - offset: offset - } - } + next(); + + // #92 + // wrap the callback in a setImmediate + // so that any of its errors aren't caught by `co` + function exit(err, res) { + setImmediate(function(){ + done.call(ctx, err, res); + }); } - return {} - } -} + function next(err, res) { + var ret; -// Factory to get the `offset` for a line and column-based `position` in the -// bound indices. -function positionToOffsetFactory$2(indices) { - return positionToOffset + // multiple args + if (arguments.length > 2) res = slice$4.call(arguments, 1); - // 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; + // error + if (err) { + try { + ret = gen.throw(err); + } catch (e) { + return exit(e); + } + } - if (!isNaN(line) && !isNaN(column) && line - 1 in indices) { - return (indices[line - 2] || 0) + column - 1 || 0 - } + // ok + if (!err) { + try { + ret = gen.next(res); + } catch (e) { + return exit(e); + } + } - return -1 - } -} + // done + if (ret.done) return exit(null, ret.value); -// Get indices of line-breaks in `value`. -function indices$2(value) { - var result = []; - var index = value.indexOf('\n'); + // normalize + ret.value = toThunk(ret.value, ctx); - while (index !== -1) { - result.push(index + 1); - index = value.indexOf('\n', index + 1); + // run + if ('function' == typeof ret.value) { + var called = false; + try { + ret.value.call(ctx, function(){ + if (called) return; + called = true; + next.apply(ctx, arguments); + }); + } catch (e) { + setImmediate(function(){ + if (called) return; + called = true; + next(e); + }); + } + return; + } + + // invalid + next(new TypeError('You may only yield a function, promise, generator, array, or object, ' + + 'but the following was passed: "' + String(ret.value) + '"')); + } } +} - result.push(value.length + 1); +/** + * Convert `obj` into a normalized thunk. + * + * @param {Mixed} obj + * @param {Mixed} ctx + * @return {Function} + * @api private + */ - return result -} +function toThunk(obj, ctx) { -var convert_1$2 = convert$5; + if (isGeneratorFunction(obj)) { + return co(obj.call(ctx)); + } -function convert$5(test) { - if (typeof test === 'string') { - return typeFactory$2(test) + if (isGenerator(obj)) { + return co(obj); } - if (test === null || test === undefined) { - return ok$3 + if (isPromise(obj)) { + return promiseToThunk(obj); } - if (typeof test === 'object') { - return ('length' in test ? anyFactory$2 : matchesFactory$2)(test) + if ('function' == typeof obj) { + return obj; } - if (typeof test === 'function') { - return test + if (isObject$3(obj) || Array.isArray(obj)) { + return objectToThunk.call(ctx, obj); } - throw new Error('Expected function, string, or object as test') + return obj; } -function convertAll$2(tests) { - var results = []; - var length = tests.length; - var index = -1; - - while (++index < length) { - results[index] = convert$5(tests[index]); - } +/** + * Convert an object of yieldables to a thunk. + * + * @param {Object} obj + * @return {Function} + * @api private + */ - return results -} +function objectToThunk(obj){ + var ctx = this; + var isArray = Array.isArray(obj); -// Utility assert each property in `test` is represented in `node`, and each -// values are strictly equal. -function matchesFactory$2(test) { - return matches + return function(done){ + var keys = Object.keys(obj); + var pending = keys.length; + var results = isArray + ? new Array(pending) // predefine the array length + : new obj.constructor(); + var finished; - function matches(node) { - var key; + if (!pending) { + setImmediate(function(){ + done(null, results); + }); + return; + } - for (key in test) { - if (node[key] !== test[key]) { - return false + // prepopulate object keys to preserve key ordering + if (!isArray) { + for (var i = 0; i < pending; i++) { + results[keys[i]] = undefined; } } - return true - } -} + for (var i = 0; i < keys.length; i++) { + run(obj[keys[i]], keys[i]); + } -function anyFactory$2(tests) { - var checks = convertAll$2(tests); - var length = checks.length; + function run(fn, key) { + if (finished) return; + try { + fn = toThunk(fn, ctx); - return matches + if ('function' != typeof fn) { + results[key] = fn; + return --pending || done(null, results); + } - function matches() { - var index = -1; + fn.call(ctx, function(err, res){ + if (finished) return; - while (++index < length) { - if (checks[index].apply(this, arguments)) { - return true + if (err) { + finished = true; + return done(err); + } + + results[key] = res; + --pending || done(null, results); + }); + } catch (err) { + finished = true; + done(err); } } - - 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 +/** + * Convert `promise` to a thunk. + * + * @param {Object} promise + * @return {Function} + * @api private + */ - function type(node) { - return Boolean(node && node.type === test) +function promiseToThunk(promise) { + return function(fn){ + promise.then(function(res) { + fn(null, res); + }, fn); } } -// Utility to return true. -function ok$3() { - return true +/** + * Check if `obj` is a promise. + * + * @param {Object} obj + * @return {Boolean} + * @api private + */ + +function isPromise(obj) { + return obj && 'function' == typeof obj.then; } -var unistUtilVisitParents$2 = visitParents$2; +/** + * Check if `obj` is a generator. + * + * @param {Mixed} obj + * @return {Boolean} + * @api private + */ +function isGenerator(obj) { + return obj && 'function' == typeof obj.next && 'function' == typeof obj.throw; +} +/** + * Check if `obj` is a generator function. + * + * @param {Mixed} obj + * @return {Boolean} + * @api private + */ -var CONTINUE$4 = true; -var SKIP$4 = 'skip'; -var EXIT$4 = false; +function isGeneratorFunction(obj) { + return obj && obj.constructor && 'GeneratorFunction' == obj.constructor.name; +} -visitParents$2.CONTINUE = CONTINUE$4; -visitParents$2.SKIP = SKIP$4; -visitParents$2.EXIT = EXIT$4; +/** + * Check for plain object. + * + * @param {Mixed} val + * @return {Boolean} + * @api private + */ -function visitParents$2(tree, test, visitor, reverse) { - var is; +function isObject$3(val) { + return val && Object == val.constructor; +} - if (typeof test === 'function' && typeof visitor !== 'function') { - reverse = visitor; - visitor = test; - test = null; - } +/** + * Throw `err` in a new stack. + * + * This is used when co() is invoked + * without supplying a callback, which + * should only be for demonstrational + * purposes. + * + * @param {Error} err + * @api private + */ - is = convert_1$2(test); +function error(err) { + if (!err) return; + setImmediate(function(){ + throw err; + }); +} - one(tree, null, []); +/** + * Module Dependencies + */ - // 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)); +var noop$3 = function(){}; - 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 - } +/** + * Export `wrapped` + */ - return result - } +var wrapped_1 = wrapped; - // 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; +/** + * Wrap a function to support + * sync, async, and gen functions. + * + * @param {Function} fn + * @return {Function} + * @api public + */ - while (index > min && index < children.length) { - result = one(children[index], index, parents); +function wrapped(fn) { + function wrap() { + var args = sliced(arguments); + var last = args[args.length - 1]; + var ctx = this; - if (result[0] === EXIT$4) { - return result - } + // done + var done = typeof last == 'function' ? args.pop() : noop$3; - index = typeof result[1] === 'number' ? result[1] : index + step; + // nothing + if (!fn) { + return done.apply(ctx, [null].concat(args)); } - } -} -function toResult$2(value) { - if (value !== null && typeof value === 'object' && 'length' in value) { - return value - } + // generator + if (generator(fn)) { + return co_1(fn).apply(ctx, args.concat(done)); + } - if (typeof value === 'number') { - return [CONTINUE$4, value] + // async + if (fn.length > args.length) { + // NOTE: this only handles uncaught synchronous errors + try { + return fn.apply(ctx, args.concat(done)); + } catch (e) { + return done(e); + } + } + + // sync + return sync$5(fn, done).apply(ctx, args); } - return [value] + return wrap; } -var unistUtilVisit$2 = visit$2; +/** + * Wrap a synchronous function execution. + * + * @param {Function} fn + * @param {Function} done + * @return {Function} + * @api private + */ + +function sync$5(fn, done) { + return function () { + var ret; + try { + ret = fn.apply(this, arguments); + } catch (err) { + return done(err); + } + if (promise(ret)) { + ret.then(function (value) { done(null, value); }, done); + } else { + ret instanceof Error ? done(ret) : done(null, ret); + } + } +} -var CONTINUE$5 = unistUtilVisitParents$2.CONTINUE; -var SKIP$5 = unistUtilVisitParents$2.SKIP; -var EXIT$5 = unistUtilVisitParents$2.EXIT; +/** + * Is `value` a generator? + * + * @param {Mixed} value + * @return {Boolean} + * @api private + */ -visit$2.CONTINUE = CONTINUE$5; -visit$2.SKIP = SKIP$5; -visit$2.EXIT = EXIT$5; +function generator(value) { + return value + && value.constructor + && 'GeneratorFunction' == value.constructor.name; +} -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); +/** + * Is `value` a promise? + * + * @param {Mixed} value + * @return {Boolean} + * @api private + */ - function overload(node, parents) { - var parent = parents[parents.length - 1]; - var index = parent ? parent.children.indexOf(node) : null; - return visitor(node, index, parent) - } +function promise(value) { + return value && 'function' == typeof value.then; } -var unifiedMessageControl$1 = messageControl$2; +var unifiedLintRule = factory$8; -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 || []; +function factory$8(id, rule) { + var parts = id.split(':'); + var source = parts[0]; + var ruleId = parts[1]; + var fn = wrapped_1(rule); - if (!name) { - throw new Error('Expected `name` in `options`, got `' + name + '`') + /* istanbul ignore if - possibly useful if externalised later. */ + if (!ruleId) { + ruleId = source; + source = null; } - 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); + attacher.displayName = id; - file.messages = file.messages.filter(filter); + return attacher - 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; + function attacher(raw) { + var config = coerce(ruleId, raw); + var severity = config[0]; + var options = config[1]; + var fatal = severity === 2; - if (!mark || mark.name !== name) { - return - } + return severity ? transformer : undefined - 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; + function transformer(tree, file, next) { + var index = file.messages.length; - if (verb !== 'enable' && verb !== 'disable' && verb !== 'ignore') { - file.fail( - 'Unknown keyword `' + - verb + - '`: expected ' + - "`'enable'`, `'disable'`, or `'ignore'`", - mark.node - ); - } + fn(tree, file, options, done); - length = ruleIds.length; - index = -1; + function done(err) { + var messages = file.messages; + var message; - // Apply to all rules. - if (length === 0) { - if (verb === 'ignore') { - toggle(pos, false); - toggle(tail, true); - } else { - toggle(pos, verb === 'enable'); - reset = verb !== 'enable'; + // Add the error, if not already properly added. + /* istanbul ignore if - only happens for incorrect plugins */ + if (err && messages.indexOf(err) === -1) { + try { + file.fail(err); + } catch (_) {} } - } else { - while (++index < length) { - ruleId = ruleIds[index]; - if (isKnown(ruleId, verb, mark.node)) { - toggle(pos, verb === 'enable', ruleId); + while (index < messages.length) { + message = messages[index]; + message.ruleId = ruleId; + message.source = source; + message.fatal = fatal; - if (verb === 'ignore') { - toggle(tail, true, ruleId); - } - } + index++; } - } - } - - 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; + next(); } + } + } +} - if (!message.column) { - message.column = 1; - } +// Coerce a value to a severity--options tuple. +function coerce(name, value) { + var def = 1; + var result; + var level; - // Check whether the warning is inside a gap. - pos = toOffset(message); + /* istanbul ignore if - Handled by unified in v6.0.0 */ + if (typeof value === 'boolean') { + result = [value]; + } else if (value == null) { + result = [def]; + } else if ( + typeof value === 'object' && + (typeof value[0] === 'number' || + typeof value[0] === 'boolean' || + typeof value[0] === 'string') + ) { + result = value.concat(); + } else { + result = [1, value]; + } - while (gapIndex--) { - if (gaps[gapIndex].start <= pos && gaps[gapIndex].end > pos) { - return false - } - } + level = result[0]; - // Check whether allowed by specific and global states. - return check(message, ranges, ruleId) && check(message, globals) + if (typeof level === 'boolean') { + level = level ? 1 : 0; + } else if (typeof level === 'string') { + if (level === 'off') { + level = 0; + } else if (level === 'on' || level === 'warn') { + level = 1; + } else if (level === 'error') { + level = 2; + } else { + level = 1; + result = [level, result]; } + } - // 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 (level < 0 || level > 2) { + throw new Error( + 'Incorrect severity `' + + level + + '` for `' + + name + + '`, ' + + 'expected 0, 1, or 2' + ) + } - if (!result) { - file.message( - 'Unknown rule: cannot ' + verb + " `'" + ruleId + "'`", - pos - ); - } + result[0] = level; - return result - } + return result +} - // Get the latest state of a rule. - // When without `ruleId`, gets global state. - function getState(ruleId) { - var ranges = ruleId ? scope[ruleId] : globals; +var remarkLintFinalNewline = unifiedLintRule('remark-lint:final-newline', finalNewline); - if (ranges && ranges.length !== 0) { - return ranges[ranges.length - 1].state - } +function finalNewline(tree, file) { + var contents = String(file); + var last = contents.length - 1; - if (!ruleId) { - return !reset - } + if (last > -1 && contents.charAt(last) !== '\n') { + file.message('Missing newline character at end of file'); + } +} - if (reset) { - return enable.indexOf(ruleId) !== -1 - } +var pluralize = createCommonjsModule(function (module, exports) { +/* global define */ - return disable.indexOf(ruleId) === -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 = {}; + + /** + * 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'); } - // Handle a rule. - function toggle(pos, state, ruleId) { - var markers = ruleId ? scope[ruleId] : globals; - var previousState; + return rule; + } - if (!markers) { - markers = []; - scope[ruleId] = markers; - } + /** + * 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; - previousState = getState(ruleId); + // Lower cased words. E.g. "hello". + if (word === word.toLowerCase()) return token.toLowerCase(); - if (state !== previousState) { - markers.push({state: state, position: pos}); - } + // Upper cased words. E.g. "WHISKY". + if (word === word.toUpperCase()) return token.toUpperCase(); - // Toggle all known rules. - if (!ruleId) { - for (ruleId in scope) { - toggle(pos, state, ruleId); - } - } + // Title cased words. E.g. "Title". + if (word[0] === word[0].toUpperCase()) { + return token.charAt(0).toUpperCase() + token.substr(1).toLowerCase(); } - // 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; + // Lower cased words. E.g. "test". + return token.toLowerCase(); + } - while (--index > length) { - range = ranges[index]; + /** + * 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] || ''; + }); + } - /* istanbul ignore if - Generated marker. */ - if (!range.position || !range.position.line || !range.position.column) { - continue - } + /** + * 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 ( - range.position.line < message.line || - (range.position.line === message.line && - range.position.column <= message.column) - ) { - return range.state === true - } + if (match === '') { + return restoreCase(word[index - 1], result); } - // The first marker ocurred after the first message, so we check the - // initial state. - if (!id) { - return initial || reset - } + return restoreCase(match, result); + }); + } - return reset ? enable.indexOf(id) !== -1 : disable.indexOf(id) === -1 + /** + * 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; } - } -} -// 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 = []; + var len = rules.length; - // Find all gaps. - unistUtilVisit$2(tree, one); + // Iterate over the sanitization rules and use the first one to match. + while (len--) { + var rule = rules[len]; - // 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(); + if (rule[0].test(word)) return replace(word, rule); + } - update( - tree && tree.position && tree.position.end && tree.position.end.offset - 1 - ); + return word; } - return gaps + /** + * 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(); - function one(node) { - var pos = node.position; + // Check against the keep object map. + if (keepMap.hasOwnProperty(token)) { + return restoreCase(word, token); + } - update(pos && pos.start && pos.start.offset); + // Check against the replacement map for a direct word replacement. + if (replaceMap.hasOwnProperty(token)) { + return restoreCase(word, replaceMap[token]); + } - if (!node.children) { - update(pos && pos.end && pos.end.offset); - } + // Run all the rules against the word. + return sanitizeWord(token, word, rules); + }; } - // Detect a new position. - function update(latest) { - if (latest === null || latest === undefined) { - isGap = true; - return - } - - if (offset >= latest) { - return - } + /** + * Check if a word is part of the map. + */ + function checkWord (replaceMap, keepMap, rules, bool) { + return function (word) { + var token = word.toLowerCase(); - if (isGap) { - gaps.push({start: offset, end: latest}); - isGap = false; - } + if (keepMap.hasOwnProperty(token)) return true; + if (replaceMap.hasOwnProperty(token)) return false; - offset = latest; + return sanitizeWord(token, token, rules) === token; + }; } -} - -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)) -} + /** + * 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); -var remarkLint$1 = lint$1; + return (inclusive ? count + ' ' : '') + pluralized; + } -// `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); -} + /** + * Pluralize a word. + * + * @type {Function} + */ + pluralize.plural = replaceWord( + irregularSingles, irregularPlurals, pluralRules + ); -function lintMessageControl$1() { - return remarkMessageControl$1({name: 'lint', source: 'remark-lint'}) -} + /** + * Check if a word is plural. + * + * @type {Function} + */ + pluralize.isPlural = checkWord( + irregularSingles, irregularPlurals, pluralRules + ); -/** - * An Array.prototype.slice.call(arguments) alternative - * - * @param {Object} args something with a length - * @param {Number} slice - * @param {Number} sliceEnd - * @api public - */ + /** + * Singularize a word. + * + * @type {Function} + */ + pluralize.singular = replaceWord( + irregularPlurals, irregularSingles, singularRules + ); -var sliced = function (args, slice, sliceEnd) { - var ret = []; - var len = args.length; + /** + * Check if a word is singular. + * + * @type {Function} + */ + pluralize.isSingular = checkWord( + irregularPlurals, irregularSingles, singularRules + ); - if (0 === len) return ret; + /** + * Add a pluralization rule to the collection. + * + * @param {(string|RegExp)} rule + * @param {string} replacement + */ + pluralize.addPluralRule = function (rule, replacement) { + pluralRules.push([sanitizeRule(rule), replacement]); + }; - var start = slice < 0 - ? Math.max(0, slice + len) - : slice || 0; + /** + * Add a singularization rule to the collection. + * + * @param {(string|RegExp)} rule + * @param {string} replacement + */ + pluralize.addSingularRule = function (rule, replacement) { + singularRules.push([sanitizeRule(rule), replacement]); + }; - if (sliceEnd !== undefined) { - len = sliceEnd < 0 - ? sliceEnd + len - : sliceEnd; - } - - while (len-- > start) { - ret[len - start] = args[len]; - } - - return ret; -}; - -/** - * slice() reference. - */ - -var slice$4 = Array.prototype.slice; - -/** - * Expose `co`. - */ - -var co_1 = co; - -/** - * Wrap the given generator `fn` and - * return a thunk. - * - * @param {Function} fn - * @return {Function} - * @api public - */ - -function co(fn) { - var isGenFun = isGeneratorFunction(fn); - - return function (done) { - var ctx = this; - - // in toThunk() below we invoke co() - // with a generator, so optimize for - // this case - var gen = fn; - - // we only need to parse the arguments - // if gen is a generator function. - if (isGenFun) { - var args = slice$4.call(arguments), len = args.length; - var hasCallback = len && 'function' == typeof args[len - 1]; - done = hasCallback ? args.pop() : error; - gen = fn.apply(this, args); - } else { - done = done || error; - } - - next(); - - // #92 - // wrap the callback in a setImmediate - // so that any of its errors aren't caught by `co` - function exit(err, res) { - setImmediate(function(){ - done.call(ctx, err, res); - }); - } - - function next(err, res) { - var ret; - - // multiple args - if (arguments.length > 2) res = slice$4.call(arguments, 1); - - // error - if (err) { - try { - ret = gen.throw(err); - } catch (e) { - return exit(e); - } - } - - // ok - if (!err) { - try { - ret = gen.next(res); - } catch (e) { - return exit(e); - } - } - - // done - if (ret.done) return exit(null, ret.value); - - // normalize - ret.value = toThunk(ret.value, ctx); - - // run - if ('function' == typeof ret.value) { - var called = false; - try { - ret.value.call(ctx, function(){ - if (called) return; - called = true; - next.apply(ctx, arguments); - }); - } catch (e) { - setImmediate(function(){ - if (called) return; - called = true; - next(e); - }); - } - return; - } - - // invalid - next(new TypeError('You may only yield a function, promise, generator, array, or object, ' - + 'but the following was passed: "' + String(ret.value) + '"')); - } - } -} - -/** - * Convert `obj` into a normalized thunk. - * - * @param {Mixed} obj - * @param {Mixed} ctx - * @return {Function} - * @api private - */ - -function toThunk(obj, ctx) { - - if (isGeneratorFunction(obj)) { - return co(obj.call(ctx)); - } - - if (isGenerator(obj)) { - return co(obj); - } - - if (isPromise(obj)) { - return promiseToThunk(obj); - } - - if ('function' == typeof obj) { - return obj; - } - - if (isObject$3(obj) || Array.isArray(obj)) { - return objectToThunk.call(ctx, obj); - } - - return obj; -} - -/** - * Convert an object of yieldables to a thunk. - * - * @param {Object} obj - * @return {Function} - * @api private - */ - -function objectToThunk(obj){ - var ctx = this; - var isArray = Array.isArray(obj); - - return function(done){ - var keys = Object.keys(obj); - var pending = keys.length; - var results = isArray - ? new Array(pending) // predefine the array length - : new obj.constructor(); - var finished; - - if (!pending) { - setImmediate(function(){ - done(null, results); - }); + /** + * Add an uncountable word rule. + * + * @param {(string|RegExp)} word + */ + pluralize.addUncountableRule = function (word) { + if (typeof word === 'string') { + uncountables[word.toLowerCase()] = true; return; } - // prepopulate object keys to preserve key ordering - if (!isArray) { - for (var i = 0; i < pending; i++) { - results[keys[i]] = undefined; - } - } - - for (var i = 0; i < keys.length; i++) { - run(obj[keys[i]], keys[i]); - } - - function run(fn, key) { - if (finished) return; - try { - fn = toThunk(fn, ctx); - - if ('function' != typeof fn) { - results[key] = fn; - return --pending || done(null, results); - } - - fn.call(ctx, function(err, res){ - if (finished) return; - - if (err) { - finished = true; - return done(err); - } - - results[key] = res; - --pending || done(null, results); - }); - } catch (err) { - finished = true; - done(err); - } - } - } -} - -/** - * Convert `promise` to a thunk. - * - * @param {Object} promise - * @return {Function} - * @api private - */ - -function promiseToThunk(promise) { - return function(fn){ - promise.then(function(res) { - fn(null, res); - }, fn); - } -} - -/** - * Check if `obj` is a promise. - * - * @param {Object} obj - * @return {Boolean} - * @api private - */ - -function isPromise(obj) { - return obj && 'function' == typeof obj.then; -} - -/** - * Check if `obj` is a generator. - * - * @param {Mixed} obj - * @return {Boolean} - * @api private - */ - -function isGenerator(obj) { - return obj && 'function' == typeof obj.next && 'function' == typeof obj.throw; -} - -/** - * Check if `obj` is a generator function. - * - * @param {Mixed} obj - * @return {Boolean} - * @api private - */ - -function isGeneratorFunction(obj) { - return obj && obj.constructor && 'GeneratorFunction' == obj.constructor.name; -} - -/** - * Check for plain object. - * - * @param {Mixed} val - * @return {Boolean} - * @api private - */ + // Set singular and plural references for the word. + pluralize.addPluralRule(word, '$0'); + pluralize.addSingularRule(word, '$0'); + }; -function isObject$3(val) { - return val && Object == val.constructor; -} + /** + * Add an irregular word definition. + * + * @param {string} single + * @param {string} plural + */ + pluralize.addIrregularRule = function (single, plural) { + plural = plural.toLowerCase(); + single = single.toLowerCase(); -/** - * Throw `err` in a new stack. - * - * This is used when co() is invoked - * without supplying a callback, which - * should only be for demonstrational - * purposes. - * - * @param {Error} err - * @api private - */ + irregularSingles[single] = plural; + irregularPlurals[plural] = single; + }; -function error(err) { - if (!err) return; - setImmediate(function(){ - throw err; + /** + * 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]); }); -} - -/** - * Module Dependencies - */ - - -var noop$3 = function(){}; - - -/** - * Export `wrapped` - */ - -var wrapped_1 = wrapped; - -/** - * Wrap a function to support - * sync, async, and gen functions. - * - * @param {Function} fn - * @return {Function} - * @api public - */ - -function wrapped(fn) { - function wrap() { - var args = sliced(arguments); - var last = args[args.length - 1]; - var ctx = this; - - // done - var done = typeof last == 'function' ? args.pop() : noop$3; - - // nothing - if (!fn) { - return done.apply(ctx, [null].concat(args)); - } - - // generator - if (generator(fn)) { - return co_1(fn).apply(ctx, args.concat(done)); - } - - // async - if (fn.length > args.length) { - // NOTE: this only handles uncaught synchronous errors - try { - return fn.apply(ctx, args.concat(done)); - } catch (e) { - return done(e); - } - } - - // sync - return sync$5(fn, done).apply(ctx, args); - } - return wrap; -} + /** + * 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]); + }); -/** - * Wrap a synchronous function execution. - * - * @param {Function} fn - * @param {Function} done - * @return {Function} - * @api private - */ - -function sync$5(fn, done) { - return function () { - var ret; - - try { - ret = fn.apply(this, arguments); - } catch (err) { - return done(err); - } - - if (promise(ret)) { - ret.then(function (value) { done(null, value); }, done); - } else { - ret instanceof Error ? done(ret) : done(null, ret); - } - } -} - -/** - * Is `value` a generator? - * - * @param {Mixed} value - * @return {Boolean} - * @api private - */ - -function generator(value) { - return value - && value.constructor - && 'GeneratorFunction' == value.constructor.name; -} - - -/** - * Is `value` a promise? - * - * @param {Mixed} value - * @return {Boolean} - * @api private - */ - -function promise(value) { - return value && 'function' == typeof value.then; -} - -var unifiedLintRule = factory$9; - -function factory$9(id, rule) { - var parts = id.split(':'); - var source = parts[0]; - var ruleId = parts[1]; - var fn = wrapped_1(rule); - - /* istanbul ignore if - possibly useful if externalised later. */ - if (!ruleId) { - ruleId = source; - source = null; - } - - attacher.displayName = id; - - return attacher - - function attacher(raw) { - var config = coerce(ruleId, raw); - var severity = config[0]; - var options = config[1]; - var fatal = severity === 2; - - return severity ? transformer : undefined - - function transformer(tree, file, next) { - var index = file.messages.length; - - fn(tree, file, options, done); - - function done(err) { - var messages = file.messages; - var message; - - // Add the error, if not already properly added. - /* istanbul ignore if - only happens for incorrect plugins */ - if (err && messages.indexOf(err) === -1) { - try { - file.fail(err); - } catch (_) {} - } - - while (index < messages.length) { - message = messages[index]; - message.ruleId = ruleId; - message.source = source; - message.fatal = fatal; - - index++; - } - - next(); - } - } - } -} - -// Coerce a value to a severity--options tuple. -function coerce(name, value) { - var def = 1; - var result; - var level; - - /* istanbul ignore if - Handled by unified in v6.0.0 */ - if (typeof value === 'boolean') { - result = [value]; - } else if (value == null) { - result = [def]; - } else if ( - typeof value === 'object' && - (typeof value[0] === 'number' || - typeof value[0] === 'boolean' || - typeof value[0] === 'string') - ) { - result = value.concat(); - } else { - result = [1, value]; - } - - level = result[0]; - - if (typeof level === 'boolean') { - level = level ? 1 : 0; - } else if (typeof level === 'string') { - if (level === 'off') { - level = 0; - } else if (level === 'on' || level === 'warn') { - level = 1; - } else if (level === 'error') { - level = 2; - } else { - level = 1; - result = [level, result]; - } - } - - if (level < 0 || level > 2) { - throw new Error( - 'Incorrect severity `' + - level + - '` for `' + - name + - '`, ' + - 'expected 0, 1, or 2' - ) - } - - result[0] = level; - - return result -} - -var remarkLintFinalNewline = unifiedLintRule('remark-lint:final-newline', finalNewline); - -function finalNewline(tree, file) { - var contents = String(file); - var last = contents.length - 1; - - if (last > -1 && contents.charAt(last) !== '\n') { - file.message('Missing newline character at end of file'); - } -} - -var pluralize = createCommonjsModule(function (module, exports) { -/* global define */ - -(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 = {}; - - /** - * 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; - } - - /** - * 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; - - // Lower cased words. E.g. "hello". - if (word === word.toLowerCase()) return token.toLowerCase(); - - // Upper cased words. E.g. "WHISKY". - if (word === word.toUpperCase()) return token.toUpperCase(); - - // Title cased words. E.g. "Title". - if (word[0] === word[0].toUpperCase()) { - return token.charAt(0).toUpperCase() + token.substr(1).toLowerCase(); - } - - // Lower cased words. E.g. "test". - return token.toLowerCase(); - } - - /** - * 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] || ''; - }); - } - - /** - * 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]); - }); + /** + * 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]); + }); /** - * 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. + * Uncountable rules. */ [ // Singular words with no plurals. @@ -45779,8363 +45202,1700 @@ var pluralize = createCommonjsModule(function (module, exports) { '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$6; - -function convert$6(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$6(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 - } - - 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; - -position$1.start = start$1; -position$1.end = end; - -function position$1(node) { - return {start: start$1(node), end: end(node)} -} - -function factory$a(type) { - point.displayName = type; - - return point - - function point(node) { - var point = (node && node.position && node.position[type]) || {}; - - return { - line: point.line || null, - column: point.column || null, - offset: isNaN(point.offset) ? null : point.offset - } - } -} - -var unistUtilGenerated = generated; - -function generated(node) { - var position = optional(optional(node).position); - var start = optional(position.start); - var end = optional(position.end); - - return !start.line || !start.column || !end.line || !end.column -} - -function optional(value) { - return value && typeof value === 'object' ? value : {} -} - -var remarkLintListItemBulletIndent = unifiedLintRule( - 'remark-lint:list-item-bullet-indent', - listItemBulletIndent -); - -var start$2 = unistUtilPosition.start; - -function listItemBulletIndent(tree, file) { - var contents = String(file); - - unistUtilVisit$3(tree, 'list', visitor); - - function visitor(node) { - node.children.forEach(visitItems); - } - - function visitItems(item) { - var final; - var indent; - var reason; - - if (!unistUtilGenerated(item)) { - final = start$2(item.children[0]); - indent = contents.slice(start$2(item).offset, final.offset).match(/^\s*/)[0] - .length; - - if (indent !== 0) { - reason = - 'Incorrect indentation before bullet: remove ' + - indent + - ' ' + - pluralize('space', indent); - - file.message(reason, { - line: final.line, - column: final.column - indent - }); - } - } - } -} - -var convert_1$4 = convert$7; - -function convert$7(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$7(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$1 = {'tab-size': true, mixed: true, space: true}; - -function listItemIndent(tree, file, option) { - var contents = String(file); - var preferred = typeof option === 'string' ? option : 'tab-size'; - - if (styles$1[preferred] !== true) { - file.fail( - 'Incorrect list-item indent style `' + - preferred + - "`: use either `'tab-size'`, `'space'`, or `'mixed'`" - ); - } - - unistUtilVisit$4(tree, 'list', visitor); - - function visitor(node) { - var spread = node.spread || node.loose; - - if (!unistUtilGenerated(node)) { - node.children.forEach(visitItem); - } - - function visitItem(item) { - var head = item.children[0]; - var final = start$3(head); - var marker; - var bulletSize; - var style; - var diff; - var reason; - var abs; - - marker = contents - .slice(start$3(item).offset, final.offset) - .replace(/\[[x ]?]\s*$/i, ''); - - bulletSize = marker.replace(/\s+$/, '').length; - - style = - 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') + - ' ' + - abs + - ' ' + - pluralize('space', abs); - - file.message(reason, final); - } - } - } -} - -var convert_1$5 = convert$8; - -function convert$8(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') -} - -function convertAll$5(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$5(test) { - return matches - - function matches(node) { - var key; - - for (key in test) { - if (node[key] !== test[key]) { - return false - } - } - - return true - } -} - -function anyFactory$5(tests) { - var checks = convertAll$5(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$5(test) { - return type - - function type(node) { - return Boolean(node && node.type === test) - } -} - -// Utility to return true. -function ok$6() { - return true -} - -var unistUtilVisitParents$5 = visitParents$5; - - - -var CONTINUE$a = true; -var SKIP$a = 'skip'; -var EXIT$a = false; - -visitParents$5.CONTINUE = CONTINUE$a; -visitParents$5.SKIP = SKIP$a; -visitParents$5.EXIT = EXIT$a; - -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$3; - -// 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$3(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$3(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$9; - -function convert$9(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$9(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 - } - - /* istanbul ignore else - just for safety */ - if (character !== ' ' && character !== '\t') { - file.message(reason$1, pos); - break - } - } - } - } -} - -var convert_1$7 = convert$a; - -function convert$a(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$a(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$2 = '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$2 + value || node.url === value) - ) { - file.message(reason$2, node); - } - } -} - -var convert_1$8 = convert$b; - -function convert$b(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$b(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$2 = { - ')': true, - '.': true, - null: true -}; - -function orderedListMarkerStyle(tree, file, option) { - var contents = String(file); - var preferred = - typeof option !== 'string' || option === 'consistent' ? null : option; - - if (styles$2[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$c; - -function convert$c(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$c(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$d; - -function convert$d(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$d(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$e; - -function convert$e(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$e(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$f; - -function convert$f(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$f(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$g; - -function convert$g(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$g(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$h; - -function convert$h(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$h(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$i; - -function convert$i(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$i(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$j; - -function convert$j(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$j(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$k; - -function convert$k(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$k(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$l; - -function convert$l(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$l(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$m; - -function convert$m(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$m(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$n; - -function convert$n(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$n(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$3 = {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$3[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$o; - -function convert$o(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$o(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$p; - -function convert$p(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$p(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$q; - -function convert$q(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$q(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$r; - -function convert$r(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$r(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$s; - -function convert$s(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$s(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$u; - -function convert$u(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$u(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$v; - -function convert$v(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$v(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$w; - -function convert$w(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$w(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, []); + '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); - // Visit a single node. - function one(node, index, parents) { - var result = []; - var subresult; + return pluralize; +}); +}); - if (!test || is(node, index, parents[parents.length - 1] || null)) { - result = toResult$t(visitor(node, parents)); +var start$1 = factory$9('start'); +var end = factory$9('end'); - if (result[0] === EXIT$W) { - return result - } - } +var unistUtilPosition = position$1; - if (node.children && result[0] !== SKIP$W) { - subresult = toResult$t(all(node.children, parents.concat(node))); - return subresult[0] === EXIT$W ? subresult : result - } +position$1.start = start$1; +position$1.end = end; - return result - } +function position$1(node) { + return {start: start$1(node), end: end(node)} +} - // 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; +function factory$9(type) { + point.displayName = type; - while (index > min && index < children.length) { - result = one(children[index], index, parents); + return point - if (result[0] === EXIT$W) { - return result - } + function point(node) { + var point = (node && node.position && node.position[type]) || {}; - index = typeof result[1] === 'number' ? result[1] : index + step; + return { + line: point.line || null, + column: point.column || null, + offset: isNaN(point.offset) ? null : point.offset } } } -function toResult$t(value) { - if (value !== null && typeof value === 'object' && 'length' in value) { - return value - } +var unistUtilGenerated = generated; - if (typeof value === 'number') { - return [CONTINUE$W, value] - } +function generated(node) { + var position = optional(optional(node).position); + var start = optional(position.start); + var end = optional(position.end); - return [value] + return !start.line || !start.column || !end.line || !end.column } -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) - } +function optional(value) { + return value && typeof value === 'object' ? value : {} } -var remarkLintNoHeadingIndent = unifiedLintRule('remark-lint:no-heading-indent', noHeadingIndent); +var remarkLintListItemBulletIndent = unifiedLintRule( + 'remark-lint:list-item-bullet-indent', + listItemBulletIndent +); -var start$e = unistUtilPosition.start; +var start$2 = unistUtilPosition.start; -function noHeadingIndent(tree, file) { +function listItemBulletIndent(tree, file) { var contents = String(file); - var length = contents.length; - unistUtilVisit$t(tree, 'heading', visitor); + unistUtilVisit(tree, 'list', visitor); function visitor(node) { - var initial; - var begin; - var index; - var character; - var diff; + node.children.forEach(visitItems); + } - if (unistUtilGenerated(node)) { - return - } + function visitItems(item) { + var final; + var indent; + var reason; - initial = start$e(node); - begin = initial.offset; - index = begin - 1; + if (!unistUtilGenerated(item)) { + final = start$2(item.children[0]); + indent = contents.slice(start$2(item).offset, final.offset).match(/^\s*/)[0] + .length; - while (++index < length) { - character = contents.charAt(index); + if (indent !== 0) { + reason = + 'Incorrect indentation before bullet: remove ' + + indent + + ' ' + + pluralize('space', indent); - if (character !== ' ' && character !== '\t') { - break + file.message(reason, { + line: final.line, + column: final.column - indent + }); } } - - 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$x; +var remarkLintListItemIndent = unifiedLintRule('remark-lint:list-item-indent', listItemIndent); -function convert$x(test) { - if (typeof test === 'string') { - return typeFactory$u(test) - } +var start$3 = unistUtilPosition.start; - if (test === null || test === undefined) { - return ok$v - } +var styles$1 = {'tab-size': true, mixed: true, space: true}; - if (typeof test === 'object') { - return ('length' in test ? anyFactory$u : matchesFactory$u)(test) - } +function listItemIndent(tree, file, option) { + var contents = String(file); + var preferred = typeof option === 'string' ? option : 'tab-size'; - if (typeof test === 'function') { - return test + if (styles$1[preferred] !== true) { + file.fail( + 'Incorrect list-item indent style `' + + preferred + + "`: use either `'tab-size'`, `'space'`, or `'mixed'`" + ); } - 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$x(tests[index]); - } + unistUtilVisit(tree, 'list', visitor); - return results -} + function visitor(node) { + var spread = node.spread || node.loose; -// Utility assert each property in `test` is represented in `node`, and each -// values are strictly equal. -function matchesFactory$u(test) { - return matches + if (!unistUtilGenerated(node)) { + node.children.forEach(visitItem); + } - function matches(node) { - var key; + function visitItem(item) { + var head = item.children[0]; + var final = start$3(head); + var marker; + var bulletSize; + var style; + var diff; + var reason; + var abs; - for (key in test) { - if (node[key] !== test[key]) { - return false - } - } + marker = contents + .slice(start$3(item).offset, final.offset) + .replace(/\[[x ]?]\s*$/i, ''); - return true - } -} + bulletSize = marker.replace(/\s+$/, '').length; -function anyFactory$u(tests) { - var checks = convertAll$u(tests); - var length = checks.length; + style = + preferred === 'tab-size' || (preferred === 'mixed' && spread) + ? Math.ceil(bulletSize / 4) * 4 + : bulletSize + 1; - return matches + if (marker.length !== style) { + diff = style - marker.length; + abs = Math.abs(diff); - function matches() { - var index = -1; + reason = + 'Incorrect list-item indent: ' + + (diff > 0 ? 'add' : 'remove') + + ' ' + + abs + + ' ' + + pluralize('space', abs); - while (++index < length) { - if (checks[index].apply(this, arguments)) { - return true + file.message(reason, final); } } - - return false } } -// Utility to convert a string into a function which checks a given node’s type -// for said string. -function typeFactory$u(test) { - return type - - function type(node) { - return Boolean(node && node.type === test) - } -} +var mdastUtilToString = toString$3; -// Utility to return true. -function ok$v() { - return true +// 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$3(node) { + return ( + (node && + (node.value || + node.alt || + node.title || + ('children' in node && all$1(node.children)) || + ('length' in node && all$1(node)))) || + '' + ) } -var unistUtilVisitParents$u = visitParents$u; - - - -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; +function all$1(values) { + var result = []; + var length = values.length; + var index = -1; - if (typeof test === 'function' && typeof visitor !== 'function') { - reverse = visitor; - visitor = test; - test = null; + while (++index < length) { + result[index] = toString$3(values[index]); } - is = convert_1$u(test); - - one(tree, null, []); + return result.join('') +} - // Visit a single node. - function one(node, index, parents) { - var result = []; - var subresult; +var remarkLintNoAutoLinkWithoutProtocol = unifiedLintRule( + 'remark-lint:no-auto-link-without-protocol', + noAutoLinkWithoutProtocol +); - if (!test || is(node, index, parents[parents.length - 1] || null)) { - result = toResult$u(visitor(node, parents)); +var start$4 = unistUtilPosition.start; +var end$1 = unistUtilPosition.end; - if (result[0] === EXIT$Y) { - return result - } - } +// Protocol expression. +// See: . +var protocol$2 = /^[a-z][a-z+.-]+:\/?/i; - if (node.children && result[0] !== SKIP$Y) { - subresult = toResult$u(all(node.children, parents.concat(node))); - return subresult[0] === EXIT$Y ? subresult : result - } +var reason = 'All automatic links must start with a protocol'; - return result - } +function noAutoLinkWithoutProtocol(tree, file) { + unistUtilVisit(tree, 'link', visitor); - // 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; + function visitor(node) { + var children; - while (index > min && index < children.length) { - result = one(children[index], index, parents); + if (!unistUtilGenerated(node)) { + children = node.children; - if (result[0] === EXIT$Y) { - return result + 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); } - - index = typeof result[1] === 'number' ? result[1] : index + step; } } } -function toResult$u(value) { - if (value !== null && typeof value === 'object' && 'length' in value) { - return value - } - - if (typeof value === 'number') { - return [CONTINUE$Y, value] - } - - return [value] -} - -var unistUtilVisit$u = visit$u; - - - -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; +var remarkLintNoBlockquoteWithoutMarker = unifiedLintRule( + 'remark-lint:no-blockquote-without-marker', + noBlockquoteWithoutMarker +); -function visit$u(tree, test, visitor, reverse) { - if (typeof test === 'function' && typeof visitor !== 'function') { - reverse = visitor; - visitor = test; - test = null; - } +var reason$1 = 'Missing marker in block quote'; - unistUtilVisitParents$u(tree, test, overload, reverse); +function noBlockquoteWithoutMarker(tree, file) { + var contents = String(file); + var location = vfileLocation(file); + var last = contents.length; - function overload(node, parents) { - var parent = parents[parents.length - 1]; - var index = parent ? parent.children.indexOf(node) : null; - return visitor(node, index, parent) - } -} + unistUtilVisit(tree, 'blockquote', visitor); -var start$f = unistUtilPosition.start; + 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 remarkLintNoMultipleToplevelHeadings = unifiedLintRule( - 'remark-lint:no-multiple-toplevel-headings', - noMultipleToplevelHeadings -); + while (++index < length) { + line = start + index + 1; + pos = {line: line, column: indent[index]}; + offset = location.toOffset(pos) - 1; -function noMultipleToplevelHeadings(tree, file, option) { - var preferred = option || 1; - var duplicate; + while (++offset < last) { + character = contents.charAt(offset); - unistUtilVisit$u(tree, 'heading', visitor); + if (character === '>') { + break + } - function visitor(node) { - 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)); + /* istanbul ignore else - just for safety */ + if (character !== ' ' && character !== '\t') { + file.message(reason$1, pos); + break + } } } } } -var convert_1$v = convert$y; +var remarkLintNoLiteralUrls = unifiedLintRule('remark-lint:no-literal-urls', noLiteralURLs); -function convert$y(test) { - if (typeof test === 'string') { - return typeFactory$v(test) - } +var start$5 = unistUtilPosition.start; +var end$2 = unistUtilPosition.end; +var mailto$2 = 'mailto:'; +var reason$2 = 'Don’t use literal URLs without angle brackets'; - if (test === null || test === undefined) { - return ok$w - } +function noLiteralURLs(tree, file) { + unistUtilVisit(tree, 'link', visitor); - if (typeof test === 'object') { - return ('length' in test ? anyFactory$v : matchesFactory$v)(test) - } + function visitor(node) { + var children = node.children; + var value = mdastUtilToString(node); - if (typeof test === 'function') { - return test + 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$2 + value || node.url === value) + ) { + file.message(reason$2, node); + } } - - 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$y(tests[index]); - } - - return results -} +var remarkLintOrderedListMarkerStyle = unifiedLintRule( + 'remark-lint:ordered-list-marker-style', + orderedListMarkerStyle +); -// Utility assert each property in `test` is represented in `node`, and each -// values are strictly equal. -function matchesFactory$v(test) { - return matches +var start$6 = unistUtilPosition.start; - function matches(node) { - var key; +var styles$2 = { + ')': true, + '.': true, + null: true +}; - for (key in test) { - if (node[key] !== test[key]) { - return false - } - } +function orderedListMarkerStyle(tree, file, option) { + var contents = String(file); + var preferred = + typeof option !== 'string' || option === 'consistent' ? null : option; - return true + if (styles$2[preferred] !== true) { + file.fail( + 'Incorrect ordered list item marker style `' + + preferred + + "`: use either `'.'` or `')'`" + ); } -} -function anyFactory$v(tests) { - var checks = convertAll$v(tests); - var length = checks.length; - - return matches + unistUtilVisit(tree, 'list', visitor); - function matches() { + function visitor(node) { + var children = node.children; + var length = node.ordered ? children.length : 0; var index = -1; + var marker; + var child; while (++index < length) { - if (checks[index].apply(this, arguments)) { - return true - } - } - - return false - } -} + child = children[index]; -// 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 (!unistUtilGenerated(child)) { + marker = contents + .slice(start$6(child).offset, start$6(child.children[0]).offset) + .replace(/\s|\d/g, '') + .replace(/\[[x ]?]\s*$/i, ''); - function type(node) { - return Boolean(node && node.type === test) + if (preferred) { + if (marker !== preferred) { + file.message('Marker style should be `' + preferred + '`', child); + } + } else { + preferred = marker; + } + } + } } } -// Utility to return true. -function ok$w() { - return true -} - -var unistUtilVisitParents$v = visitParents$v; +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); -var CONTINUE$_ = true; -var SKIP$_ = 'skip'; -var EXIT$_ = false; + unistUtilVisit(tree, 'break', visitor); -visitParents$v.CONTINUE = CONTINUE$_; -visitParents$v.SKIP = SKIP$_; -visitParents$v.EXIT = EXIT$_; + function visitor(node) { + var value; -function visitParents$v(tree, test, visitor, reverse) { - var is; + if (!unistUtilGenerated(node)) { + value = contents + .slice(unistUtilPosition.start(node).offset, unistUtilPosition.end(node).offset) + .split('\n', 1)[0] + .replace(/\r$/, ''); - if (typeof test === 'function' && typeof visitor !== 'function') { - reverse = visitor; - visitor = test; - test = null; + if (value.length > 2) { + file.message(reason$3, node); + } + } } +} - 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)); +var remarkLintNoDuplicateDefinitions = unifiedLintRule( + 'remark-lint:no-duplicate-definitions', + noDuplicateDefinitions +); - if (result[0] === EXIT$_) { - return result - } - } +var reason$4 = 'Do not use definitions with the same identifier'; - if (node.children && result[0] !== SKIP$_) { - subresult = toResult$v(all(node.children, parents.concat(node))); - return subresult[0] === EXIT$_ ? subresult : result - } +function noDuplicateDefinitions(tree, file) { + var map = {}; - return result - } + unistUtilVisit(tree, ['definition', 'footnoteDefinition'], check); - // 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; + function check(node) { + var identifier; + var duplicate; - while (index > min && index < children.length) { - result = one(children[index], index, parents); + if (!unistUtilGenerated(node)) { + identifier = node.identifier; + duplicate = map[identifier]; - if (result[0] === EXIT$_) { - return result + if (duplicate && duplicate.type) { + file.message( + reason$4 + ' (' + unistUtilStringifyPosition(unistUtilPosition.start(duplicate)) + ')', + node + ); } - index = typeof result[1] === 'number' ? result[1] : index + step; + map[identifier] = node; } } } -function toResult$v(value) { - if (value !== null && typeof value === 'object' && 'length' in value) { - return value - } - - if (typeof value === 'number') { - return [CONTINUE$_, value] - } - - return [value] -} +var mdastUtilHeadingStyle = style; -var unistUtilVisit$v = visit$v; +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) + } -var CONTINUE$$ = unistUtilVisitParents$v.CONTINUE; -var SKIP$$ = unistUtilVisitParents$v.SKIP; -var EXIT$$ = unistUtilVisitParents$v.EXIT; + return 'atx-closed' + } -visit$v.CONTINUE = CONTINUE$$; -visit$v.SKIP = SKIP$$; -visit$v.EXIT = EXIT$$; + if (final.line + 1 === pos.line) { + return 'setext' + } -function visit$v(tree, test, visitor, reverse) { - if (typeof test === 'function' && typeof visitor !== 'function') { - reverse = visitor; - visitor = test; - test = null; + if (final.column + depth < pos.column) { + return 'atx-closed' } - unistUtilVisitParents$v(tree, test, overload, reverse); + return consolidate(depth, relative) +} - function overload(node, parents) { - var parent = parents[parents.length - 1]; - var index = parent ? parent.children.indexOf(node) : null; - return visitor(node, index, parent) - } +// 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 remarkLintNoShellDollars = unifiedLintRule('remark-lint:no-shell-dollars', noShellDollars); +var remarkLintNoHeadingContentIndent = unifiedLintRule( + 'remark-lint:no-heading-content-indent', + noHeadingContentIndent +); -var reason$d = 'Do not use dollar signs before shell commands'; +var start$7 = unistUtilPosition.start; +var end$3 = unistUtilPosition.end; -// 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 noHeadingContentIndent(tree, file) { + var contents = String(file); -function noShellDollars(tree, file) { - unistUtilVisit$v(tree, 'code', visitor); + unistUtilVisit(tree, 'heading', visitor); function visitor(node) { - var lines; - var line; - var length; + var depth; + var children; + var type; + var head; + var initial; + var final; + var diff; var index; + var char; + var reason; + var abs; - // 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 (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); + } - if (length <= 1) { + /* istanbul ignore if - CR/LF bug: remarkjs/remark#195. */ + if (!char) { return } - while (++index < length) { - line = lines[index]; + index = depth + (index - initial.offset); + head = start$7(children[0]).column; - if (line.trim() && !line.match(/^\s*\$\s*/)) { - return - } + // Ignore empty headings. + if (!head) { + return } - file.message(reason$d, node); - } - } -} + diff = head - initial.column - 1 - index; -var convert_1$w = convert$z; + if (diff) { + abs = Math.abs(diff); -function convert$z(test) { - if (typeof test === 'string') { - return typeFactory$w(test) - } + reason = + (diff > 0 ? 'Remove' : 'Add') + + ' ' + + abs + + ' ' + + pluralize('space', abs) + + ' before this heading’s content'; - if (test === null || test === undefined) { - return ok$x - } + file.message(reason, start$7(children[0])); + } + } - if (typeof test === 'object') { - return ('length' in test ? anyFactory$w : matchesFactory$w)(test) - } + // 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 (typeof test === 'function') { - return test - } + if (diff) { + reason = + 'Remove ' + + diff + + ' ' + + pluralize('space', diff) + + ' after this heading’s content'; - throw new Error('Expected function, string, or object as test') + file.message(reason, final); + } + } + } } -function convertAll$w(tests) { - var results = []; - var length = tests.length; - var index = -1; - - while (++index < length) { - results[index] = convert$z(tests[index]); - } +var remarkLintNoInlinePadding = unifiedLintRule('remark-lint:no-inline-padding', noInlinePadding); - return results -} +function noInlinePadding(tree, file) { + unistUtilVisit(tree, ['emphasis', 'strong', 'delete', 'image', 'link'], visitor); -// Utility assert each property in `test` is represented in `node`, and each -// values are strictly equal. -function matchesFactory$w(test) { - return matches + function visitor(node) { + var contents; - function matches(node) { - var key; + if (!unistUtilGenerated(node)) { + contents = mdastUtilToString(node); - for (key in test) { - if (node[key] !== test[key]) { - return false + if ( + contents.charAt(0) === ' ' || + contents.charAt(contents.length - 1) === ' ' + ) { + file.message('Don’t pad `' + node.type + '` with inner spaces', node); } } - - return true } } -function anyFactory$w(tests) { - var checks = convertAll$w(tests); - var length = checks.length; +var remarkLintNoShortcutReferenceImage = unifiedLintRule( + 'remark-lint:no-shortcut-reference-image', + noShortcutReferenceImage +); - return matches +var reason$5 = 'Use the trailing [] on reference images'; - function matches() { - var index = -1; +function noShortcutReferenceImage(tree, file) { + unistUtilVisit(tree, 'imageReference', visitor); - while (++index < length) { - if (checks[index].apply(this, arguments)) { - return true - } + function visitor(node) { + if (!unistUtilGenerated(node) && node.referenceType === 'shortcut') { + file.message(reason$5, node); } - - return false } } -// Utility to convert a string into a function which checks a given node’s type -// for said string. -function typeFactory$w(test) { - return type +var remarkLintNoShortcutReferenceLink = unifiedLintRule( + 'remark-lint:no-shortcut-reference-link', + noShortcutReferenceLink +); - function type(node) { - return Boolean(node && node.type === test) - } -} +var reason$6 = 'Use the trailing `[]` on reference links'; -// Utility to return true. -function ok$x() { - return true +function noShortcutReferenceLink(tree, file) { + unistUtilVisit(tree, 'linkReference', visitor); + + function visitor(node) { + if (!unistUtilGenerated(node) && node.referenceType === 'shortcut') { + file.message(reason$6, node); + } + } } -var unistUtilVisitParents$w = visitParents$w; +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()) +} -var CONTINUE$10 = true; -var SKIP$10 = 'skip'; -var EXIT$10 = false; +function noUndefinedReferences(tree, file, option) { + var allow = ((option || {}).allow || []).map(normalize$3); + var map = {}; -visitParents$w.CONTINUE = CONTINUE$10; -visitParents$w.SKIP = SKIP$10; -visitParents$w.EXIT = EXIT$10; + unistUtilVisit(tree, ['definition', 'footnoteDefinition'], mark); + unistUtilVisit(tree, ['imageReference', 'linkReference', 'footnoteReference'], find); -function visitParents$w(tree, test, visitor, reverse) { - var is; + function mark(node) { + if (!unistUtilGenerated(node)) { + map[normalize$3(node.identifier)] = true; + } + } - if (typeof test === 'function' && typeof visitor !== 'function') { - reverse = visitor; - visitor = test; - test = null; + function find(node) { + if ( + !unistUtilGenerated(node) && + !(normalize$3(node.identifier) in map) && + allow.indexOf(normalize$3(node.identifier)) === -1 + ) { + file.message(reason$7, node); + } } +} - is = convert_1$w(test); +var remarkLintNoUnusedDefinitions = unifiedLintRule('remark-lint:no-unused-definitions', noUnusedDefinitions); - one(tree, null, []); +var reason$8 = 'Found unused definition'; - // Visit a single node. - function one(node, index, parents) { - var result = []; - var subresult; +function noUnusedDefinitions(tree, file) { + var map = {}; + var identifier; + var entry; - if (!test || is(node, index, parents[parents.length - 1] || null)) { - result = toResult$w(visitor(node, parents)); + unistUtilVisit(tree, ['definition', 'footnoteDefinition'], find); + unistUtilVisit(tree, ['imageReference', 'linkReference', 'footnoteReference'], mark); - if (result[0] === EXIT$10) { - return result - } - } + for (identifier in map) { + entry = map[identifier]; - if (node.children && result[0] !== SKIP$10) { - subresult = toResult$w(all(node.children, parents.concat(node))); - return subresult[0] === EXIT$10 ? subresult : result + if (!entry.used) { + file.message(reason$8, entry.node); } - - 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); + function find(node) { + if (!unistUtilGenerated(node)) { + map[node.identifier.toUpperCase()] = {node: node, used: false}; + } + } - if (result[0] === EXIT$10) { - return result - } + function mark(node) { + var info = map[node.identifier.toUpperCase()]; - index = typeof result[1] === 'number' ? result[1] : index + step; + if (!unistUtilGenerated(node) && info) { + info.used = true; } } } -function toResult$w(value) { - if (value !== null && typeof value === 'object' && 'length' in value) { - return value - } - - if (typeof value === 'number') { - return [CONTINUE$10, value] - } +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 +]; - return [value] -} +var remarkPresetLintRecommended = { + plugins: plugins$1 +}; -var unistUtilVisit$w = visit$w; +var remarkLintBlockquoteIndentation = unifiedLintRule( + 'remark-lint:blockquote-indentation', + blockquoteIndentation +); +function blockquoteIndentation(tree, file, option) { + var preferred = typeof option === 'number' && !isNaN(option) ? option : null; + unistUtilVisit(tree, 'blockquote', visitor); -var CONTINUE$11 = unistUtilVisitParents$w.CONTINUE; -var SKIP$11 = unistUtilVisitParents$w.SKIP; -var EXIT$11 = unistUtilVisitParents$w.EXIT; + function visitor(node) { + var abs; + var diff; + var reason; -visit$w.CONTINUE = CONTINUE$11; -visit$w.SKIP = SKIP$11; -visit$w.EXIT = EXIT$11; + if (unistUtilGenerated(node) || node.children.length === 0) { + return + } -function visit$w(tree, test, visitor, reverse) { - if (typeof test === 'function' && typeof visitor !== 'function') { - reverse = visitor; - visitor = test; - test = null; - } + if (preferred) { + diff = preferred - check$3(node); - unistUtilVisitParents$w(tree, test, overload, reverse); + if (diff !== 0) { + abs = Math.abs(diff); + reason = + (diff > 0 ? 'Add' : 'Remove') + + ' ' + + abs + + ' ' + + pluralize('space', abs) + + ' between block quote and content'; - function overload(node, parents) { - var parent = parents[parents.length - 1]; - var index = parent ? parent.children.indexOf(node) : null; - return visitor(node, index, parent) + file.message(reason, unistUtilPosition.start(node.children[0])); + } + } else { + preferred = check$3(node); + } } } -var remarkLintNoTableIndentation = unifiedLintRule('remark-lint:no-table-indentation', noTableIndentation); +function check$3(node) { + var head = node.children[0]; + var indentation = unistUtilPosition.start(head).column - unistUtilPosition.start(node).column; + var padding = mdastUtilToString(head).match(/^ +/); -var reason$e = 'Do not indent table rows'; + if (padding) { + indentation += padding[0].length; + } -function noTableIndentation(tree, file) { - var contents = String(file); + return indentation +} - unistUtilVisit$w(tree, 'table', visitor); +var remarkLintCheckboxCharacterStyle = unifiedLintRule( + 'remark-lint:checkbox-character-style', + checkboxCharacterStyle +); - function visitor(node) { - if (!unistUtilGenerated(node)) { - node.children.forEach(each); - } +var start$8 = unistUtilPosition.start; +var end$4 = unistUtilPosition.end; - return unistUtilVisit$w.SKIP - } +var checked = {x: true, X: true}; +var unchecked = {' ': true, '\t': true}; +var types$1 = {true: 'checked', false: 'unchecked'}; - function each(row) { - var fence = contents.slice( - unistUtilPosition.start(row).offset, - unistUtilPosition.start(row.children[0]).offset - ); +function checkboxCharacterStyle(tree, file, option) { + var contents = String(file); + var location = vfileLocation(file); + var preferred = typeof option === 'object' ? option : {}; - if (fence.indexOf('|') > 1) { - file.message(reason$e, row); - } + if (preferred.unchecked && unchecked[preferred.unchecked] !== true) { + file.fail( + 'Incorrect unchecked checkbox marker `' + + preferred.unchecked + + "`: use either `'\\t'`, or `' '`" + ); } -} - -var vfileLocation$6 = factory$e; -function factory$e(file) { - var contents = indices$6(String(file)); - - return { - toPosition: offsetToPositionFactory$6(contents), - toOffset: positionToOffsetFactory$6(contents) + if (preferred.checked && checked[preferred.checked] !== true) { + file.fail( + 'Incorrect checked checkbox marker `' + + preferred.checked + + "`: use either `'x'`, or `'X'`" + ); } -} -// Factory to get the line and column-based `position` for `offset` in the bound -// indices. -function offsetToPositionFactory$6(indices) { - return offsetToPosition + unistUtilVisit(tree, 'listItem', visitor); - // Get the line and column-based `position` for `offset` in the bound indices. - function offsetToPosition(offset) { - var index = -1; - var length = indices.length; + function visitor(node) { + var type; + var initial; + var final; + var value; + var style; + var character; + var reason; - if (offset < 0) { - return {} + // Exit early for items without checkbox. + if (typeof node.checked !== 'boolean' || unistUtilGenerated(node)) { + return } - while (++index < length) { - if (indices[index] > offset) { - return { - line: index + 1, - column: offset - (indices[index - 1] || 0) + 1, - offset: offset - } - } - } + type = types$1[node.checked]; + initial = start$8(node).offset; + final = (node.children.length === 0 ? end$4(node) : start$8(node.children[0])) + .offset; - return {} - } -} + // For a checkbox to be parsed, it must be followed by a whitespace. + value = contents.slice(initial, final).replace(/\s+$/, '').slice(0, -1); -// Factory to get the `offset` for a line and column-based `position` in the -// bound indices. -function positionToOffsetFactory$6(indices) { - return positionToOffset + // The checkbox character is behind a square bracket. + character = value.charAt(value.length - 1); + style = preferred[type]; - // 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 (style) { + if (character !== style) { + reason = + type.charAt(0).toUpperCase() + + type.slice(1) + + ' checkboxes should use `' + + style + + '` as a marker'; - if (!isNaN(line) && !isNaN(column) && line - 1 in indices) { - return (indices[line - 2] || 0) + column - 1 || 0 + file.message(reason, { + start: location.toPosition(initial + value.length - 1), + end: location.toPosition(initial + value.length) + }); + } + } else { + preferred[type] = character; } - - return -1 } } -// Get indices of line-breaks in `value`. -function indices$6(value) { - var result = []; - var index = value.indexOf('\n'); +var remarkLintCheckboxContentIndent = unifiedLintRule( + 'remark-lint:checkbox-content-indent', + checkboxContentIndent +); - while (index !== -1) { - result.push(index + 1); - index = value.indexOf('\n', index + 1); - } +var start$9 = unistUtilPosition.start; +var end$5 = unistUtilPosition.end; - result.push(value.length + 1); +var reason$9 = 'Checkboxes should be followed by a single character'; - return result -} +function checkboxContentIndent(tree, file) { + var contents = String(file); + var location = vfileLocation(file); -var remarkLintNoTabs = unifiedLintRule('remark-lint:no-tabs', noTabs); + unistUtilVisit(tree, 'listItem', visitor); -var reason$f = 'Use spaces instead of tabs'; + function visitor(node) { + var initial; + var final; + var value; -function noTabs(tree, file) { - var content = String(file); - var position = vfileLocation$6(file).toPosition; - var index = content.indexOf('\t'); + // Exit early for items without checkbox. + if (typeof node.checked !== 'boolean' || unistUtilGenerated(node)) { + return + } - while (index !== -1) { - file.message(reason$f, position(index)); - index = content.indexOf('\t', index + 1); - } -} + 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; -var remarkLintNoTrailingSpaces = unifiedLintRule('remark-lint:no-trailing-spaces', noTrailingSpaces); + while (/[^\S\n]/.test(contents.charAt(final))) { + final++; + } -/** - * Lines that are just space characters are not present in - * the AST, which is why we loop through lines manually. - */ + // For a checkbox to be parsed, it must be followed by a whitespace. + value = contents.slice(initial, final); + value = value.slice(value.indexOf(']') + 1); -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 (value.length !== 1) { + file.message(reason$9, { + start: location.toPosition(final - value.length + 1), + end: location.toPosition(final) }); } } } -var escapeStringRegexp$1 = string => { - if (typeof string !== 'string') { - throw new TypeError('Expected a string'); - } - - // 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'); -}; - -var convert_1$x = convert$A; +var remarkLintCodeBlockStyle = unifiedLintRule('remark-lint:code-block-style', codeBlockStyle); -function convert$A(test) { - if (typeof test === 'string') { - return typeFactory$x(test) - } +var start$a = unistUtilPosition.start; +var end$6 = unistUtilPosition.end; - if (test === null || test === undefined) { - return ok$y - } +var styles$3 = {null: true, fenced: true, indented: true}; - if (typeof test === 'object') { - return ('length' in test ? anyFactory$x : matchesFactory$x)(test) - } +function codeBlockStyle(tree, file, option) { + var contents = String(file); + var preferred = + typeof option === 'string' && option !== 'consistent' ? option : null; - if (typeof test === 'function') { - return test + if (styles$3[preferred] !== true) { + file.fail( + 'Incorrect code block style `' + + preferred + + "`: use either `'consistent'`, `'fenced'`, or `'indented'`" + ); } - throw new Error('Expected function, string, or object as test') -} - -function convertAll$x(tests) { - var results = []; - var length = tests.length; - var index = -1; + unistUtilVisit(tree, 'code', visitor); - while (++index < length) { - results[index] = convert$A(tests[index]); - } + function visitor(node) { + var initial; + var final; + var current; - return results -} + if (unistUtilGenerated(node)) { + return null + } -// Utility assert each property in `test` is represented in `node`, and each -// values are strictly equal. -function matchesFactory$x(test) { - return matches + initial = start$a(node).offset; + final = end$6(node).offset; - function matches(node) { - var key; + current = + node.lang || /^\s*([~`])\1{2,}/.test(contents.slice(initial, final)) + ? 'fenced' + : 'indented'; - for (key in test) { - if (node[key] !== test[key]) { - return false + if (preferred) { + if (preferred !== current) { + file.message('Code blocks should be ' + preferred, node); } + } else { + preferred = current; } - - return true } } -function anyFactory$x(tests) { - var checks = convertAll$x(tests); - var length = checks.length; - - return matches +var remarkLintDefinitionSpacing = unifiedLintRule('remark-lint:definition-spacing', definitionSpacing); - function matches() { - var index = -1; +var label$1 = /^\s*\[((?:\\[\s\S]|[^[\]])+)]/; +var reason$a = 'Do not use consecutive whitespace in definition labels'; - while (++index < length) { - if (checks[index].apply(this, arguments)) { - return true - } - } +function definitionSpacing(tree, file) { + var contents = String(file); - return false - } -} + unistUtilVisit(tree, ['definition', 'footnoteDefinition'], check); -// Utility to convert a string into a function which checks a given node’s type -// for said string. -function typeFactory$x(test) { - return type + function check(node) { + var start = unistUtilPosition.start(node).offset; + var end = unistUtilPosition.end(node).offset; - function type(node) { - return Boolean(node && node.type === test) + if ( + !unistUtilGenerated(node) && + /[ \t\n]{2,}/.test(contents.slice(start, end).match(label$1)[1]) + ) { + file.message(reason$a, node); + } } } -// Utility to return true. -function ok$y() { - return true -} - -var unistUtilVisitParents$x = visitParents$x; - - +var remarkLintFencedCodeFlag = unifiedLintRule('remark-lint:fenced-code-flag', fencedCodeFlag); -var CONTINUE$12 = true; -var SKIP$12 = 'skip'; -var EXIT$12 = false; +var start$b = unistUtilPosition.start; +var end$7 = unistUtilPosition.end; -visitParents$x.CONTINUE = CONTINUE$12; -visitParents$x.SKIP = SKIP$12; -visitParents$x.EXIT = EXIT$12; +var fence$2 = /^ {0,3}([~`])\1{2,}/; +var reasonIncorrect = 'Incorrect code language flag'; +var reasonMissing = 'Missing code language flag'; -function visitParents$x(tree, test, visitor, reverse) { - var is; +function fencedCodeFlag(tree, file, option) { + var contents = String(file); + var allowEmpty = false; + var allowed = []; + var flags = option; - if (typeof test === 'function' && typeof visitor !== 'function') { - reverse = visitor; - visitor = test; - test = null; + if (typeof flags === 'object' && !('length' in flags)) { + allowEmpty = Boolean(flags.allowEmpty); + flags = flags.flags; } - is = convert_1$x(test); + if (typeof flags === 'object' && 'length' in flags) { + allowed = String(flags).split(','); + } - one(tree, null, []); + unistUtilVisit(tree, 'code', visitor); - // Visit a single node. - function one(node, index, parents) { - var result = []; - var subresult; + function visitor(node) { + var value; - if (!test || is(node, index, parents[parents.length - 1] || null)) { - result = toResult$x(visitor(node, parents)); + 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 (result[0] === EXIT$12) { - return result + if (!allowEmpty && fence$2.test(value)) { + file.message(reasonMissing, node); + } } } + } +} - if (node.children && result[0] !== SKIP$12) { - subresult = toResult$x(all(node.children, parents.concat(node))); - return subresult[0] === EXIT$12 ? subresult : result - } +var remarkLintFencedCodeMarker = unifiedLintRule('remark-lint:fenced-code-marker', fencedCodeMarker); - return result +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 `'~'`" + ); } - // 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; + unistUtilVisit(tree, 'code', visitor); - while (index > min && index < children.length) { - result = one(children[index], index, parents); + function visitor(node) { + var start; + var marker; + var label; - if (result[0] === EXIT$12) { - return result - } + if (!unistUtilGenerated(node)) { + start = unistUtilPosition.start(node).offset; + marker = contents + .slice(start, start + 4) + .replace(/^\s+/, '') + .charAt(0); - index = typeof result[1] === 'number' ? result[1] : index + step; + // 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; + } + } } } } -function toResult$x(value) { - if (value !== null && typeof value === 'object' && 'length' in value) { - return value - } +var remarkLintFileExtension = unifiedLintRule('remark-lint:file-extension', fileExtension); - if (typeof value === 'number') { - return [CONTINUE$12, value] - } +function fileExtension(tree, file, option) { + var ext = file.extname; + var preferred = typeof option === 'string' ? option : 'md'; - return [value] + if (ext && ext.slice(1) !== preferred) { + file.message('Incorrect extension: use `' + preferred + '`'); + } } -var unistUtilVisit$x = visit$x; - +var remarkLintFinalDefinition = unifiedLintRule('remark-lint:final-definition', finalDefinition); +var start$c = unistUtilPosition.start; -var CONTINUE$13 = unistUtilVisitParents$x.CONTINUE; -var SKIP$13 = unistUtilVisitParents$x.SKIP; -var EXIT$13 = unistUtilVisitParents$x.EXIT; +function finalDefinition(tree, file) { + var last = null; -visit$x.CONTINUE = CONTINUE$13; -visit$x.SKIP = SKIP$13; -visit$x.EXIT = EXIT$13; + unistUtilVisit(tree, visitor, true); -function visit$x(tree, test, visitor, reverse) { - if (typeof test === 'function' && typeof visitor !== 'function') { - reverse = visitor; - visitor = test; - test = null; - } + function visitor(node) { + var line = start$c(node).line; - unistUtilVisitParents$x(tree, test, overload, reverse); + // Ignore generated nodes. + if (node.type === 'root' || unistUtilGenerated(node)) { + return + } - function overload(node, parents) { - var parent = parents[parents.length - 1]; - var index = parent ? parent.children.indexOf(node) : null; - return visitor(node, index, parent) + 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 vfileLocation$7 = factory$f; +var remarkLintFirstHeadingLevel = unifiedLintRule('remark-lint:first-heading-level', firstHeadingLevel); -function factory$f(file) { - var contents = indices$7(String(file)); +var re$3 = / offset) { - return { - line: index + 1, - column: offset - (indices[index - 1] || 0) + 1, - offset: offset + if (rank !== undefined) { + if (rank !== preferred) { + file.message( + 'First heading level should be `' + preferred + '`', + node + ); } + + return unistUtilVisit.EXIT } } - - return {} } } -// Factory to get the `offset` for a line and column-based `position` in the -// bound indices. -function positionToOffsetFactory$7(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 - } +function infer(node) { + var results = node.value.match(re$3); + return results ? Number(results[1]) : undefined } -// 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); - - return result -} +var remarkLintHeadingStyle = unifiedLintRule('remark-lint:heading-style', headingStyle); -const start$g = unistUtilPosition.start; +var types$2 = ['atx', 'atx-closed', 'setext']; -var remarkLintProhibitedStrings = unifiedLintRule('remark-lint:prohibited-strings', prohibitedStrings); +function headingStyle(tree, file, option) { + var preferred = types$2.indexOf(option) === -1 ? null : option; -function testProhibited (val, content) { - let regexpFlags = 'g'; + unistUtilVisit(tree, 'heading', visitor); - if (!val.no) { - val.no = escapeStringRegexp$1(val.yes); - regexpFlags += 'i'; + 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); + } + } } +} - let regexpString = '(?. + unistUtilVisit(tree, ['heading', 'table', 'code', 'definition', 'html', 'jsx'], ignore); + unistUtilVisit(tree, ['link', 'image', 'inlineCode'], inline); - // 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, regexpFlags); + // Iterate over every line, and warn for violating lines. + while (++index < length) { + lineLength = lines[index].length; - const results = []; - let result = re.exec(content); - while (result) { - if (result[1] !== val.yes) { - results.push({ result: result[1], index: result.index }); + if (lineLength > preferred) { + file.message('Line must be at most ' + preferred + ' characters', { + line: index + 1, + column: lineLength + 1 + }); } - result = re.exec(content); } - return results -} - -function prohibitedStrings (ast, file, strings) { - const location = vfileLocation$7(file); + // 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; - unistUtilVisit$x(ast, 'text', checkText); + /* istanbul ignore if - Nothing to whitelist when generated. */ + if (unistUtilGenerated(node)) { + return + } - function checkText (node) { - const content = node.value; - const initial = start$g(node).offset; + initial = start$d(node); + final = end$8(node); - strings.forEach((val) => { - 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) - }); - }); - } - }); - } -} + // No whitelisting when starting after the border, or ending before it. + if (initial.column > preferred || final.column < preferred) { + return + } -var convert_1$y = convert$B; + // No whitelisting when there’s whitespace after the link. + if ( + next && + start$d(next).line === initial.line && + (!next.value || /^(.+?[ \t].+?)/.test(next.value)) + ) { + return + } -function convert$B(test) { - if (typeof test === 'string') { - return typeFactory$y(test) + whitelist(initial.line - 1, final.line); } - if (test === null || test === undefined) { - return ok$z + 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); + } } - if (typeof test === 'object') { - return ('length' in test ? anyFactory$y : matchesFactory$y)(test) + // Whitelist from `initial` to `final`, zero-based. + function whitelist(initial, final) { + while (initial < final) { + lines[initial++] = ''; + } } +} - if (typeof test === 'function') { - return test - } +var remarkLintNoConsecutiveBlankLines = unifiedLintRule( + 'remark-lint:no-consecutive-blank-lines', + noConsecutiveBlankLines +); - throw new Error('Expected function, string, or object as test') -} +function noConsecutiveBlankLines(tree, file) { + unistUtilVisit(tree, visitor); -function convertAll$y(tests) { - var results = []; - var length = tests.length; - var index = -1; + function visitor(node) { + var children = node.children; + var head; + var tail; - while (++index < length) { - results[index] = convert$B(tests[index]); - } + if (!unistUtilGenerated(node) && children) { + head = children[0]; - return results -} + if (head && !unistUtilGenerated(head)) { + // Compare parent and first child. + compare(unistUtilPosition.start(node), unistUtilPosition.start(head), 0); -// Utility assert each property in `test` is represented in `node`, and each -// values are strictly equal. -function matchesFactory$y(test) { - return matches + // Compare between each child. + children.forEach(visitChild); - function matches(node) { - var key; + tail = children[children.length - 1]; - for (key in test) { - if (node[key] !== test[key]) { - return false + // Compare parent and last child. + if (tail !== head && !unistUtilGenerated(tail)) { + compare(unistUtilPosition.end(node), unistUtilPosition.end(tail), 1); + } } } - - return true } -} -function anyFactory$y(tests) { - var checks = convertAll$y(tests); - var length = checks.length; + // 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; - return matches + if (lines > 0) { + reason = + 'Remove ' + + lines + + ' ' + + pluralize('line', Math.abs(lines)) + + ' ' + + (diff > 0 ? 'before' : 'after') + + ' node'; - function matches() { - var index = -1; + file.message(reason, end); + } + } - while (++index < length) { - if (checks[index].apply(this, arguments)) { - return true + 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++; } - } - return false + compare(unistUtilPosition.end(previous), unistUtilPosition.start(child), max); + } } } -// Utility to convert a string into a function which checks a given node’s type -// for said string. -function typeFactory$y(test) { - return type +var remarkLintNoFileNameArticles = unifiedLintRule('remark-lint:no-file-name-articles', noFileNameArticles); - function type(node) { - return Boolean(node && node.type === test) - } -} +function noFileNameArticles(tree, file) { + var match = file.stem && file.stem.match(/^(the|teh|an?)\b/i); -// Utility to return true. -function ok$z() { - return true + if (match) { + file.message('Do not start file names with `' + match[0] + '`'); + } } -var unistUtilVisitParents$y = visitParents$y; - +var remarkLintNoFileNameConsecutiveDashes = unifiedLintRule( + 'remark-lint:no-file-name-consecutive-dashes', + noFileNameConsecutiveDashes +); +var reason$b = 'Do not use consecutive dashes in a file name'; -var CONTINUE$14 = true; -var SKIP$14 = 'skip'; -var EXIT$14 = false; +function noFileNameConsecutiveDashes(tree, file) { + if (file.stem && /-{2,}/.test(file.stem)) { + file.message(reason$b); + } +} -visitParents$y.CONTINUE = CONTINUE$14; -visitParents$y.SKIP = SKIP$14; -visitParents$y.EXIT = EXIT$14; +var remarkLintNoFileNameOuterDashes = unifiedLintRule( + 'remark-lint:no-file-name-outer-dashes', + noFileNameOuterDashes +); -function visitParents$y(tree, test, visitor, reverse) { - var is; +var reason$c = 'Do not use initial or final dashes in a file name'; - if (typeof test === 'function' && typeof visitor !== 'function') { - reverse = visitor; - visitor = test; - test = null; +function noFileNameOuterDashes(tree, file) { + if (file.stem && /^-|-$/.test(file.stem)) { + file.message(reason$c); } +} - is = convert_1$y(test); +var remarkLintNoHeadingIndent = unifiedLintRule('remark-lint:no-heading-indent', noHeadingIndent); - one(tree, null, []); +var start$e = unistUtilPosition.start; - // Visit a single node. - function one(node, index, parents) { - var result = []; - var subresult; +function noHeadingIndent(tree, file) { + var contents = String(file); + var length = contents.length; - if (!test || is(node, index, parents[parents.length - 1] || null)) { - result = toResult$y(visitor(node, parents)); + unistUtilVisit(tree, 'heading', visitor); - if (result[0] === EXIT$14) { - return result - } - } + function visitor(node) { + var initial; + var begin; + var index; + var character; + var diff; - if (node.children && result[0] !== SKIP$14) { - subresult = toResult$y(all(node.children, parents.concat(node))); - return subresult[0] === EXIT$14 ? subresult : result + if (unistUtilGenerated(node)) { + return } - 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; + initial = start$e(node); + begin = initial.offset; + index = begin - 1; - while (index > min && index < children.length) { - result = one(children[index], index, parents); + while (++index < length) { + character = contents.charAt(index); - if (result[0] === EXIT$14) { - return result + if (character !== ' ' && character !== '\t') { + break } - - index = typeof result[1] === 'number' ? result[1] : index + step; } - } -} -function toResult$y(value) { - if (value !== null && typeof value === 'object' && 'length' in value) { - return value - } + diff = index - begin; - if (typeof value === 'number') { - return [CONTINUE$14, value] + if (diff) { + file.message( + 'Remove ' + diff + ' ' + pluralize('space', diff) + ' before this heading', + { + line: initial.line, + column: initial.column + diff + } + ); + } } - - return [value] } -var unistUtilVisit$y = visit$y; - +var start$f = unistUtilPosition.start; -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; +var remarkLintNoMultipleToplevelHeadings = unifiedLintRule( + 'remark-lint:no-multiple-toplevel-headings', + noMultipleToplevelHeadings +); -function visit$y(tree, test, visitor, reverse) { - if (typeof test === 'function' && typeof visitor !== 'function') { - reverse = visitor; - visitor = test; - test = null; - } +function noMultipleToplevelHeadings(tree, file, option) { + var preferred = option || 1; + var duplicate; - unistUtilVisitParents$y(tree, test, overload, reverse); + unistUtilVisit(tree, 'heading', visitor); - function overload(node, parents) { - var parent = parents[parents.length - 1]; - var index = parent ? parent.children.indexOf(node) : null; - return visitor(node, index, parent) + function visitor(node) { + 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)); + } + } } } -var rule = unifiedLintRule; - - - +var remarkLintNoShellDollars = unifiedLintRule('remark-lint:no-shell-dollars', noShellDollars); -var remarkLintRuleStyle = rule('remark-lint:rule-style', ruleStyle); +var reason$d = 'Do not use dollar signs before shell commands'; -var start$h = unistUtilPosition.start; -var end$9 = unistUtilPosition.end; +// 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 ruleStyle(tree, file, option) { - var contents = String(file); - var preferred = - typeof option === 'string' && option !== 'consistent' ? option : null; +function noShellDollars(tree, file) { + unistUtilVisit(tree, 'code', visitor); - if (preferred !== null && /[^-_* ]/.test(preferred)) { - file.fail( - "Incorrect preferred rule style: provide a correct markdown rule or `'consistent'`" - ); - } + function visitor(node) { + var lines; + var line; + var length; + var index; - unistUtilVisit$y(tree, 'thematicBreak', visitor); + // Check both known shell code and unknown code. + if (!unistUtilGenerated(node) && node.lang && flags.indexOf(node.lang) !== -1) { + lines = node.value.split('\n').filter(notEmpty); + length = lines.length; + index = -1; - function visitor(node) { - var initial = start$h(node).offset; - var final = end$9(node).offset; - var rule; + if (length === 0) { + return + } - if (!unistUtilGenerated(node)) { - rule = contents.slice(initial, final); + while (++index < length) { + line = lines[index]; - if (preferred) { - if (rule !== preferred) { - file.message('Rules should use `' + preferred + '`', node); + if (line.trim() && !line.match(/^\s*\$\s*/)) { + return } - } else { - preferred = rule; } + + file.message(reason$d, node); } } -} -var convert_1$z = convert$C; - -function convert$C(test) { - if (typeof test === 'string') { - return typeFactory$z(test) + function notEmpty(line) { + return line.trim().length !== 0 } +} - if (test === null || test === undefined) { - return ok$A - } +var remarkLintNoTableIndentation = unifiedLintRule('remark-lint:no-table-indentation', noTableIndentation); - if (typeof test === 'object') { - return ('length' in test ? anyFactory$z : matchesFactory$z)(test) - } +var reason$e = 'Do not indent table rows'; - if (typeof test === 'function') { - return test - } +function noTableIndentation(tree, file) { + var contents = String(file); - throw new Error('Expected function, string, or object as test') -} + unistUtilVisit(tree, 'table', visitor); -function convertAll$z(tests) { - var results = []; - var length = tests.length; - var index = -1; + function visitor(node) { + if (!unistUtilGenerated(node)) { + node.children.forEach(each); + } - while (++index < length) { - results[index] = convert$C(tests[index]); + return unistUtilVisit.SKIP } - return results -} - -// Utility assert each property in `test` is represented in `node`, and each -// values are strictly equal. -function matchesFactory$z(test) { - return matches - - function matches(node) { - var key; + function each(row) { + var fence = contents.slice( + unistUtilPosition.start(row).offset, + unistUtilPosition.start(row.children[0]).offset + ); - for (key in test) { - if (node[key] !== test[key]) { - return false - } + if (fence.indexOf('|') > 1) { + file.message(reason$e, row); } - - return true } } -function anyFactory$z(tests) { - var checks = convertAll$z(tests); - var length = checks.length; - - return matches +var remarkLintNoTabs = unifiedLintRule('remark-lint:no-tabs', noTabs); - function matches() { - var index = -1; +var reason$f = 'Use spaces instead of tabs'; - while (++index < length) { - if (checks[index].apply(this, arguments)) { - return true - } - } +function noTabs(tree, file) { + var content = String(file); + var position = vfileLocation(file).toPosition; + var index = content.indexOf('\t'); - return false + while (index !== -1) { + file.message(reason$f, position(index)); + index = content.indexOf('\t', index + 1); } } -// Utility to convert a string into a function which checks a given node’s type -// for said string. -function typeFactory$z(test) { - return type +var remarkLintNoTrailingSpaces = unifiedLintRule('remark-lint:no-trailing-spaces', noTrailingSpaces); - function type(node) { - return Boolean(node && node.type === test) +/** + * 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 } + } + }); + } } } -// Utility to return true. -function ok$A() { - return true -} +var escapeStringRegexp$1 = string => { + if (typeof string !== 'string') { + throw new TypeError('Expected a string'); + } -var unistUtilVisitParents$z = visitParents$z; + // 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'); +}; + +const start$g = unistUtilPosition.start; +var remarkLintProhibitedStrings = unifiedLintRule('remark-lint:prohibited-strings', prohibitedStrings); +function testProhibited (val, content) { + let regexpFlags = 'g'; + let no = val.no; -var CONTINUE$16 = true; -var SKIP$16 = 'skip'; -var EXIT$16 = false; + if (!no) { + no = escapeStringRegexp$1(val.yes); + regexpFlags += 'i'; + } -visitParents$z.CONTINUE = CONTINUE$16; -visitParents$z.SKIP = SKIP$16; -visitParents$z.EXIT = EXIT$16; + let regexpString = '(? min && index < children.length) { - result = one(children[index], index, parents); + function checkText (node) { + const content = node.value; + const initial = start$g(node).offset; - if (result[0] === EXIT$16) { - return result + strings.forEach((val) => { + 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) + }); + }); } - - index = typeof result[1] === 'number' ? result[1] : index + step; - } + }); } } -function toResult$z(value) { - if (value !== null && typeof value === 'object' && 'length' in value) { - return value - } - - if (typeof value === 'number') { - return [CONTINUE$16, value] - } +var rule = unifiedLintRule; - return [value] -} -var unistUtilVisit$z = visit$z; +var remarkLintRuleStyle = rule('remark-lint:rule-style', ruleStyle); -var CONTINUE$17 = unistUtilVisitParents$z.CONTINUE; -var SKIP$17 = unistUtilVisitParents$z.SKIP; -var EXIT$17 = unistUtilVisitParents$z.EXIT; +var start$h = unistUtilPosition.start; +var end$9 = unistUtilPosition.end; -visit$z.CONTINUE = CONTINUE$17; -visit$z.SKIP = SKIP$17; -visit$z.EXIT = EXIT$17; +function ruleStyle(tree, file, option) { + var contents = String(file); + var preferred = + typeof option === 'string' && option !== 'consistent' ? option : null; -function visit$z(tree, test, visitor, reverse) { - if (typeof test === 'function' && typeof visitor !== 'function') { - reverse = visitor; - visitor = test; - test = null; + if (preferred !== null && /[^-_* ]/.test(preferred)) { + file.fail( + "Incorrect preferred rule style: provide a correct markdown rule or `'consistent'`" + ); } - unistUtilVisitParents$z(tree, test, overload, reverse); + unistUtilVisit(tree, 'thematicBreak', visitor); - function overload(node, parents) { - var parent = parents[parents.length - 1]; - var index = parent ? parent.children.indexOf(node) : null; - return visitor(node, index, parent) + function visitor(node) { + var initial = start$h(node).offset; + var final = end$9(node).offset; + var rule; + + if (!unistUtilGenerated(node)) { + rule = contents.slice(initial, final); + + if (preferred) { + if (rule !== preferred) { + file.message('Rules should use `' + preferred + '`', node); + } + } else { + preferred = rule; + } + } } } @@ -54156,7 +46916,7 @@ function strongMarker(tree, file, option) { ); } - unistUtilVisit$z(tree, 'strong', visitor); + unistUtilVisit(tree, 'strong', visitor); function visitor(node) { var marker = contents.charAt(unistUtilPosition.start(node).offset); @@ -54176,197 +46936,6 @@ function strongMarker(tree, file, option) { } } -var convert_1$A = convert$D; - -function convert$D(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$D(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$18 = true; -var SKIP$18 = 'skip'; -var EXIT$18 = false; - -visitParents$A.CONTINUE = CONTINUE$18; -visitParents$A.SKIP = SKIP$18; -visitParents$A.EXIT = EXIT$18; - -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$18) { - return 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 - } - - // 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$18) { - 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$18, value] - } - - return [value] -} - -var unistUtilVisit$A = visit$A; - - - -var CONTINUE$19 = unistUtilVisitParents$A.CONTINUE; -var SKIP$19 = unistUtilVisitParents$A.SKIP; -var EXIT$19 = unistUtilVisitParents$A.EXIT; - -visit$A.CONTINUE = CONTINUE$19; -visit$A.SKIP = SKIP$19; -visit$A.EXIT = EXIT$19; - -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 remarkLintTableCellPadding = unifiedLintRule('remark-lint:table-cell-padding', tableCellPadding); var start$i = unistUtilPosition.start; @@ -54387,7 +46956,7 @@ function tableCellPadding(tree, file, option) { ); } - unistUtilVisit$A(tree, 'table', visitor); + unistUtilVisit(tree, 'table', visitor); function visitor(node) { var rows = node.children; @@ -54460,7 +47029,7 @@ function tableCellPadding(tree, file, option) { checkSide('end', entry, style, sizes); } - return unistUtilVisit$A.SKIP + return unistUtilVisit.SKIP } function checkSide(side, entry, style, sizes) { @@ -54503,197 +47072,6 @@ function size(node) { return end$a(node).offset - start$i(node).offset } -var convert_1$B = convert$E; - -function convert$E(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$E(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$j = unistUtilPosition.start; @@ -54705,7 +47083,7 @@ var reasonEnd = 'Missing final pipe in table fence'; function tablePipes(tree, file) { var contents = String(file); - unistUtilVisit$B(tree, 'table', visitor); + unistUtilVisit(tree, 'table', visitor); function visitor(node) { var rows = node.children; @@ -54740,197 +47118,6 @@ function tablePipes(tree, file) { } } -var convert_1$C = convert$F; - -function convert$F(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$F(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 @@ -54958,7 +47145,7 @@ function unorderedListMarkerStyle(tree, file, option) { ); } - unistUtilVisit$C(tree, 'list', visitor); + unistUtilVisit(tree, 'list', visitor); function visitor(node) { var children = node.children; diff --git a/tools/node-lint-md-cli-rollup/package-lock.json b/tools/node-lint-md-cli-rollup/package-lock.json index efd36027c65c22..660d0802ca277b 100644 --- a/tools/node-lint-md-cli-rollup/package-lock.json +++ b/tools/node-lint-md-cli-rollup/package-lock.json @@ -856,32 +856,6 @@ "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-checkbox-character-style": { @@ -894,37 +868,6 @@ "unist-util-position": "^3.0.0", "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": { @@ -937,37 +880,6 @@ "unist-util-position": "^3.0.0", "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": { @@ -979,32 +891,6 @@ "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-definition-spacing": { @@ -1016,32 +902,6 @@ "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-fenced-code-flag": { @@ -1053,32 +913,6 @@ "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-fenced-code-marker": { @@ -1090,32 +924,6 @@ "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-file-extension": { @@ -1135,32 +943,6 @@ "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-final-newline": { @@ -1179,32 +961,6 @@ "unified-lint-rule": "^1.0.0", "unist-util-generated": "^1.1.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-hard-break-spaces": { @@ -1216,32 +972,6 @@ "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": { @@ -1253,32 +983,6 @@ "unified-lint-rule": "^1.0.0", "unist-util-generated": "^1.1.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-list-item-bullet-indent": { @@ -1291,32 +995,6 @@ "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-list-item-indent": { @@ -1329,32 +1007,6 @@ "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-maximum-line-length": { @@ -1366,32 +1018,6 @@ "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-no-auto-link-without-protocol": { @@ -1404,32 +1030,6 @@ "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-no-blockquote-without-marker": { @@ -1442,37 +1042,6 @@ "unist-util-position": "^3.0.0", "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": { @@ -1485,32 +1054,6 @@ "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-no-duplicate-definitions": { @@ -1523,32 +1066,6 @@ "unist-util-position": "^3.0.0", "unist-util-stringify-position": "^2.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-no-file-name-articles": { @@ -1586,32 +1103,6 @@ "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-no-heading-indent": { @@ -1624,32 +1115,6 @@ "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-no-inline-padding": { @@ -1661,32 +1126,6 @@ "unified-lint-rule": "^1.0.0", "unist-util-generated": "^1.1.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": { @@ -1699,32 +1138,6 @@ "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-no-multiple-toplevel-headings": { @@ -1737,68 +1150,16 @@ "unist-util-position": "^3.0.0", "unist-util-stringify-position": "^2.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-no-shell-dollars": { - "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==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/remark-lint-no-shell-dollars/-/remark-lint-no-shell-dollars-2.0.1.tgz", + "integrity": "sha512-N+wOq3nmZ8WnCreWhi/rfIKQJPAz+pcbErQATcnQzH0znzldXlX8Ovlm54yDx/A+TmGMex/epkCwuiewIj9m4g==", "requires": { "unified-lint-rule": "^1.0.0", "unist-util-generated": "^1.1.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-shortcut-reference-image": { @@ -1809,32 +1170,6 @@ "unified-lint-rule": "^1.0.0", "unist-util-generated": "^1.1.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-shortcut-reference-link": { @@ -1845,32 +1180,6 @@ "unified-lint-rule": "^1.0.0", "unist-util-generated": "^1.1.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-table-indentation": { @@ -1882,32 +1191,6 @@ "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-no-tabs": { @@ -1917,13 +1200,6 @@ "requires": { "unified-lint-rule": "^1.0.0", "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": { @@ -1943,111 +1219,33 @@ "unified-lint-rule": "^1.0.0", "unist-util-generated": "^1.1.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": "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": "^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": "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": "^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" - } - } + "requires": { + "unified-lint-rule": "^1.0.0", + "unist-util-generated": "^1.1.0", + "unist-util-visit": "^2.0.0" + } + }, + "remark-lint-ordered-list-marker-style": { + "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": "^2.0.0" } }, "remark-lint-prohibited-strings": { - "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==", + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/remark-lint-prohibited-strings/-/remark-lint-prohibited-strings-1.5.2.tgz", + "integrity": "sha512-1+WIHboeLxmAnlxTFW6XNfvxvhnC2WRxn0rGgcNp/M7CrANHhnadY2/YeXFLF9oY22SAylrxiPG9eAuUmJuW6w==", "requires": { "escape-string-regexp": "^4.0.0", "unified-lint-rule": "^1.0.2", @@ -2060,35 +1258,6 @@ "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", - "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==" } } }, @@ -2101,32 +1270,6 @@ "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-strong-marker": { @@ -2138,32 +1281,6 @@ "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-table-cell-padding": { @@ -2175,32 +1292,6 @@ "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-table-pipes": { @@ -2212,32 +1303,6 @@ "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-unordered-list-marker-style": { @@ -2249,32 +1314,6 @@ "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-message-control": { @@ -2310,9 +1349,9 @@ } }, "remark-preset-lint-node": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/remark-preset-lint-node/-/remark-preset-lint-node-1.15.0.tgz", - "integrity": "sha512-1G7S2F/u7bk3kc4tZPrUphceP0RfT9AF6e+gzWbNi8URutECe3kl+Ur6ooMI5f1VqJUzcLF/U1YuhnFhkPnKkA==", + "version": "1.15.1", + "resolved": "https://registry.npmjs.org/remark-preset-lint-node/-/remark-preset-lint-node-1.15.1.tgz", + "integrity": "sha512-jRWBKCEkLGObhlgmlth0w78vxLKxvJYnkpqLvkl5AAatytv9kHjc4fN/dfUX2rj1KFYr/xC4KG/MM68gKQNJ0w==", "requires": { "remark-lint": "^7.0.0", "remark-lint-blockquote-indentation": "^2.0.0", @@ -2338,70 +1377,13 @@ "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.5.1", + "remark-lint-prohibited-strings": "^1.5.2", "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": { @@ -2425,63 +1407,6 @@ "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": { diff --git a/tools/node-lint-md-cli-rollup/package.json b/tools/node-lint-md-cli-rollup/package.json index aa203f67b33217..ee03028112bc92 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": "^12.0.0", "remark-lint": "^7.0.0", - "remark-preset-lint-node": "^1.15.0", + "remark-preset-lint-node": "^1.15.1", "unified-args": "^8.0.0" }, "main": "dist/index.js",