diff --git a/.eslintignore b/.eslintignore index cfb9992..4dd4b80 100644 --- a/.eslintignore +++ b/.eslintignore @@ -2,5 +2,5 @@ build/ components/ coverage/ build.js -mdast-lint.js -mdast-lint.min.js +remark-lint.js +remark-lint.min.js diff --git a/.jscs.json b/.jscs.json index 356df70..c5cb1cf 100644 --- a/.jscs.json +++ b/.jscs.json @@ -5,8 +5,8 @@ "coverage/", "node_modules/", "build.js", - "mdast-lint.js", - "mdast-lint.min.js" + "remark-lint.js", + "remark-lint.min.js" ], "jsDoc": { "checkAnnotations": "jsdoc3", diff --git a/bower.json b/bower.json index 96b83c9..3ac484f 100644 --- a/bower.json +++ b/bower.json @@ -1,17 +1,17 @@ { - "name": "mdast-lint", - "main": "mdast-lint.js", - "description": "Lint markdown with mdast", + "name": "remark-lint", + "main": "remark-lint.js", + "description": "Lint markdown with remark", "license": "MIT", "keywords": [ "markdown", "lint", "validate", - "mdast" + "remark" ], "repository": { "type": "git", - "url": "https://github.com/wooorm/mdast-lint.git" + "url": "https://github.com/wooorm/remark-lint.git" }, "authors": [ "Titus Wormer " diff --git a/component.json b/component.json index 50f6416..daea253 100644 --- a/component.json +++ b/component.json @@ -1,15 +1,15 @@ { - "name": "mdast-lint", + "name": "remark-lint", "version": "1.1.1", - "description": "Lint markdown with mdast", + "description": "Lint markdown with remark", "license": "MIT", "keywords": [ "markdown", "lint", "validate", - "mdast" + "remark" ], - "repository": "wooorm/mdast-lint", + "repository": "wooorm/remark-lint", "dependencies": { "sindresorhus/plur": "^2.0.0", "wooorm/mdast-range": "^1.0.0", diff --git a/doc/api.md b/doc/api.md index 08665a6..97ee7cf 100644 --- a/doc/api.md +++ b/doc/api.md @@ -5,9 +5,9 @@ Dependencies: ```javascript -var mdast = require('mdast'); -var lint = require('mdast-lint'); -var processor = mdast().use(lint); +var remark = require('remark'); +var lint = require('remark-lint'); +var processor = remark().use(lint); ``` Example document. @@ -49,10 +49,10 @@ processor.process(doc, function (err, file, res) { }); ``` -## [mdast](https://github.com/wooorm/mdast#api).[use](https://github.com/wooorm/mdast#mdastuseplugin-options)(lint, options) +## [remark](https://github.com/wooorm/remark#api).[use](https://github.com/wooorm/remark#remarkuseplugin-options)(lint, options) -Adds warnings for style violations to a given [virtual file](https://github.com/wooorm/mdast/blob/master/doc/mdast.3.md#file) -using mdast’s [warning API](https://github.com/wooorm/mdast/blob/master/doc/mdast.3.md#filewarnreason-position). +Adds warnings for style violations to a given [virtual file](https://github.com/wooorm/remark/blob/master/doc/remark.3.md#file) +using remark’s [warning API](https://github.com/wooorm/remark/blob/master/doc/remark.3.md#filewarnreason-position). When processing a file, these warnings are available at `file.messages`, and look as follows: diff --git a/doc/comparison/markdownlint.md b/doc/comparison/markdownlint.md index 7ee611c..6fb2e97 100644 --- a/doc/comparison/markdownlint.md +++ b/doc/comparison/markdownlint.md @@ -2,9 +2,9 @@ This table documents the similarity and difference between [**markdownlint**](https://github.com/mivok/markdownlint/blob/master/docs/RULES.md) -rules and **mdast-lint**’s rules. +rules and **remark-lint**’s rules. -| markdownlint | mdast | note | +| markdownlint | remark | note | | ------------ | ----------------------------- | ---------------------------------------------------------------------------------------- | | MD001 | heading-increment | | | MD002 | first-heading-level | | @@ -30,14 +30,14 @@ rules and **mdast-lint**’s rules. | MD026 | no-heading-punctuation | | | MD027 | blockquote-indentation | Won’t warn when that’s your preferred, consistent style | | MD028 | no-blockquote-without-caret | | -| MD029 | ordered-list-marker-value | markdownlint defaults to `one`, whereas mdast-lint defaults to `ordered` | +| MD029 | ordered-list-marker-value | markdownlint defaults to `one`, whereas remark-lint defaults to `ordered` | | MD030 | list-item-indent | | | MD031 | no-missing-blank-lines | | | MD032 | no-missing-blank-lines | | | MD033 | no-html | | | MD034 | no-literal-urls | | | MD035 | rule-style | | -| MD036 | emphasis-heading | mdast-lint only warns when the emphasis is followed by a colon, but that might change. | +| MD036 | emphasis-heading | remark-lint only warns when the emphasis is followed by a colon, but that might change. | | MD037 | no-inline-padding | | | MD038 | no-inline-padding | | | MD039 | no-inline-padding | | diff --git a/history.md b/history.md index decf08f..7d66199 100644 --- a/history.md +++ b/history.md @@ -5,78 +5,78 @@ 1.1.1 / 2015-09-12 ================== -* Add support for camel-case properties ([35c4066](https://github.com/wooorm/mdast-lint/commit/35c4066)) +* Add support for camel-case properties ([35c4066](https://github.com/wooorm/remark-lint/commit/35c4066)) 1.1.0 / 2015-08-31 ================== -* Add en- and disabling multiple rules in one comment ([29976d0](https://github.com/wooorm/mdast-lint/commit/29976d0)) -* Replace `vfile` patching of data with vfile-namespaces ([c1136a1](https://github.com/wooorm/mdast-lint/commit/c1136a1)) +* Add en- and disabling multiple rules in one comment ([29976d0](https://github.com/wooorm/remark-lint/commit/29976d0)) +* Replace `vfile` patching of data with vfile-namespaces ([c1136a1](https://github.com/wooorm/remark-lint/commit/c1136a1)) 1.0.0 / 2015-08-17 ================== -* Update dependencies ([4936d35](https://github.com/wooorm/mdast-lint/commit/4936d35)) +* Update dependencies ([4936d35](https://github.com/wooorm/remark-lint/commit/4936d35)) 0.4.5 / 2015-08-08 ================== -* Fix typo in definition-case warning ([490ac16](https://github.com/wooorm/mdast-lint/commit/490ac16)) +* Fix typo in definition-case warning ([490ac16](https://github.com/wooorm/remark-lint/commit/490ac16)) 0.4.4 / 2015-08-05 ================== -* Remove maximum-line-length warnings on definitions ([1119ca8](https://github.com/wooorm/mdast-lint/commit/1119ca8)) -* Add `linter-markdown` to `readme.md` ([7de8847](https://github.com/wooorm/mdast-lint/commit/7de8847)) +* Remove maximum-line-length warnings on definitions ([1119ca8](https://github.com/wooorm/remark-lint/commit/1119ca8)) +* Add `linter-markdown` to `readme.md` ([7de8847](https://github.com/wooorm/remark-lint/commit/7de8847)) 0.4.3 / 2015-08-04 ================== -* Fix failure on block-quotes without children ([a9aaff7](https://github.com/wooorm/mdast-lint/commit/a9aaff7)) -* Update mdast dev-dependency ([34df79c](https://github.com/wooorm/mdast-lint/commit/34df79c)) -* Add vfile as a dev-dependency ([84d1ce3](https://github.com/wooorm/mdast-lint/commit/84d1ce3)) +* Fix failure on block-quotes without children ([a9aaff7](https://github.com/wooorm/remark-lint/commit/a9aaff7)) +* Update mdast dev-dependency ([34df79c](https://github.com/wooorm/remark-lint/commit/34df79c)) +* Add vfile as a dev-dependency ([84d1ce3](https://github.com/wooorm/remark-lint/commit/84d1ce3)) 0.4.2 / 2015-07-12 ================== -* Remove peer-dependencies ([8d70fcf](https://github.com/wooorm/mdast-lint/commit/8d70fcf)) +* Remove peer-dependencies ([8d70fcf](https://github.com/wooorm/remark-lint/commit/8d70fcf)) 0.4.1 / 2015-07-05 ================== -* Remove component support ([58d7e6b](https://github.com/wooorm/mdast-lint/commit/58d7e6b)) -* Refactor to externalise `lib/utilities/` ([eb78529](https://github.com/wooorm/mdast-lint/commit/eb78529)) +* Remove component support ([58d7e6b](https://github.com/wooorm/remark-lint/commit/58d7e6b)) +* Refactor to externalise `lib/utilities/` ([eb78529](https://github.com/wooorm/remark-lint/commit/eb78529)) 0.4.0 / 2015-06-29 ================== -* Add gap support ([136e760](https://github.com/wooorm/mdast-lint/commit/136e760)) -* Update mdast ([2d122e4](https://github.com/wooorm/mdast-lint/commit/2d122e4)) +* Add gap support ([136e760](https://github.com/wooorm/remark-lint/commit/136e760)) +* Update mdast ([2d122e4](https://github.com/wooorm/remark-lint/commit/2d122e4)) 0.3.0 / 2015-06-20 ================== -* Add checkbox-content-indent rule ([7b55519](https://github.com/wooorm/mdast-lint/commit/7b55519)) -* Fix dot-files from being read as fixtures ([ecbec2c](https://github.com/wooorm/mdast-lint/commit/ecbec2c)) -* Add checkbox-character-style rule ([7ed4579](https://github.com/wooorm/mdast-lint/commit/7ed4579)) -* Fix tests for invalid position given my mdast-range ([55d1128](https://github.com/wooorm/mdast-lint/commit/55d1128)) -* Add missing jsdoc comment ([63b83b9](https://github.com/wooorm/mdast-lint/commit/63b83b9)) -* Update eslint ([a3b0829](https://github.com/wooorm/mdast-lint/commit/a3b0829)) -* Update mdast, mdast-yaml-config ([52bac04](https://github.com/wooorm/mdast-lint/commit/52bac04)) +* Add checkbox-content-indent rule ([7b55519](https://github.com/wooorm/remark-lint/commit/7b55519)) +* Fix dot-files from being read as fixtures ([ecbec2c](https://github.com/wooorm/remark-lint/commit/ecbec2c)) +* Add checkbox-character-style rule ([7ed4579](https://github.com/wooorm/remark-lint/commit/7ed4579)) +* Fix tests for invalid position given my mdast-range ([55d1128](https://github.com/wooorm/remark-lint/commit/55d1128)) +* Add missing jsdoc comment ([63b83b9](https://github.com/wooorm/remark-lint/commit/63b83b9)) +* Update eslint ([a3b0829](https://github.com/wooorm/remark-lint/commit/a3b0829)) +* Update mdast, mdast-yaml-config ([52bac04](https://github.com/wooorm/remark-lint/commit/52bac04)) 0.2.0 / 2015-06-13 ================== -* Remove mdast-usage, add mdast-yaml-config as dependencies ([053674f](https://github.com/wooorm/mdast-lint/commit/053674f)) -* Add images to blacklist for maximum-line-length ([ba6d270](https://github.com/wooorm/mdast-lint/commit/ba6d270)) -* Refactor to use rawgit references to images in `readme.md` ([3f6344c](https://github.com/wooorm/mdast-lint/commit/3f6344c)) -* Add support for external rules ([5162a09](https://github.com/wooorm/mdast-lint/commit/5162a09)) -* Refactor additional, fileless, rules support ([6d2ba65](https://github.com/wooorm/mdast-lint/commit/6d2ba65)) -* Adds support for automatic doc generation for file-less rules ([29965a3](https://github.com/wooorm/mdast-lint/commit/29965a3)) -* Add `reset` docs to rule generation script ([77b8bfd](https://github.com/wooorm/mdast-lint/commit/77b8bfd)) -* Adds `reset` rule to docs ([90a5f8a](https://github.com/wooorm/mdast-lint/commit/90a5f8a)) -* Update wording re rules in `readme.md` ([00d9ba4](https://github.com/wooorm/mdast-lint/commit/00d9ba4)) -* Update rule count in `readme.md` ([f937cf4](https://github.com/wooorm/mdast-lint/commit/f937cf4)) +* Remove mdast-usage, add mdast-yaml-config as dependencies ([053674f](https://github.com/wooorm/remark-lint/commit/053674f)) +* Add images to blacklist for maximum-line-length ([ba6d270](https://github.com/wooorm/remark-lint/commit/ba6d270)) +* Refactor to use rawgit references to images in `readme.md` ([3f6344c](https://github.com/wooorm/remark-lint/commit/3f6344c)) +* Add support for external rules ([5162a09](https://github.com/wooorm/remark-lint/commit/5162a09)) +* Refactor additional, fileless, rules support ([6d2ba65](https://github.com/wooorm/remark-lint/commit/6d2ba65)) +* Adds support for automatic doc generation for file-less rules ([29965a3](https://github.com/wooorm/remark-lint/commit/29965a3)) +* Add `reset` docs to rule generation script ([77b8bfd](https://github.com/wooorm/remark-lint/commit/77b8bfd)) +* Adds `reset` rule to docs ([90a5f8a](https://github.com/wooorm/remark-lint/commit/90a5f8a)) +* Update wording re rules in `readme.md` ([00d9ba4](https://github.com/wooorm/remark-lint/commit/00d9ba4)) +* Update rule count in `readme.md` ([f937cf4](https://github.com/wooorm/remark-lint/commit/f937cf4)) 0.1.0 / 2015-06-11 ================== diff --git a/index.js b/index.js index 20bbc87..db28a18 100644 --- a/index.js +++ b/index.js @@ -2,8 +2,8 @@ * @author Titus Wormer * @copyright 2015 Titus Wormer * @license MIT - * @module mdast:lint - * @fileoverview Lint markdown with mdast. + * @module remark:lint + * @fileoverview Lint markdown with remark. */ 'use strict'; diff --git a/lib/filter.js b/lib/filter.js index 75e3e1f..f7dedb1 100644 --- a/lib/filter.js +++ b/lib/filter.js @@ -2,9 +2,9 @@ * @author Titus Wormer * @copyright 2015 Titus Wormer * @license MIT - * @module mdast:lint:filter - * @fileoverview mdast plug-in used internally by - * mdast-lint to filter ruleId’s by enabled and disabled + * @module remark:lint:filter + * @fileoverview remark plug-in used internally by + * remark-lint to filter ruleId’s by enabled and disabled * ranges, or by gaps. * @todo Externalise into its own repository. */ @@ -25,7 +25,7 @@ function transformer(ast, file) { var gaps = []; var offset = 0; var isGap = false; - var scope = file.namespace('mdast-lint').ranges; + var scope = file.namespace('remark-lint').ranges; if (!file || !file.messages || !file.messages.length) { return; diff --git a/lib/index.js b/lib/index.js index e73f88b..516842f 100644 --- a/lib/index.js +++ b/lib/index.js @@ -2,8 +2,8 @@ * @author Titus Wormer * @copyright 2015 Titus Wormer * @license MIT - * @module mdast:lint:library - * @fileoverview mdast plug-in providing warnings when + * @module remark:lint:library + * @fileoverview remark plug-in providing warnings when * detecting style violations. */ @@ -44,14 +44,14 @@ var cwd = process && process.cwd(); */ function attachFactory(id, rule, options) { /** - * Attach the rule to an mdast instance, unless `false` + * Attach the rule to a remark instance, unless `false` * is passed as an option. * * @return {Function?} - See `plugin` below. */ function attach() { /** - * Attach the rule to an mdast instance, unless `false` + * Attach the rule to a remark instance, unless `false` * is passed as an option. * * @param {Node} ast - Root node. @@ -59,7 +59,7 @@ function attachFactory(id, rule, options) { * @param {Function} next - Signal end. */ function plugin(ast, file, next) { - var scope = file.namespace('mdast-lint'); + var scope = file.namespace('remark-lint'); /* * Track new messages per file. @@ -200,15 +200,15 @@ function decamelizeSettings(source) { * a non-nully and non-false value. * * @example - * var processor = lint(mdast, { + * var processor = lint(remark, { * 'html': false // Ignore HTML warnings. * }); * - * @param {MDAST} mdast - Host object. + * @param {Remark} remark - Host object. * @param {Object?} options - Hash of rule names mapping to * rule options. */ -function lint(mdast, options) { +function lint(remark, options) { var settings = decamelizeSettings(options || {}); var reset = settings.reset; var rules = loadExternals(settings.external); @@ -219,7 +219,7 @@ function lint(mdast, options) { * Ensure offset information is added. */ - mdast.use(range); + remark.use(range); /** * Get the latest state of a rule. @@ -228,7 +228,7 @@ function lint(mdast, options) { * @param {File} [file] - File (optional) */ function getState(ruleId, file) { - var scope = file && file.namespace('mdast-lint'); + var scope = file && file.namespace('remark-lint'); var ranges = scope && scope.ranges && scope.ranges[ruleId]; if (ranges) { @@ -250,7 +250,7 @@ function lint(mdast, options) { * @param {File} file - Virtual file. */ function store(file) { - var scope = file.namespace('mdast-lint'); + var scope = file.namespace('remark-lint'); var ranges = scope.ranges; var ruleId; @@ -271,7 +271,7 @@ function lint(mdast, options) { } } - mdast.use(function () { + remark.use(function () { return function (ast, file) { store(file); }; @@ -282,7 +282,7 @@ function lint(mdast, options) { */ for (id in rules) { - mdast.use(attachFactory(id, rules[id], settings[id])); + remark.use(attachFactory(id, rules[id], settings[id])); } /** @@ -294,7 +294,7 @@ function lint(mdast, options) { * @param {*} ruleId - Rule to toggle. */ function toggle(file, marker, type, ruleId) { - var scope = file.namespace('mdast-lint'); + var scope = file.namespace('remark-lint'); var markers; var currentState; var previousState; @@ -345,7 +345,7 @@ function lint(mdast, options) { } } - mdast.use(zone({ + remark.use(zone({ 'name': 'lint', 'onparse': onparse })); @@ -354,7 +354,7 @@ function lint(mdast, options) { * Filter. */ - mdast.use(filter); + remark.use(filter); /** * Transformer sort messages. diff --git a/lib/rules/no-html.js b/lib/rules/no-html.js index 3cd5905..df94871 100644 --- a/lib/rules/no-html.js +++ b/lib/rules/no-html.js @@ -6,7 +6,7 @@ * @fileoverview * Warn when HTML nodes are used. * - * Ignores comments, because they are used by this tool, mdast, and + * Ignores comments, because they are used by this tool, remark, and * because markdown doesn’t have native comments. * @example * diff --git a/mdast-lint.min.js b/mdast-lint.min.js deleted file mode 100644 index f70be62..0000000 --- a/mdast-lint.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(b,a){typeof exports==='object'&&typeof module!=='undefined'?module.exports=b():typeof define==='function'&&define.amd?define([],b):(typeof window!=='undefined'?a=window:typeof global!=='undefined'?a=global:typeof self!=='undefined'?a=self:a=this,a.mdastLint=b())}(function(){return function a(b,c,e){function f(d,k){if(!c[d]){if(!b[d]){var i=typeof require=='function'&&require;if(!k&&i)return i(d,!0);if(g)return g(d,!0);var j=new Error("Cannot find module '"+d+"'");throw j.code='MODULE_NOT_FOUND',j}var h=c[d]={exports:{}};b[d][0].call(h.exports,function(c){var a=b[d][1][c];return f(a?a:c)},h,h.exports,a,b,c,e)}return c[d].exports}var g=typeof require=='function'&&require;for(var d=0;da)return;g&&(d.push({start:e,end:a}),g=!1),e=a}var i=h.children[h.children.length-1],d=[],e=0,g=!1,j=b.namespace('mdast-lint').ranges;if(!(b&&b.messages&&b.messages.length))return;c(h,function(b){var c=a.start(b),d=a.end(b);f(c&&c.offset),b.children||f(d&&d.offset)}),e===a.end(i).offset&&(f(),f(b.toString().length-1)),b.messages=b.messages.filter(function(a){var e=j[a.ruleId],g=e&&e.length,f=d.length,i=-1,h,c;a.line||(a.line=1),a.column||(a.column=1),h=b.positionToOffset(a);while(f--)if(d[f].start<=h&&d[f].end>h)return!1;while(--g>i)if(c=e[g],c.position.line0?'Add':'Remove',d=Math.abs(d),d!==0&&g.warn(i+' '+d+' '+f('space',d)+' between blockquote and content',a.start(e.children[0]))):b=c(e)}),h()}var d=b('unist-util-visit'),e=b('mdast-util-to-string'),f=b('plur'),a=b('mdast-util-position');g.exports=h},{'mdast-util-position':63,'mdast-util-to-string':64,plur:66,'unist-util-visit':67}],5:[function(f,i,j){'use strict';function h(j,h,f,k){var i=h.toString();(f==='consistent'||typeof f!=='object')&&(f={}),f.unchecked||(f.unchecked=null),f.checked||(f.checked=null),f.unchecked!==null&&e[f.unchecked]!==!0&&h.fail('Invalid unchecked checkbox marker `'+f.unchecked+"`: use either `'\\t'`, or `' '`"),f.checked!==null&&g[f.checked]!==!0&&h.fail('Invalid checked checkbox marker `'+f.checked+"`: use either `'x'`, or `'X'`"),c(j,'listItem',function(c){var e,k,n,l,g,j,m;if(c.checked!==Boolean(c.checked)||a.generated(c))return;e=c.checked?'checked':'unchecked',k=b(c).offset,n=(c.children.length?b(c.children[0]):d(c)).offset,g=i.slice(k,n).trimRight().slice(0,-1),m=g.charAt(g.length-1),j=f[e],j===null?f[e]=m:m!==j&&(l=k+g.length,h.warn(e.charAt(0).toUpperCase()+e.slice(1)+' checkboxes should use `'+j+'` as a marker',{start:h.offsetToPosition(l-1),end:h.offsetToPosition(l)}))}),k()}var c=f('unist-util-visit'),a=f('mdast-util-position'),b=a.start,d=a.end,g={x:!0,X:!0},e={' ':!0,' ':!0};i.exports=h},{'mdast-util-position':63,'unist-util-visit':67}],6:[function(c,f,h){'use strict';function g(g,c,i,h){var f=c.toString();d(g,'listItem',function(d){var i,g,h;if(d.checked!==Boolean(d.checked)||a.generated(d))return;i=b(d).offset,g=(d.children.length?b(d.children[0]):e(d)).offset;while(/[^\S\n]/.test(f.charAt(g)))g++;if(h=f.slice(i,g),h=h.slice(h.indexOf(']')+1),h.length===1)return;c.warn('Checkboxes should be followed by a single character',{start:c.offsetToPosition(g-h.length+1),end:c.offsetToPosition(g)})}),h()}var d=c('unist-util-visit'),a=c('mdast-util-position'),b=a.start,e=a.end;f.exports=g},{'mdast-util-position':63,'unist-util-visit':67}],7:[function(b,g,i){'use strict';function h(i,g,b,j){function k(b){var c=d(b).offset,f=e(b).offset;return a.generated(b)?null:b.lang||/^\s*([~`])\1{2,}/.test(h.slice(c,f))?'fenced':'indented'}var h=g.toString();if(b=typeof b!=='string'||b==='consistent'?null:b,f[b]!==!0){g.fail('Invalid code block style `'+b+"`: use either `'consistent'`, `'fenced'`, or `'indented'`");return}c(i,'code',function(c){var a=k(c);if(!a)return;b?b!==a&&g.warn('Code blocks should be '+b,c):b=a}),j()}var c=b('unist-util-visit'),a=b('mdast-util-position'),d=a.start,e=a.end,f={null:!0,fenced:!0,indented:!0};g.exports=h},{'mdast-util-position':63,'unist-util-visit':67}],8:[function(c,e,g){'use strict';function f(c,e,i,h){function f(b){var f=a.start(b).offset,h=a.end(b).offset,c;if(a.generated(b))return;c=g.slice(f,h).match(d)[1],c!==c.toLowerCase()&&e.warn('Do not use upper-case characters in definition labels',b)}var g=e.toString();b(c,'definition',f),b(c,'footnoteDefinition',f),h()}var b=c('unist-util-visit'),a=c('mdast-util-position'),d=/^\s*\[((?:\\[\s\S]|[^\[\]])+)\]/;e.exports=f},{'mdast-util-position':63,'unist-util-visit':67}],9:[function(c,e,g){'use strict';function f(c,e,i,h){function f(b){var c=a.start(b).offset,f=a.end(b).offset,h;if(a.generated(b))return;h=g.slice(c,f).match(d)[1],/[ \t\n]{2,}/.test(h)&&e.warn('Do not use consecutive white-space in definition labels',b)}var g=e.toString();b(c,'definition',f),b(c,'footnoteDefinition',f),h()}var b=c('unist-util-visit'),a=c('mdast-util-position'),d=/^\s*\[((?:\\[\s\S]|[^\[\]])+)\]/;e.exports=f},{'mdast-util-position':63,'unist-util-visit':67}],10:[function(b,e,g){'use strict';function f(f,e,b,g){if(b=typeof b!=='string'||b==='consistent'?null:b,d[b]!==!0){e.fail('Invalid emphasis marker `'+b+"`: use either `'consistent'`, `'*'`, or `'_'`");return}c(f,'emphasis',function(c){var d=e.toString().charAt(a.start(c).offset);if(a.generated(c))return;b?d!==b&&e.warn('Emphasis should use `'+b+'` as a marker',c):b=d}),g()}var c=b('unist-util-visit'),a=b('mdast-util-position'),d={'*':!0,_:!0,null:!0};e.exports=f},{'mdast-util-position':63,'unist-util-visit':67}],11:[function(b,f,h){'use strict';function g(j,g,b,k){var i=g.toString(),h=!1,f=[];typeof b==='object'&&!('length'in b)&&(h=Boolean(b.allowEmpty),b=b.flags),typeof b==='object'&&'length'in b&&(f=String(b).split(',')),c(j,'code',function(b){var c=i.slice(d(b).offset,e(b).offset);if(a.generated(b))return;b.lang?f.length&&f.indexOf(b.lang)===-1&&g.warn('Invalid code-language flag',b):/^\ {0,3}([~`])\1{2,}/.test(c)&&!h&&g.warn('Missing code-language flag',b)}),k()}var c=b('unist-util-visit'),a=b('mdast-util-position'),d=a.start,e=a.end;f.exports=g},{'mdast-util-position':63,'unist-util-visit':67}],12:[function(c,e,g){'use strict';function f(g,e,c,h){var f=e.toString();if(c=typeof c!=='string'||c==='consistent'?null:c,b[c]!==!0){e.fail('Invalid fenced code marker `'+c+"`: use either `'consistent'`, `` '`' ``, or `'~'`");return}d(g,'code',function(g){var d=f.substr(a.start(g).offset,4);if(a.generated(g))return;if(d=d.trimLeft().charAt(0),b[d]!==!0)return;c?d!==c&&e.warn('Fenced code should use '+c+' as a marker',g):c=d}),h()}var d=c('unist-util-visit'),a=c('mdast-util-position'),b={'`':!0,'~':!0,null:!0};e.exports=f},{'mdast-util-position':63,'unist-util-visit':67}],13:[function(c,a,d){'use strict';function b(e,c,a,d){var b=c.extension;a=typeof a==='string'?a:'md',b!==''&&b!==a&&c.warn('Invalid extension: use `'+a+'`'),d()}a.exports=b},{}],14:[function(b,e,g){'use strict';function f(e,f,h,g){var b=null;c(e,function(c){var e=d(c).line;if(c.type==='root'||a.generated(c))return;c.type==='definition'?b!==null&&b>e&&f.warn('Move definitions to the end of the file (after the node at line `'+b+'`)',c):b===null&&(b=e)},!0),g()}var c=b('unist-util-visit'),a=b('mdast-util-position'),d=a.start;e.exports=f},{'mdast-util-position':63,'unist-util-visit':67}],15:[function(c,a,d){'use strict';function b(e,c,f,d){var a=c.toString(),b=a.length-1;b>0&&a.charAt(b)!=='\n'&&c.warn('Missing newline character at end of file'),d()}a.exports=b},{}],16:[function(a,d,f){'use strict';function e(a,d,f,e){b(a,'heading',function(a){return c.generated(a)?null:(a.depth!==1&&d.warn('First heading level should be `1`',a),!1)}),e()}var b=a('unist-util-visit'),c=a('mdast-util-position');d.exports=e},{'mdast-util-position':63,'unist-util-visit':67}],17:[function(b,d,f){'use strict';function e(e,b,g,f){var d=b.toString();c(e,'break',function(c){var e=a.start(c).offset,f=a.end(c).offset;if(a.generated(c))return;d.slice(e,f).length>3&&b.warn('Use two spaces for hard line breaks',c)}),f()}var c=b('unist-util-visit'),a=b('mdast-util-position');d.exports=e},{'mdast-util-position':63,'unist-util-visit':67}],18:[function(a,d,f){'use strict';function e(d,e,g,f){var a=null;b(d,'heading',function(b){var d=b.depth;if(c.generated(b))return;a&&d>a+1&&e.warn('Heading levels should increment by one level at a time',b),a=d}),f()}var b=a('unist-util-visit'),c=a('mdast-util-position');d.exports=e},{'mdast-util-position':63,'unist-util-visit':67}],19:[function(a,f,h){'use strict';function g(f,g,a,h){a=e.indexOf(a)===-1?null:a,c(f,'heading',function(c){if(d.generated(c))return;a?b(c,a)!==a&&g.warn('Headings should use '+a,c):a=b(c,a)}),h()}var c=a('unist-util-visit'),b=a('mdast-util-heading-style'),d=a('mdast-util-position'),e=['atx','atx-closed','setext'];f.exports=g},{'mdast-util-heading-style':62,'mdast-util-position':63,'unist-util-visit':67}],20:[function(a,b,c){'use strict';b.exports={'no-auto-link-without-protocol':a('./no-auto-link-without-protocol'),'no-literal-urls':a('./no-literal-urls'),'no-consecutive-blank-lines':a('./no-consecutive-blank-lines'),'no-missing-blank-lines':a('./no-missing-blank-lines'),'blockquote-indentation':a('./blockquote-indentation'),'no-blockquote-without-caret':a('./no-blockquote-without-caret'),'code-block-style':a('./code-block-style'),'checkbox-content-indent':a('./checkbox-content-indent'),'checkbox-character-style':a('./checkbox-character-style'),'definition-case':a('./definition-case'),'definition-spacing':a('./definition-spacing'),'no-emphasis-as-heading':a('./no-emphasis-as-heading'),'emphasis-marker':a('./emphasis-marker'),'fenced-code-flag':a('./fenced-code-flag'),'fenced-code-marker':a('./fenced-code-marker'),'file-extension':a('./file-extension'),'final-newline':a('./final-newline'),'no-file-name-articles':a('./no-file-name-articles'),'no-file-name-consecutive-dashes':a('./no-file-name-consecutive-dashes'),'no-file-name-irregular-characters':a('./no-file-name-irregular-characters'),'no-file-name-mixed-case':a('./no-file-name-mixed-case'),'no-file-name-outer-dashes':a('./no-file-name-outer-dashes'),'final-definition':a('./final-definition'),'hard-break-spaces':a('./hard-break-spaces'),'heading-increment':a('./heading-increment'),'no-heading-content-indent':a('./no-heading-content-indent'),'no-heading-indent':a('./no-heading-indent'),'first-heading-level':a('./first-heading-level'),'maximum-heading-length':a('./maximum-heading-length'),'no-heading-punctuation':a('./no-heading-punctuation'),'heading-style':a('./heading-style'),'no-multiple-toplevel-headings':a('./no-multiple-toplevel-headings'),'no-duplicate-headings':a('./no-duplicate-headings'),'no-duplicate-definitions':a('./no-duplicate-definitions'),'no-html':a('./no-html'),'no-inline-padding':a('./no-inline-padding'),'maximum-line-length':a('./maximum-line-length'),'link-title-style':a('./link-title-style'),'list-item-bullet-indent':a('./list-item-bullet-indent'),'list-item-content-indent':a('./list-item-content-indent'),'list-item-indent':a('./list-item-indent'),'list-item-spacing':a('./list-item-spacing'),'ordered-list-marker-style':a('./ordered-list-marker-style'),'ordered-list-marker-value':a('./ordered-list-marker-value'),'no-shortcut-reference-image':a('./no-shortcut-reference-image'),'no-shortcut-reference-link':a('./no-shortcut-reference-link'),'rule-style':a('./rule-style'),'no-shell-dollars':a('./no-shell-dollars'),'strong-marker':a('./strong-marker'),'no-table-indentation':a('./no-table-indentation'),'table-pipe-alignment':a('./table-pipe-alignment'),'table-cell-padding':a('./table-cell-padding'),'table-pipes':a('./table-pipes'),'no-tabs':a('./no-tabs'),'unordered-list-marker-style':a('./unordered-list-marker-style')}},{'./blockquote-indentation':4,'./checkbox-character-style':5,'./checkbox-content-indent':6,'./code-block-style':7,'./definition-case':8,'./definition-spacing':9,'./emphasis-marker':10,'./fenced-code-flag':11,'./fenced-code-marker':12,'./file-extension':13,'./final-definition':14,'./final-newline':15,'./first-heading-level':16,'./hard-break-spaces':17,'./heading-increment':18,'./heading-style':19,'./link-title-style':21,'./list-item-bullet-indent':22,'./list-item-content-indent':23,'./list-item-indent':24,'./list-item-spacing':25,'./maximum-heading-length':26,'./maximum-line-length':27,'./no-auto-link-without-protocol':28,'./no-blockquote-without-caret':29,'./no-consecutive-blank-lines':30,'./no-duplicate-definitions':31,'./no-duplicate-headings':32,'./no-emphasis-as-heading':33,'./no-file-name-articles':34,'./no-file-name-consecutive-dashes':35,'./no-file-name-irregular-characters':36,'./no-file-name-mixed-case':37,'./no-file-name-outer-dashes':38,'./no-heading-content-indent':39,'./no-heading-indent':40,'./no-heading-punctuation':41,'./no-html':42,'./no-inline-padding':43,'./no-literal-urls':44,'./no-missing-blank-lines':45,'./no-multiple-toplevel-headings':46,'./no-shell-dollars':47,'./no-shortcut-reference-image':48,'./no-shortcut-reference-link':49,'./no-table-indentation':50,'./no-tabs':51,'./ordered-list-marker-style':52,'./ordered-list-marker-value':53,'./rule-style':54,'./strong-marker':55,'./table-cell-padding':56,'./table-pipe-alignment':57,'./table-pipes':58,'./unordered-list-marker-style':59}],21:[function(d,f,h){'use strict';function g(g,f,d,j){function h(h){var a=e(h).offset-1,g,j;if(b.generated(h))return;h.type!=='definition'&&a--;while(a){if(g=i.charAt(a),!/\s/.test(g))break;a--}if(!(g in c))return;d?d!==g&&(j=f.offsetToPosition(a+1),f.warn(d===')'?'Titles should use `()` as a quote':'Titles should use `'+d+'` as a quote',j)):d=g}var i=f.toString();if(d=typeof d!=='string'||d==='consistent'?null:d,(d==='()'||d==='(')&&(d=')'),c[d]!==!0){f.fail('Invalid link title style marker `'+d+"`: use either `'consistent'`, `'\"'`, `'\\''`, or `'()'`");return}a(g,'link',h),a(g,'image',h),a(g,'definition',h),j()}var a=d('unist-util-visit'),b=d('mdast-util-position'),c={'"':!0,"'":!0,')':!0,null:!0},e=b.end;f.exports=g},{'mdast-util-position':63,'unist-util-visit':67}],22:[function(b,f,h){'use strict';function g(g,b,i,h){var f=b.toString();d(g,'list',function(d){var g=d.children;g.forEach(function(j){var i=j.children[0],g=a(j).offset,k=a(i).offset,h;if(c.generated(d))return;h=f.slice(g,k).match(/^\s*/)[0].length,h!==0&&(g=a(i),b.warn('Incorrect indentation before bullet: remove '+h+' '+e('space',h),{line:g.line,column:g.column-h}))})}),h()}var d=b('unist-util-visit'),c=b('mdast-util-position'),e=b('plur'),a=c.start;f.exports=g},{'mdast-util-position':63,plur:66,'unist-util-visit':67}],23:[function(a,f,h){'use strict';function g(g,a,i,h){var f=a.toString();d(g,'listItem',function(d){var g;d.children.forEach(function(l,n){var j=c(l),h=j.column,k,i,m;if(b.generated(l))return;if(n===0){if(Boolean(d.checked)===d.checked){k=j.offset;while(f.charAt(k)!=='[')k--;h-=j.offset-k}g=h;return}h!==g&&(i=g-h,m=i>0?'add':'remove',i=Math.abs(i),a.warn('Don’t use mixed indentation for children, '+m+' '+i+' '+e('space',i),{line:c(l).line,column:h}))})}),h()}var d=a('unist-util-visit'),b=a('mdast-util-position'),e=a('plur'),c=b.start;f.exports=g},{'mdast-util-position':63,plur:66,'unist-util-visit':67}],24:[function(b,g,i){'use strict';function h(i,g,b,j){var h=g.toString();if(b=typeof b!=='string'?'tab-size':b,f[b]!==!0){g.fail('Invalid list-item indent style `'+b+"`: use either `'tab-size'`, `'space'`, or `'mixed'`");return}d(i,'list',function(d){var f=d.children,i=d.ordered,j=d.start||1;if(c.generated(d))return;f.forEach(function(r,s){var m=r.children[0],l=i?String(j+s).length+1:1,n=Math.ceil(l/4)*4,o=a(r).offset,p=a(m).offset,f,k,c,q;f=h.slice(o,p),f=f.replace(/\[[x ]?\]\s*$/i,''),b==='tab-size'?k=n:b==='space'?k=l+1:k=d.loose?n:l+1,f.length!==k&&(c=k-f.length,q=c>0?'add':'remove',c=Math.abs(c),g.warn('Incorrect list-item indent: '+q+' '+c+' '+e('space',c),a(m)))})}),j()}var d=b('unist-util-visit'),c=b('mdast-util-position'),e=b('plur'),a=c.start,f={'tab-size':!0,mixed:!0,space:!0};g.exports=h},{'mdast-util-position':63,plur:66,'unist-util-visit':67}],25:[function(d,f,h){'use strict';function g(d,f,h,g){e(d,'list',function(g){var d=g.children,e=!0,h=b(g).column,i;if(a.generated(g))return;d.forEach(function(h){var a=h.children,d=a[0],f=a[a.length-1],g=c(f).line-b(d).line>0;g&&(e=!1)}),i=e?'tight':'loose',d.forEach(function(g,k){var a=d[k+1],j=c(g).column>h;if(!a)return;j!==e&&f.warn('List item should be '+i+', isn’t',{start:c(g),end:b(a)})})}),g()}var e=d('unist-util-visit'),a=d('mdast-util-position'),b=a.start,c=a.end;f.exports=g},{'mdast-util-position':63,'unist-util-visit':67}],26:[function(a,e,g){'use strict';function f(e,f,a,g){a=isNaN(a)||typeof a!=='number'?60:a,b(e,'heading',function(b){if(d.generated(b))return;c(b).length>a&&f.warn('Use headings shorter than `'+a+'`',b)}),g()}var b=a('unist-util-visit'),c=a('mdast-util-to-string'),d=a('mdast-util-position');e.exports=f},{'mdast-util-position':63,'mdast-util-to-string':64,'unist-util-visit':67}],27:[function(e,f,i){'use strict';function g(a){return a.type==='heading'||a.type==='table'||a.type==='code'||a.type==='definition'}function h(k,l,j,q){function p(a,b){a--;while(++ae||h.columne&&l.warn('Line must be at most '+e+' characters',{line:h+1,column:i+1});q()}var b=e('unist-util-visit'),a=e('mdast-util-position'),c=a.start,d=a.end;f.exports=h},{'mdast-util-position':63,'unist-util-visit':67}],28:[function(d,j,k){'use strict';function i(a){return g.test(f(a))}function h(d,f,h,g){e(d,'link',function(d){var e=c(d.children[0]).column,g=b(d.children[d.children.length-1]).column,h=c(d).column,j=b(d).column;if(a.generated(d))return;h===e-1&&j===g+1&&!i(d)&&f.warn('All automatic links must start with a protocol',d)}),g()}var e=d('unist-util-visit'),f=d('mdast-util-to-string'),a=d('mdast-util-position'),c=a.start,b=a.end,g=/^[a-z][a-z+.-]+:\/?/i;j.exports=h},{'mdast-util-position':63,'mdast-util-to-string':64,'unist-util-visit':67}],29:[function(b,d,f){'use strict';function e(f,b,h,g){var d=b.toString(),e=d.length;c(f,'blockquote',function(c){var g=a.start(c).line,f=c.position&&c.position.indent;if(a.generated(c)||!f||!f.length)return;f.forEach(function(h,i){var a,c=g+i+1,f=b.positionToOffset({line:c,column:h})-1;while(++f')return;if(a!==' '&&a!==' ')break}b.warn('Missing caret in blockquote',{line:c,column:h})})}),g()}var c=b('unist-util-visit'),a=b('mdast-util-position');d.exports=e},{'mdast-util-position':63,'unist-util-visit':67}],30:[function(b,f,h){'use strict';function g(f,g,i,h){function b(e,b,f){var a=b.line-e.line,c=a>0?'before':'after';a=Math.abs(a)-f,a>0&&g.warn('Remove '+a+' '+d('line',a)+' '+c+' node',b)}c(f,function(d){var c=d.children;if(a.generated(d))return;c&&c[0]&&(b(a.start(d),a.start(c[0]),0),c.forEach(function(f,h){var d=c[h-1],g=e;if(!d||a.generated(d)||a.generated(f))return;(d.type==='list'&&f.type==='list'||f.type==='code'&&d.type==='list'&&!f.lang)&&g++,b(a.end(d),a.start(f),g)}),b(a.end(d),a.end(c[c.length-1]),1))}),h()}var c=b('unist-util-visit'),a=b('mdast-util-position'),d=b('plur'),e=2;f.exports=g},{'mdast-util-position':63,plur:66,'unist-util-visit':67}],31:[function(c,d,f){'use strict';function e(d,f,h,g){function e(b){var d=c[b.identifier],e;if(a.generated(b))return;d&&d.type&&(e=a.start(d),f.warn('Do not use definitions with the same identifier ('+e.line+':'+e.column+')',b)),c[b.identifier]=b}var c={};b(d,'definition',e),b(d,'footnoteDefinition',e),g()}var a=c('mdast-util-position'),b=c('unist-util-visit');d.exports=e},{'mdast-util-position':63,'unist-util-visit':67}],32:[function(a,e,g){'use strict';function f(e,f,h,g){var a={};c(e,'heading',function(c){var g=d(c).toUpperCase(),e=a[g],h;if(b.generated(c))return;e&&e.type==='heading'&&(h=b.start(e),f.warn('Do not use headings with similar content ('+h.line+':'+h.column+')',c)),a[g]=c}),g()}var b=a('mdast-util-position'),c=a('unist-util-visit'),d=a('mdast-util-to-string');e.exports=f},{'mdast-util-position':63,'mdast-util-to-string':64,'unist-util-visit':67}],33:[function(a,e,g){'use strict';function f(a,e,g,f){b(a,'paragraph',function(b,j,k){var f=b.children,a=f[0],g=k.children[j-1],h=k.children[j+1],i;if(d.generated(b))return;(!g||g.type!=='heading')&&h&&h.type==='paragraph'&&f.length===1&&(a.type==='emphasis'||a.type==='strong')&&(i=c(a),i.charAt(i.length-1)===':'&&e.warn('Don’t use emphasis to introduce a section, use a heading',b))}),f()}var b=a('unist-util-visit'),c=a('mdast-util-to-string'),d=a('mdast-util-position');e.exports=f},{'mdast-util-position':63,'mdast-util-to-string':64,'unist-util-visit':67}],34:[function(c,a,d){'use strict';function b(d,a,e,c){var b=a.filename&&a.filename.match(/^(the|an?)\b/i);b&&a.warn('Do not start file names with `'+b[0]+'`'),c()}a.exports=b},{}],35:[function(c,a,d){'use strict';function b(c,a,d,b){a.filename&&/-{2,}/.test(a.filename)&&a.warn('Do not use consecutive dashes in a file name'),b()}a.exports=b},{}],36:[function(c,a,d){'use strict';function b(d,a,e,c){var b=a.filename&&a.filename.match(/[^.a-zA-Z0-9-]/);b&&a.warn('Do not use `'+b[0]+'` in a file name'),c()}a.exports=b},{}],37:[function(c,a,d){'use strict';function b(d,b,e,c){var a=b.filename;a&&!(a===a.toLowerCase()||a===a.toUpperCase())&&b.warn('Do not mix casing in file names'),c()}a.exports=b},{}],38:[function(c,a,d){'use strict';function b(c,a,d,b){a.filename&&/^-|-$/.test(a.filename)&&a.warn('Do not use initial or final dashes in a file name'),b()}a.exports=b},{}],39:[function(c,i,j){'use strict';function h(i,c,k,j){var h=c.toString();f(i,'heading',function(i){var n=i.depth,k=i.children,l=g(i,'atx'),m,o,f,p,j;if(b.generated(i))return;if(l==='atx'||l==='atx-closed'){m=a(i),j=m.offset;while(h.charAt(j)!=='#')j++;j=n+(j-m.offset),f=a(k[0]).column-m.column-1-j,f&&(p=f>0?'Remove':'Add',f=Math.abs(f),c.warn(p+' '+f+' '+e('space',f)+' before this heading’s content',a(k[0])))}l==='atx-closed'&&(o=d(k[k.length-1]),f=d(i).column-o.column-1-n,f&&c.warn('Remove '+f+' '+e('space',f)+' after this heading’s content',o))}),j()}var f=c('unist-util-visit'),g=c('mdast-util-heading-style'),e=c('plur'),b=c('mdast-util-position'),a=b.start,d=b.end;i.exports=h},{'mdast-util-heading-style':62,'mdast-util-position':63,plur:66,'unist-util-visit':67}],40:[function(a,f,h){'use strict';function g(h,f,j,i){var a=f.toString(),g=a.length;c(h,'heading',function(l){var h=e(l),j=h.offset,i=j-1,k,c;if(b.generated(l))return;while(++i1&&b.warn('Do not indent table rows',c)})}),e()}var c=b('unist-util-visit'),a=b('mdast-util-position');d.exports=e},{'mdast-util-position':63,'unist-util-visit':67}],51:[function(c,a,d){'use strict';function b(f,b,g,e){var c=b.toString(),a=-1,d=c.length;while(++ac)return{line:b+1,column:c-(a[b-1]||0)+1};return{}}return b}function h(i,c){var e=String(c).split('\n'),h;if(!c||typeof c.contents!=='string')throw new Error('Missing `file` for mdast-range');e=d(e),h=f(e),c.offsetToPosition=g(e),c.positionToOffset=h,b(i,function(c){var b=c.position;b&&b.start&&a(b.start,h),b&&b.end&&a(b.end,h)})}function i(){return h}var b=e('unist-util-visit');c.exports=i},{'unist-util-visit':67}],62:[function(d,b,e){'use strict';function a(b,a){return b<3?'atx':a==='atx'||a==='setext'?a:null}function c(b,g){var c=b.children[b.children.length-1],d=b.depth,e=b&&b.position&&b.position.end,f=c&&c.position&&c.position.end;return e?c?f.line+1===e.line?'setext':f.column+d'+'\\s*'+')')}function f(b){var a={};return b.replace(e,function(g,c,d,e,f){var b=d||e||f||'';return b==='true'||b===''?b=!0:b==='false'?b=!1:isNaN(b)||(b=Number(b)),a[c]=b,''}),a}function a(a,b){function e(e,i){var g=e.value,c,h;return e.type!=='html'?null:(c=g.match(d),!c||c[1].length!==g.length||c[2]!==a.name?null:(h={type:c[3]||'marker',attributes:c[4]||'',parameters:f(c[4]||''),node:e},b&&b(h,i),h))}var c=a.name,d=g(c);return e}function b(e,b){var c=b.onparse,d=a(b,function(a,b){a.type==='marker'&&c(a,b)});return function(){var a=e.apply(this,arguments);return d(a,this),a}}function i(e,b){var c=b.onstringify,d=a(b,function(a,b){a.type==='marker'&&c(a,b)});return function(a){return d(a,this),e.apply(this,arguments)}}function j(i){function l(l,i,m){var a=k(l),d=a&&a.type;e&&m===e&&(d==='start'&&f++,d==='end'&&f--,d==='end'&&f===0?(b=j(g,b,a,{start:i-b.length-1,end:i,parent:e}),b&&c.apply(e.children,[h,i+1].concat(b)),g=null,e=null,h=null,b=[]):b.push(l)),!e&&d==='start'&&(f=1,h=i,g=a,e=m)}var j=i.onrun,k=a(i),b=[],g=null,e=null,f=0,h;return function(a){d(a,l)}}function k(c,a){var d=c.Parser.prototype.blockTokenizers,e=c.Parser.prototype.inlineTokenizers,f=c.Compiler.prototype;return a.onparse&&(d.html=b(d.html,a),e.tag=b(e.tag,a)),a.onstringify&&(f.html=i(f.html,a)),a.onrun?j(a):null}function l(a){if(!(a&&a.name))throw new Error('Missing `name` in `options`');return function(b){return k(b,a)}}var d=h('unist-util-visit'),c=[].splice,e=new RegExp('\\s*([-a-z09_]+)(?:=(?:"((?:\\\\[\\s\\S]|[^"])+)"|\'((?:\\\\[\\s\\S]|[^\'])+)\'|((?:\\\\[\\s\\S]|[^"\'\\s])+)))?\\s*','gi');m.exports=l},{'unist-util-visit':67}],66:[function(b,a,c){'use strict';a.exports=function(a,b,c){return typeof b==='number'&&(c=b,b=(a.replace(/(?:s|x|z|ch|sh)$/i,'$&e').replace(/y$/i,'ie')+'s').replace(/i?e?s$/i,function(b){var c=a.slice(-1)===a.slice(-1).toLowerCase();return c?b.toLowerCase():b.toUpperCase()})),c===1?a:b}},{}],67:[function(e,a,f){'use strict';function b(b,d){var a=-1,c=b.length;while(++ac)if(d(b[a],a)===!1)return!1;return!0}function d(i,a,d,f){var g,e,h;typeof a==='function'&&(f=d,d=a,a=null),g=f?c:b,h=function(a,b){return g(a,function(a,c){return a&&e(a,c,b)})},e=function(b,c,f){var e;return c=c||(f?0:null),(!a||b.type===a)&&(e=d(b,c,f||null)),b.children&&e!==!1?h(b.children,b):e},e(i)}a.exports=d},{}],68:[function(e,b,f){'use strict';function a(b,c,a){return(b[a]||0)-(c[a]||0)}function c(b,c){return a(b,c,'line')||a(b,c,'column')||-1}function d(a){return a.messages.sort(c),a}b.exports=d},{}]},{},[1])(1)}) diff --git a/package.json b/package.json index 30601fc..deec4b3 100644 --- a/package.json +++ b/package.json @@ -1,15 +1,15 @@ { - "name": "mdast-lint", + "name": "remark-lint", "version": "1.1.1", - "description": "Lint markdown with mdast", + "description": "Lint markdown with remark", "license": "MIT", "keywords": [ "markdown", "lint", "validate", - "mdast" + "remark" ], - "repository": "wooorm/mdast-lint", + "repository": "wooorm/remark-lint", "author": "Titus Wormer ", "dependencies": { "decamelize": "^1.0.0", @@ -17,7 +17,7 @@ "mdast-util-heading-style": "^1.0.0", "mdast-util-position": "^1.0.0", "mdast-util-to-string": "^1.0.0", - "mdast-zone": "^2.0.0-alpha.1", + "mdast-zone": "^2.0.0", "plur": "^2.0.0", "unist-util-visit": "^1.0.0", "vfile-sort": "^1.0.0" @@ -34,7 +34,7 @@ "istanbul": "^0.3.0", "jscs": "^2.0.0", "jscs-jsdoc": "^1.0.0", - "mdast": "^3.0.0-alpha.3", + "mdast": "^3.0.0-alpha.5", "mdast-comment-config": "^2.0.0-alpha.1", "mdast-github": "^2.0.0-alpha.1", "mdast-toc": "^1.0.0", @@ -53,8 +53,8 @@ "make": "npm run lint && npm run test-coverage", "build-rules": "node script/build-rule-documentation.js", "build-md": "mdast . --quiet", - "build-bundle": "browserify index.js --bare -s mdastLint > mdast-lint.js", - "postbuild-bundle": "esmangle mdast-lint.js > mdast-lint.min.js", + "build-bundle": "browserify index.js --bare -s remarkLint > remark-lint.js", + "postbuild-bundle": "esmangle remark-lint.js > remark-lint.min.js", "build": "npm run build-rules && npm run build-md && npm run build-bundle" } } diff --git a/readme.md b/readme.md index 2db13fb..1dcbf07 100644 --- a/readme.md +++ b/readme.md @@ -1,16 +1,16 @@ -# ![mdast-lint](https://cdn.rawgit.com/wooorm/mdast-lint/master/logo.svg) +# ![remark-lint](https://cdn.rawgit.com/wooorm/remark-lint/master/logo.svg) -[![Build Status](https://img.shields.io/travis/wooorm/mdast-lint.svg)](https://travis-ci.org/wooorm/mdast-lint) [![Coverage Status](https://img.shields.io/codecov/c/github/wooorm/mdast-lint.svg)](https://codecov.io/github/wooorm/mdast-lint) +[![Build Status](https://img.shields.io/travis/wooorm/remark-lint.svg)](https://travis-ci.org/wooorm/remark-lint) [![Coverage Status](https://img.shields.io/codecov/c/github/wooorm/remark-lint.svg)](https://codecov.io/github/wooorm/remark-lint) -**mdast-lint** is a markdown code style linter. Another linter? Yes. +**remark-lint** is a markdown code style linter. Another linter? Yes. Ensuring the markdown you (and contributors) write is of great quality will provide better rendering in all the different markdown parsers, and makes sure less refactoring is needed afterwards. What is quality? That’s up to you, -but the defaults are sensible :ok_hand:. +but the defaults are sensible :ok\_hand:. -**mdast-lint** has lots of tests. Supports Node, io.js, and the browser. -100% coverage. 50+ rules. It’s built on [**mdast**](https://github.com/wooorm/mdast), -a powerful markdown processor powered by [plugins](https://github.com/wooorm/mdast/blob/master/doc/plugins.md) +**remark-lint** has lots of tests. Supports Node, io.js, and the browser. +100% coverage. 50+ rules. It’s built on [**remark**](https://github.com/wooorm/remark), +a powerful markdown processor powered by [plugins](https://github.com/wooorm/remark/blob/master/doc/plugins.md) (such as this one). ## Table of Contents @@ -19,8 +19,8 @@ a powerful markdown processor powered by [plugins](https://github.com/wooorm/mda * [Command line](#command-line) * [Programmatic](#programmatic) * [Rules](#rules) -* [Configuring mdast-lint](#configuring-mdast-lint) -* [Using mdast to fix your markdown](#using-mdast-to-fix-your-markdown) +* [Configuring remark-lint](#configuring-remark-lint) +* [Using remark to fix your markdown](#using-remark-to-fix-your-markdown) * [Editor Integrations](#editor-integrations) * [Related](#related) * [License](#license) @@ -30,20 +30,20 @@ a powerful markdown processor powered by [plugins](https://github.com/wooorm/mda [npm](https://docs.npmjs.com/cli/install): ```bash -npm install mdast-lint +npm install remark-lint ``` -**mdast-lint** is also available for bower, duo, and for AMD, +**remark-lint** is also available for bower, duo, and for AMD, CommonJS, and globals. ## Command line -![Example of how mdast-lint looks on screen](https://cdn.rawgit.com/wooorm/mdast-lint/master/screen-shot.png) +![Example of how remark-lint looks on screen](https://cdn.rawgit.com/wooorm/remark-lint/master/screen-shot.png) -Use mdast-lint together with mdast: +Use remark-lint together with remark: ```bash -npm install --global mdast mdast-lint +npm install --global remark remark-lint ``` Let’s say `example.md` looks as follows: @@ -54,10 +54,10 @@ Let’s say `example.md` looks as follows: - World ``` -Then, to run **mdast-lint** on `example.md`: +Then, to run **remark-lint** on `example.md`: ```bash -mdast -u mdast-lint example.md +remark -u remark-lint example.md # # Yields: # @@ -79,7 +79,7 @@ turn them off). ## Programmatic -[doc/api.md](doc/api.md) describes how to use **mdast-lint**’s +[doc/api.md](doc/api.md) describes how to use **remark-lint**’s programatic interface in JavaScript. ## Rules @@ -87,13 +87,13 @@ programatic interface in JavaScript. [doc/rules.md](doc/rules.md) describes all available rules, what they check for, examples of markdown they warn for, and how to fix their warnings. -## Configuring mdast-lint +## Configuring remark-lint -**mdast-lint** is just an **mdast** plug-in. Meaning, you can opt to +**remark-lint** is just a **remark** plug-in. Meaning, you can opt to configure using configuration files. Read more about these files -(`.mdastrc` or `package.json`) in [**mdast**’s docs](https://github.com/wooorm/mdast/blob/master/doc/mdastrc.5.md). +(`.remarkrc` or `package.json`) in [**remark**’s docs](https://github.com/wooorm/remark/blob/master/doc/remarkrc.5.md). -An example `.mdastrc` file could look as follows: +An example `.remarkrc` file could look as follows: ```json { @@ -112,8 +112,8 @@ An example `.mdastrc` file could look as follows: ``` Where the object at `plugins.lint` is a map of `ruleId`s and their values. -The object at `settings` determines how **mdast** parses (and compiles) -markdown code. Read more about the latter on [**mdast**’s readme](https://github.com/wooorm/mdast#mdastprocessvalue-options-done). +The object at `settings` determines how **remark** parses (and compiles) +markdown code. Read more about the latter on [**remark**’s readme](https://github.com/wooorm/remark#remarkprocessvalue-options-done). In addition, you can also provide configuration comments to turn a rule on or off inside a file (note that you cannot change what a setting, such as @@ -144,25 +144,25 @@ but the third is re-enabled): ### Hello ``` -## Using mdast to fix your markdown +## Using remark to fix your markdown -One of **mdast**’s cool parts is that it compiles to very clean, and highly +One of **remark**’s cool parts is that it compiles to very clean, and highly cross-vendor supported markdown. It’ll ensure list items use a single bullet, emphasis and strong use a standard marker, and that your table fences are aligned. -**mdast** should be able to fix most of your styling issues automatically, +**remark** should be able to fix most of your styling issues automatically, and I strongly suggest checking out how it can make your life easier :+1: ## Editor Integrations -Currently, **mdast-lint** is integrated with Atom through [**leipert/linter-markdown**](https://atom.io/packages/linter-markdown). +Currently, **remark-lint** is integrated with Atom through [**leipert/linter-markdown**](https://atom.io/packages/linter-markdown). I’m very interested in more integrations. Let me know if I can help. ## Related -* [`mdast-validate-links`](https://github.com/wooorm/mdast-validate-links) +* [`remark-validate-links`](https://github.com/wooorm/remark-validate-links) — Validate if links point to existing headings and files in markdown. ## License diff --git a/mdast-lint.js b/remark-lint.js similarity index 94% rename from mdast-lint.js rename to remark-lint.js index 039ab46..08916ca 100644 --- a/mdast-lint.js +++ b/remark-lint.js @@ -1,4 +1,4 @@ -(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.mdastLint = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;oa)return;g&&(d.push({start:e,end:a}),g=!1),e=a}var i=h.children[h.children.length-1],d=[],e=0,g=!1,j=b.namespace('remark-lint').ranges;if(!(b&&b.messages&&b.messages.length))return;c(h,function(b){var c=a.start(b),d=a.end(b);f(c&&c.offset),b.children||f(d&&d.offset)}),e===a.end(i).offset&&(f(),f(b.toString().length-1)),b.messages=b.messages.filter(function(a){var e=j[a.ruleId],g=e&&e.length,f=d.length,i=-1,h,c;a.line||(a.line=1),a.column||(a.column=1),h=b.positionToOffset(a);while(f--)if(d[f].start<=h&&d[f].end>h)return!1;while(--g>i)if(c=e[g],c.position.line0?'Add':'Remove',d=Math.abs(d),d!==0&&g.warn(i+' '+d+' '+f('space',d)+' between blockquote and content',a.start(e.children[0]))):b=c(e)}),h()}var d=b('unist-util-visit'),e=b('mdast-util-to-string'),f=b('plur'),a=b('mdast-util-position');g.exports=h},{'mdast-util-position':64,'mdast-util-to-string':65,plur:67,'unist-util-visit':68}],5:[function(f,i,j){'use strict';function h(j,h,f,k){var i=h.toString();(f==='consistent'||typeof f!=='object')&&(f={}),f.unchecked||(f.unchecked=null),f.checked||(f.checked=null),f.unchecked!==null&&e[f.unchecked]!==!0&&h.fail('Invalid unchecked checkbox marker `'+f.unchecked+"`: use either `'\\t'`, or `' '`"),f.checked!==null&&g[f.checked]!==!0&&h.fail('Invalid checked checkbox marker `'+f.checked+"`: use either `'x'`, or `'X'`"),c(j,'listItem',function(c){var e,k,n,l,g,j,m;if(c.checked!==Boolean(c.checked)||a.generated(c))return;e=c.checked?'checked':'unchecked',k=b(c).offset,n=(c.children.length?b(c.children[0]):d(c)).offset,g=i.slice(k,n).trimRight().slice(0,-1),m=g.charAt(g.length-1),j=f[e],j===null?f[e]=m:m!==j&&(l=k+g.length,h.warn(e.charAt(0).toUpperCase()+e.slice(1)+' checkboxes should use `'+j+'` as a marker',{start:h.offsetToPosition(l-1),end:h.offsetToPosition(l)}))}),k()}var c=f('unist-util-visit'),a=f('mdast-util-position'),b=a.start,d=a.end,g={x:!0,X:!0},e={' ':!0,' ':!0};i.exports=h},{'mdast-util-position':64,'unist-util-visit':68}],6:[function(c,f,h){'use strict';function g(g,c,i,h){var f=c.toString();d(g,'listItem',function(d){var i,g,h;if(d.checked!==Boolean(d.checked)||a.generated(d))return;i=b(d).offset,g=(d.children.length?b(d.children[0]):e(d)).offset;while(/[^\S\n]/.test(f.charAt(g)))g++;if(h=f.slice(i,g),h=h.slice(h.indexOf(']')+1),h.length===1)return;c.warn('Checkboxes should be followed by a single character',{start:c.offsetToPosition(g-h.length+1),end:c.offsetToPosition(g)})}),h()}var d=c('unist-util-visit'),a=c('mdast-util-position'),b=a.start,e=a.end;f.exports=g},{'mdast-util-position':64,'unist-util-visit':68}],7:[function(b,g,i){'use strict';function h(i,g,b,j){function k(b){var c=d(b).offset,f=e(b).offset;return a.generated(b)?null:b.lang||/^\s*([~`])\1{2,}/.test(h.slice(c,f))?'fenced':'indented'}var h=g.toString();if(b=typeof b!=='string'||b==='consistent'?null:b,f[b]!==!0){g.fail('Invalid code block style `'+b+"`: use either `'consistent'`, `'fenced'`, or `'indented'`");return}c(i,'code',function(c){var a=k(c);if(!a)return;b?b!==a&&g.warn('Code blocks should be '+b,c):b=a}),j()}var c=b('unist-util-visit'),a=b('mdast-util-position'),d=a.start,e=a.end,f={null:!0,fenced:!0,indented:!0};g.exports=h},{'mdast-util-position':64,'unist-util-visit':68}],8:[function(c,e,g){'use strict';function f(c,e,i,h){function f(b){var f=a.start(b).offset,h=a.end(b).offset,c;if(a.generated(b))return;c=g.slice(f,h).match(d)[1],c!==c.toLowerCase()&&e.warn('Do not use upper-case characters in definition labels',b)}var g=e.toString();b(c,'definition',f),b(c,'footnoteDefinition',f),h()}var b=c('unist-util-visit'),a=c('mdast-util-position'),d=/^\s*\[((?:\\[\s\S]|[^\[\]])+)\]/;e.exports=f},{'mdast-util-position':64,'unist-util-visit':68}],9:[function(c,e,g){'use strict';function f(c,e,i,h){function f(b){var c=a.start(b).offset,f=a.end(b).offset,h;if(a.generated(b))return;h=g.slice(c,f).match(d)[1],/[ \t\n]{2,}/.test(h)&&e.warn('Do not use consecutive white-space in definition labels',b)}var g=e.toString();b(c,'definition',f),b(c,'footnoteDefinition',f),h()}var b=c('unist-util-visit'),a=c('mdast-util-position'),d=/^\s*\[((?:\\[\s\S]|[^\[\]])+)\]/;e.exports=f},{'mdast-util-position':64,'unist-util-visit':68}],10:[function(b,e,g){'use strict';function f(f,e,b,g){if(b=typeof b!=='string'||b==='consistent'?null:b,d[b]!==!0){e.fail('Invalid emphasis marker `'+b+"`: use either `'consistent'`, `'*'`, or `'_'`");return}c(f,'emphasis',function(c){var d=e.toString().charAt(a.start(c).offset);if(a.generated(c))return;b?d!==b&&e.warn('Emphasis should use `'+b+'` as a marker',c):b=d}),g()}var c=b('unist-util-visit'),a=b('mdast-util-position'),d={'*':!0,_:!0,null:!0};e.exports=f},{'mdast-util-position':64,'unist-util-visit':68}],11:[function(b,f,h){'use strict';function g(j,g,b,k){var i=g.toString(),h=!1,f=[];typeof b==='object'&&!('length'in b)&&(h=Boolean(b.allowEmpty),b=b.flags),typeof b==='object'&&'length'in b&&(f=String(b).split(',')),c(j,'code',function(b){var c=i.slice(d(b).offset,e(b).offset);if(a.generated(b))return;b.lang?f.length&&f.indexOf(b.lang)===-1&&g.warn('Invalid code-language flag',b):/^\ {0,3}([~`])\1{2,}/.test(c)&&!h&&g.warn('Missing code-language flag',b)}),k()}var c=b('unist-util-visit'),a=b('mdast-util-position'),d=a.start,e=a.end;f.exports=g},{'mdast-util-position':64,'unist-util-visit':68}],12:[function(c,e,g){'use strict';function f(g,e,c,h){var f=e.toString();if(c=typeof c!=='string'||c==='consistent'?null:c,b[c]!==!0){e.fail('Invalid fenced code marker `'+c+"`: use either `'consistent'`, `` '`' ``, or `'~'`");return}d(g,'code',function(g){var d=f.substr(a.start(g).offset,4);if(a.generated(g))return;if(d=d.trimLeft().charAt(0),b[d]!==!0)return;c?d!==c&&e.warn('Fenced code should use '+c+' as a marker',g):c=d}),h()}var d=c('unist-util-visit'),a=c('mdast-util-position'),b={'`':!0,'~':!0,null:!0};e.exports=f},{'mdast-util-position':64,'unist-util-visit':68}],13:[function(c,a,d){'use strict';function b(e,c,a,d){var b=c.extension;a=typeof a==='string'?a:'md',b!==''&&b!==a&&c.warn('Invalid extension: use `'+a+'`'),d()}a.exports=b},{}],14:[function(b,e,g){'use strict';function f(e,f,h,g){var b=null;c(e,function(c){var e=d(c).line;if(c.type==='root'||a.generated(c))return;c.type==='definition'?b!==null&&b>e&&f.warn('Move definitions to the end of the file (after the node at line `'+b+'`)',c):b===null&&(b=e)},!0),g()}var c=b('unist-util-visit'),a=b('mdast-util-position'),d=a.start;e.exports=f},{'mdast-util-position':64,'unist-util-visit':68}],15:[function(c,a,d){'use strict';function b(e,c,f,d){var a=c.toString(),b=a.length-1;b>0&&a.charAt(b)!=='\n'&&c.warn('Missing newline character at end of file'),d()}a.exports=b},{}],16:[function(a,d,f){'use strict';function e(a,d,f,e){b(a,'heading',function(a){return c.generated(a)?null:(a.depth!==1&&d.warn('First heading level should be `1`',a),!1)}),e()}var b=a('unist-util-visit'),c=a('mdast-util-position');d.exports=e},{'mdast-util-position':64,'unist-util-visit':68}],17:[function(b,d,f){'use strict';function e(e,b,g,f){var d=b.toString();c(e,'break',function(c){var e=a.start(c).offset,f=a.end(c).offset;if(a.generated(c))return;d.slice(e,f).length>3&&b.warn('Use two spaces for hard line breaks',c)}),f()}var c=b('unist-util-visit'),a=b('mdast-util-position');d.exports=e},{'mdast-util-position':64,'unist-util-visit':68}],18:[function(a,d,f){'use strict';function e(d,e,g,f){var a=null;b(d,'heading',function(b){var d=b.depth;if(c.generated(b))return;a&&d>a+1&&e.warn('Heading levels should increment by one level at a time',b),a=d}),f()}var b=a('unist-util-visit'),c=a('mdast-util-position');d.exports=e},{'mdast-util-position':64,'unist-util-visit':68}],19:[function(a,f,h){'use strict';function g(f,g,a,h){a=e.indexOf(a)===-1?null:a,c(f,'heading',function(c){if(d.generated(c))return;a?b(c,a)!==a&&g.warn('Headings should use '+a,c):a=b(c,a)}),h()}var c=a('unist-util-visit'),b=a('mdast-util-heading-style'),d=a('mdast-util-position'),e=['atx','atx-closed','setext'];f.exports=g},{'mdast-util-heading-style':63,'mdast-util-position':64,'unist-util-visit':68}],20:[function(a,b,c){'use strict';b.exports={'no-auto-link-without-protocol':a('./no-auto-link-without-protocol'),'no-literal-urls':a('./no-literal-urls'),'no-consecutive-blank-lines':a('./no-consecutive-blank-lines'),'no-missing-blank-lines':a('./no-missing-blank-lines'),'blockquote-indentation':a('./blockquote-indentation'),'no-blockquote-without-caret':a('./no-blockquote-without-caret'),'code-block-style':a('./code-block-style'),'checkbox-content-indent':a('./checkbox-content-indent'),'checkbox-character-style':a('./checkbox-character-style'),'definition-case':a('./definition-case'),'definition-spacing':a('./definition-spacing'),'no-emphasis-as-heading':a('./no-emphasis-as-heading'),'emphasis-marker':a('./emphasis-marker'),'fenced-code-flag':a('./fenced-code-flag'),'fenced-code-marker':a('./fenced-code-marker'),'file-extension':a('./file-extension'),'final-newline':a('./final-newline'),'no-file-name-articles':a('./no-file-name-articles'),'no-file-name-consecutive-dashes':a('./no-file-name-consecutive-dashes'),'no-file-name-irregular-characters':a('./no-file-name-irregular-characters'),'no-file-name-mixed-case':a('./no-file-name-mixed-case'),'no-file-name-outer-dashes':a('./no-file-name-outer-dashes'),'final-definition':a('./final-definition'),'hard-break-spaces':a('./hard-break-spaces'),'heading-increment':a('./heading-increment'),'no-heading-content-indent':a('./no-heading-content-indent'),'no-heading-indent':a('./no-heading-indent'),'first-heading-level':a('./first-heading-level'),'maximum-heading-length':a('./maximum-heading-length'),'no-heading-punctuation':a('./no-heading-punctuation'),'heading-style':a('./heading-style'),'no-multiple-toplevel-headings':a('./no-multiple-toplevel-headings'),'no-duplicate-headings':a('./no-duplicate-headings'),'no-duplicate-definitions':a('./no-duplicate-definitions'),'no-html':a('./no-html'),'no-inline-padding':a('./no-inline-padding'),'maximum-line-length':a('./maximum-line-length'),'link-title-style':a('./link-title-style'),'list-item-bullet-indent':a('./list-item-bullet-indent'),'list-item-content-indent':a('./list-item-content-indent'),'list-item-indent':a('./list-item-indent'),'list-item-spacing':a('./list-item-spacing'),'ordered-list-marker-style':a('./ordered-list-marker-style'),'ordered-list-marker-value':a('./ordered-list-marker-value'),'no-shortcut-reference-image':a('./no-shortcut-reference-image'),'no-shortcut-reference-link':a('./no-shortcut-reference-link'),'rule-style':a('./rule-style'),'no-shell-dollars':a('./no-shell-dollars'),'strong-marker':a('./strong-marker'),'no-table-indentation':a('./no-table-indentation'),'table-pipe-alignment':a('./table-pipe-alignment'),'table-cell-padding':a('./table-cell-padding'),'table-pipes':a('./table-pipes'),'no-tabs':a('./no-tabs'),'unordered-list-marker-style':a('./unordered-list-marker-style')}},{'./blockquote-indentation':4,'./checkbox-character-style':5,'./checkbox-content-indent':6,'./code-block-style':7,'./definition-case':8,'./definition-spacing':9,'./emphasis-marker':10,'./fenced-code-flag':11,'./fenced-code-marker':12,'./file-extension':13,'./final-definition':14,'./final-newline':15,'./first-heading-level':16,'./hard-break-spaces':17,'./heading-increment':18,'./heading-style':19,'./link-title-style':21,'./list-item-bullet-indent':22,'./list-item-content-indent':23,'./list-item-indent':24,'./list-item-spacing':25,'./maximum-heading-length':26,'./maximum-line-length':27,'./no-auto-link-without-protocol':28,'./no-blockquote-without-caret':29,'./no-consecutive-blank-lines':30,'./no-duplicate-definitions':31,'./no-duplicate-headings':32,'./no-emphasis-as-heading':33,'./no-file-name-articles':34,'./no-file-name-consecutive-dashes':35,'./no-file-name-irregular-characters':36,'./no-file-name-mixed-case':37,'./no-file-name-outer-dashes':38,'./no-heading-content-indent':39,'./no-heading-indent':40,'./no-heading-punctuation':41,'./no-html':42,'./no-inline-padding':43,'./no-literal-urls':44,'./no-missing-blank-lines':45,'./no-multiple-toplevel-headings':46,'./no-shell-dollars':47,'./no-shortcut-reference-image':48,'./no-shortcut-reference-link':49,'./no-table-indentation':50,'./no-tabs':51,'./ordered-list-marker-style':52,'./ordered-list-marker-value':53,'./rule-style':54,'./strong-marker':55,'./table-cell-padding':56,'./table-pipe-alignment':57,'./table-pipes':58,'./unordered-list-marker-style':59}],21:[function(d,f,h){'use strict';function g(g,f,d,j){function h(h){var a=e(h).offset-1,g,j;if(b.generated(h))return;h.type!=='definition'&&a--;while(a){if(g=i.charAt(a),!/\s/.test(g))break;a--}if(!(g in c))return;d?d!==g&&(j=f.offsetToPosition(a+1),f.warn(d===')'?'Titles should use `()` as a quote':'Titles should use `'+d+'` as a quote',j)):d=g}var i=f.toString();if(d=typeof d!=='string'||d==='consistent'?null:d,(d==='()'||d==='(')&&(d=')'),c[d]!==!0){f.fail('Invalid link title style marker `'+d+"`: use either `'consistent'`, `'\"'`, `'\\''`, or `'()'`");return}a(g,'link',h),a(g,'image',h),a(g,'definition',h),j()}var a=d('unist-util-visit'),b=d('mdast-util-position'),c={'"':!0,"'":!0,')':!0,null:!0},e=b.end;f.exports=g},{'mdast-util-position':64,'unist-util-visit':68}],22:[function(b,f,h){'use strict';function g(g,b,i,h){var f=b.toString();d(g,'list',function(d){var g=d.children;g.forEach(function(j){var i=j.children[0],g=a(j).offset,k=a(i).offset,h;if(c.generated(d))return;h=f.slice(g,k).match(/^\s*/)[0].length,h!==0&&(g=a(i),b.warn('Incorrect indentation before bullet: remove '+h+' '+e('space',h),{line:g.line,column:g.column-h}))})}),h()}var d=b('unist-util-visit'),c=b('mdast-util-position'),e=b('plur'),a=c.start;f.exports=g},{'mdast-util-position':64,plur:67,'unist-util-visit':68}],23:[function(a,f,h){'use strict';function g(g,a,i,h){var f=a.toString();d(g,'listItem',function(d){var g;d.children.forEach(function(l,n){var j=c(l),h=j.column,k,i,m;if(b.generated(l))return;if(n===0){if(Boolean(d.checked)===d.checked){k=j.offset;while(f.charAt(k)!=='[')k--;h-=j.offset-k}g=h;return}h!==g&&(i=g-h,m=i>0?'add':'remove',i=Math.abs(i),a.warn('Don’t use mixed indentation for children, '+m+' '+i+' '+e('space',i),{line:c(l).line,column:h}))})}),h()}var d=a('unist-util-visit'),b=a('mdast-util-position'),e=a('plur'),c=b.start;f.exports=g},{'mdast-util-position':64,plur:67,'unist-util-visit':68}],24:[function(b,g,i){'use strict';function h(i,g,b,j){var h=g.toString();if(b=typeof b!=='string'?'tab-size':b,f[b]!==!0){g.fail('Invalid list-item indent style `'+b+"`: use either `'tab-size'`, `'space'`, or `'mixed'`");return}d(i,'list',function(d){var f=d.children,i=d.ordered,j=d.start||1;if(c.generated(d))return;f.forEach(function(r,s){var m=r.children[0],l=i?String(j+s).length+1:1,n=Math.ceil(l/4)*4,o=a(r).offset,p=a(m).offset,f,k,c,q;f=h.slice(o,p),f=f.replace(/\[[x ]?\]\s*$/i,''),b==='tab-size'?k=n:b==='space'?k=l+1:k=d.loose?n:l+1,f.length!==k&&(c=k-f.length,q=c>0?'add':'remove',c=Math.abs(c),g.warn('Incorrect list-item indent: '+q+' '+c+' '+e('space',c),a(m)))})}),j()}var d=b('unist-util-visit'),c=b('mdast-util-position'),e=b('plur'),a=c.start,f={'tab-size':!0,mixed:!0,space:!0};g.exports=h},{'mdast-util-position':64,plur:67,'unist-util-visit':68}],25:[function(d,f,h){'use strict';function g(d,f,h,g){e(d,'list',function(g){var d=g.children,e=!0,h=b(g).column,i;if(a.generated(g))return;d.forEach(function(h){var a=h.children,d=a[0],f=a[a.length-1],g=c(f).line-b(d).line>0;g&&(e=!1)}),i=e?'tight':'loose',d.forEach(function(g,k){var a=d[k+1],j=c(g).column>h;if(!a)return;j!==e&&f.warn('List item should be '+i+', isn’t',{start:c(g),end:b(a)})})}),g()}var e=d('unist-util-visit'),a=d('mdast-util-position'),b=a.start,c=a.end;f.exports=g},{'mdast-util-position':64,'unist-util-visit':68}],26:[function(a,e,g){'use strict';function f(e,f,a,g){a=isNaN(a)||typeof a!=='number'?60:a,b(e,'heading',function(b){if(d.generated(b))return;c(b).length>a&&f.warn('Use headings shorter than `'+a+'`',b)}),g()}var b=a('unist-util-visit'),c=a('mdast-util-to-string'),d=a('mdast-util-position');e.exports=f},{'mdast-util-position':64,'mdast-util-to-string':65,'unist-util-visit':68}],27:[function(e,f,i){'use strict';function g(a){return a.type==='heading'||a.type==='table'||a.type==='code'||a.type==='definition'}function h(k,l,j,q){function p(a,b){a--;while(++ae||h.columne&&l.warn('Line must be at most '+e+' characters',{line:h+1,column:i+1});q()}var b=e('unist-util-visit'),a=e('mdast-util-position'),c=a.start,d=a.end;f.exports=h},{'mdast-util-position':64,'unist-util-visit':68}],28:[function(d,j,k){'use strict';function i(a){return g.test(f(a))}function h(d,f,h,g){e(d,'link',function(d){var e=c(d.children[0]).column,g=b(d.children[d.children.length-1]).column,h=c(d).column,j=b(d).column;if(a.generated(d))return;h===e-1&&j===g+1&&!i(d)&&f.warn('All automatic links must start with a protocol',d)}),g()}var e=d('unist-util-visit'),f=d('mdast-util-to-string'),a=d('mdast-util-position'),c=a.start,b=a.end,g=/^[a-z][a-z+.-]+:\/?/i;j.exports=h},{'mdast-util-position':64,'mdast-util-to-string':65,'unist-util-visit':68}],29:[function(b,d,f){'use strict';function e(f,b,h,g){var d=b.toString(),e=d.length;c(f,'blockquote',function(c){var g=a.start(c).line,f=c.position&&c.position.indent;if(a.generated(c)||!f||!f.length)return;f.forEach(function(h,i){var a,c=g+i+1,f=b.positionToOffset({line:c,column:h})-1;while(++f')return;if(a!==' '&&a!==' ')break}b.warn('Missing caret in blockquote',{line:c,column:h})})}),g()}var c=b('unist-util-visit'),a=b('mdast-util-position');d.exports=e},{'mdast-util-position':64,'unist-util-visit':68}],30:[function(b,f,h){'use strict';function g(f,g,i,h){function b(e,b,f){var a=b.line-e.line,c=a>0?'before':'after';a=Math.abs(a)-f,a>0&&g.warn('Remove '+a+' '+d('line',a)+' '+c+' node',b)}c(f,function(d){var c=d.children;if(a.generated(d))return;c&&c[0]&&(b(a.start(d),a.start(c[0]),0),c.forEach(function(f,h){var d=c[h-1],g=e;if(!d||a.generated(d)||a.generated(f))return;(d.type==='list'&&f.type==='list'||f.type==='code'&&d.type==='list'&&!f.lang)&&g++,b(a.end(d),a.start(f),g)}),b(a.end(d),a.end(c[c.length-1]),1))}),h()}var c=b('unist-util-visit'),a=b('mdast-util-position'),d=b('plur'),e=2;f.exports=g},{'mdast-util-position':64,plur:67,'unist-util-visit':68}],31:[function(c,d,f){'use strict';function e(d,f,h,g){function e(b){var d=c[b.identifier],e;if(a.generated(b))return;d&&d.type&&(e=a.start(d),f.warn('Do not use definitions with the same identifier ('+e.line+':'+e.column+')',b)),c[b.identifier]=b}var c={};b(d,'definition',e),b(d,'footnoteDefinition',e),g()}var a=c('mdast-util-position'),b=c('unist-util-visit');d.exports=e},{'mdast-util-position':64,'unist-util-visit':68}],32:[function(a,e,g){'use strict';function f(e,f,h,g){var a={};c(e,'heading',function(c){var g=d(c).toUpperCase(),e=a[g],h;if(b.generated(c))return;e&&e.type==='heading'&&(h=b.start(e),f.warn('Do not use headings with similar content ('+h.line+':'+h.column+')',c)),a[g]=c}),g()}var b=a('mdast-util-position'),c=a('unist-util-visit'),d=a('mdast-util-to-string');e.exports=f},{'mdast-util-position':64,'mdast-util-to-string':65,'unist-util-visit':68}],33:[function(a,e,g){'use strict';function f(a,e,g,f){b(a,'paragraph',function(b,j,k){var f=b.children,a=f[0],g=k.children[j-1],h=k.children[j+1],i;if(d.generated(b))return;(!g||g.type!=='heading')&&h&&h.type==='paragraph'&&f.length===1&&(a.type==='emphasis'||a.type==='strong')&&(i=c(a),i.charAt(i.length-1)===':'&&e.warn('Don’t use emphasis to introduce a section, use a heading',b))}),f()}var b=a('unist-util-visit'),c=a('mdast-util-to-string'),d=a('mdast-util-position');e.exports=f},{'mdast-util-position':64,'mdast-util-to-string':65,'unist-util-visit':68}],34:[function(c,a,d){'use strict';function b(d,a,e,c){var b=a.filename&&a.filename.match(/^(the|an?)\b/i);b&&a.warn('Do not start file names with `'+b[0]+'`'),c()}a.exports=b},{}],35:[function(c,a,d){'use strict';function b(c,a,d,b){a.filename&&/-{2,}/.test(a.filename)&&a.warn('Do not use consecutive dashes in a file name'),b()}a.exports=b},{}],36:[function(c,a,d){'use strict';function b(d,a,e,c){var b=a.filename&&a.filename.match(/[^.a-zA-Z0-9-]/);b&&a.warn('Do not use `'+b[0]+'` in a file name'),c()}a.exports=b},{}],37:[function(c,a,d){'use strict';function b(d,b,e,c){var a=b.filename;a&&!(a===a.toLowerCase()||a===a.toUpperCase())&&b.warn('Do not mix casing in file names'),c()}a.exports=b},{}],38:[function(c,a,d){'use strict';function b(c,a,d,b){a.filename&&/^-|-$/.test(a.filename)&&a.warn('Do not use initial or final dashes in a file name'),b()}a.exports=b},{}],39:[function(c,i,j){'use strict';function h(i,c,k,j){var h=c.toString();f(i,'heading',function(i){var n=i.depth,k=i.children,l=g(i,'atx'),m,o,f,p,j;if(b.generated(i))return;if(l==='atx'||l==='atx-closed'){m=a(i),j=m.offset;while(h.charAt(j)!=='#')j++;j=n+(j-m.offset),f=a(k[0]).column-m.column-1-j,f&&(p=f>0?'Remove':'Add',f=Math.abs(f),c.warn(p+' '+f+' '+e('space',f)+' before this heading’s content',a(k[0])))}l==='atx-closed'&&(o=d(k[k.length-1]),f=d(i).column-o.column-1-n,f&&c.warn('Remove '+f+' '+e('space',f)+' after this heading’s content',o))}),j()}var f=c('unist-util-visit'),g=c('mdast-util-heading-style'),e=c('plur'),b=c('mdast-util-position'),a=b.start,d=b.end;i.exports=h},{'mdast-util-heading-style':63,'mdast-util-position':64,plur:67,'unist-util-visit':68}],40:[function(a,f,h){'use strict';function g(h,f,j,i){var a=f.toString(),g=a.length;c(h,'heading',function(l){var h=e(l),j=h.offset,i=j-1,k,c;if(b.generated(l))return;while(++i1&&b.warn('Do not indent table rows',c)})}),e()}var c=b('unist-util-visit'),a=b('mdast-util-position');d.exports=e},{'mdast-util-position':64,'unist-util-visit':68}],51:[function(c,a,d){'use strict';function b(f,b,g,e){var c=b.toString(),a=-1,d=c.length;while(++ac)return{line:b+1,column:c-(a[b-1]||0)+1};return{}}return b}function h(i,c){var e=String(c).split('\n'),h;if(!c||typeof c.contents!=='string')throw new Error('Missing `file` for mdast-range');e=d(e),h=f(e),c.offsetToPosition=g(e),c.positionToOffset=h,b(i,function(c){var b=c.position;b&&b.start&&a(b.start,h),b&&b.end&&a(b.end,h)})}function i(){return h}var b=e('unist-util-visit');c.exports=i},{'unist-util-visit':68}],63:[function(d,b,e){'use strict';function a(b,a){return b<3?'atx':a==='atx'||a==='setext'?a:null}function c(b,g){var c=b.children[b.children.length-1],d=b.depth,e=b&&b.position&&b.position.end,f=c&&c.position&&c.position.end;return e?c?f.line+1===e.line?'setext':f.column+d'+'\\s*'+')')}function f(b){var a={};return b.replace(e,function(g,c,d,e,f){var b=d||e||f||'';return b==='true'||b===''?b=!0:b==='false'?b=!1:isNaN(b)||(b=Number(b)),a[c]=b,''}),a}function a(a,b){function e(e,i){var g,c,h;return!e||e.type!=='html'?null:(g=e.value,c=g.match(d),!c||c[1].length!==g.length||c[2]!==a.name?null:(h={type:c[3]||'marker',attributes:c[4]||'',parameters:f(c[4]||''),node:e},b&&b(h,i),h))}var c=a.name,d=g(c);return e}function b(b,c){function d(){var a=b.apply(this,arguments);return f(a,this),a}var e=c.onparse,f=a(c,function(a,b){a.type==='marker'&&e(a,b)});return d.locator=b.locator,d}function i(e,b){var c=b.onstringify,d=a(b,function(a,b){a.type==='marker'&&c(a,b)});return function(a){return d(a,this),e.apply(this,arguments)}}function j(i){function l(l,i,m){var a=k(l),d=a&&a.type;e&&m===e&&(d==='start'&&f++,d==='end'&&f--,d==='end'&&f===0?(b=j(g,b,a,{start:i-b.length-1,end:i,parent:e}),b&&c.apply(e.children,[h,i+1].concat(b)),g=null,e=null,h=null,b=[]):b.push(l)),!e&&d==='start'&&(f=1,h=i,g=a,e=m)}var j=i.onrun,k=a(i),b=[],g=null,e=null,f=0,h;return function(a){d(a,l)}}function k(g,a){var c=g.Parser.prototype,d=c.blockTokenizers,e=c.inlineTokenizers,f=g.Compiler.prototype;return a.onparse&&(d.html=b(d.html,a),e.tag=b(e.tag,a)),a.onstringify&&(f.html=i(f.html,a)),a.onrun?j(a):null}function l(a){if(!(a&&a.name))throw new Error('Missing `name` in `options`');return function(b){return k(b,a)}}var d=h('unist-util-visit'),c=[].splice,e=new RegExp('\\s*([-a-z09_]+)(?:=(?:"((?:\\\\[\\s\\S]|[^"])+)"|\'((?:\\\\[\\s\\S]|[^\'])+)\'|((?:\\\\[\\s\\S]|[^"\'\\s])+)))?\\s*','gi');m.exports=l},{'unist-util-visit':68}],67:[function(b,c,d){'use strict';var a=b('irregular-plurals');c.exports=function(b,c,d){return b in a?c=a[b]:typeof c==='number'&&(d=c,c=(b.replace(/(?:s|x|z|ch|sh)$/i,'$&e').replace(/([^aeiou])y$/i,'$1ie')+'s').replace(/i?e?s$/i,function(a){var c=b.slice(-1)===b.slice(-1).toLowerCase();return c?a.toLowerCase():a.toUpperCase()})),d===1?b:c}},{'irregular-plurals':61}],68:[function(e,a,f){'use strict';function b(b,d){var a=-1,c=b.length;while(++ac)if(d(b[a],a)===!1)return!1;return!0}function d(i,a,d,f){var g,e,h;typeof a==='function'&&(f=d,d=a,a=null),g=f?c:b,h=function(a,b){return g(a,function(a,c){return a&&e(a,c,b)})},e=function(b,c,f){var e;return c=c||(f?0:null),(!a||b.type===a)&&(e=d(b,c,f||null)),b.children&&e!==!1?h(b.children,b):e},e(i)}a.exports=d},{}],69:[function(e,b,f){'use strict';function a(b,c,a){return(b[a]||0)-(c[a]||0)}function c(b,c){return a(b,c,'line')||a(b,c,'column')||-1}function d(a){return a.messages.sort(c),a}b.exports=d},{}]},{},[1])(1)}) diff --git a/script/build-rule-documentation.js b/script/build-rule-documentation.js index cf1438d..ed03142 100755 --- a/script/build-rule-documentation.js +++ b/script/build-rule-documentation.js @@ -3,7 +3,7 @@ * @author Titus Wormer * @copyright 2015 Titus Wormer * @license MIT - * @module mdast:lint:script:build-rule-documentation + * @module remark:lint:script:build-rule-documentation * @fileoverview Creates documentation for all exposed * rules. */ diff --git a/test/clean.js b/test/clean.js index ce0e6b0..d48a370 100644 --- a/test/clean.js +++ b/test/clean.js @@ -2,9 +2,9 @@ * @author Titus Wormer * @copyright 2015 Titus Wormer * @license MIT - * @module mdast:lint:test:clean - * @fileoverview mdast plug-in used to remove positional - * information from mdast’s syntax tree. + * @module remark:lint:test:clean + * @fileoverview remark plug-in used to remove positional + * information from remark’s syntax tree. * @todo Externalise into its own repository. */ diff --git a/test/external/index.js b/test/external/index.js index 04bc397..e305842 100644 --- a/test/external/index.js +++ b/test/external/index.js @@ -2,7 +2,7 @@ * @author Titus Wormer * @copyright 2015 Titus Wormer * @license MIT - * @module mdast:lint:test:external + * @module remark:lint:test:external * @fileoverview Map of example external rules. */ diff --git a/test/external/no-lorem.js b/test/external/no-lorem.js index 21ebf06..fb17593 100644 --- a/test/external/no-lorem.js +++ b/test/external/no-lorem.js @@ -2,7 +2,7 @@ * @author Titus Wormer * @copyright 2015 Titus Wormer * @license MIT - * @module mdast:lint:test:no-lorem + * @module remark:lint:test:no-lorem * @fileoverview * Warn when `lorem` is used in a document. * @example diff --git a/test/fixtures/gaps-toc-final.md b/test/fixtures/gaps-toc-final.md index 47251cc..d0a814b 100644 --- a/test/fixtures/gaps-toc-final.md +++ b/test/fixtures/gaps-toc-final.md @@ -4,7 +4,7 @@ This paragraph is removed by mdast-toc. However, a rule such as `no-consecutive-blank-lines` cannot see this node as it has no -position. **mdast-lint** knows that this node has no positional +position. **remark-lint** knows that this node has no positional information and can ignore the space between the ToC heading and end of the document, thus ignoring any messages between nodes. diff --git a/test/fixtures/gaps-toc-internal.md b/test/fixtures/gaps-toc-internal.md index ba36b69..2710d85 100644 --- a/test/fixtures/gaps-toc-internal.md +++ b/test/fixtures/gaps-toc-internal.md @@ -4,7 +4,7 @@ This paragraph is removed by mdast-toc. However, a rule such as `no-consecutive-blank-lines` cannot see this node as it has no -position. **mdast-lint** knows that this node has no positional +position. **remark-lint** knows that this node has no positional information and can ignore the space between the ToC heading and next node, thus ignoring any messages between nodes. diff --git a/test/fixtures/no-auto-link-without-protocol-invalid.md b/test/fixtures/no-auto-link-without-protocol-invalid.md index da92d7a..cf0f9d6 100644 --- a/test/fixtures/no-auto-link-without-protocol-invalid.md +++ b/test/fixtures/no-auto-link-without-protocol-invalid.md @@ -1,4 +1,4 @@ -No tool, including **mdast**, supports the below examples, except for the +No tool, including **remark**, supports the below examples, except for the e-mail. diff --git a/test/fixtures/no-inline-padding-invalid.md b/test/fixtures/no-inline-padding-invalid.md index dfc5652..f0a3717 100644 --- a/test/fixtures/no-inline-padding-invalid.md +++ b/test/fixtures/no-inline-padding-invalid.md @@ -2,7 +2,7 @@ Emphasis: * foo*, and _bar _. Strong: **baz ** and __ qux__. -Delete: ~~ quux~~ (this one isn’t parsed by mdast when padded). +Delete: ~~ quux~~ (this one isn’t parsed by remark when padded). An image: ![ alpha](bravo.png). diff --git a/test/fixtures/no-inline-padding-valid.md b/test/fixtures/no-inline-padding-valid.md index e21b6ed..b508938 100644 --- a/test/fixtures/no-inline-padding-valid.md +++ b/test/fixtures/no-inline-padding-valid.md @@ -2,7 +2,7 @@ Emphasis: *foo*, and _bar_. Strong: **baz** and __qux__. -Delete: ~~quux~~ (this one isn’t parsed by mdast when padded). +Delete: ~~quux~~ (this one isn’t parsed by remark when padded). An image: ![alpha](bravo.png). diff --git a/test/fixtures/no-literal-urls-invalid.md b/test/fixtures/no-literal-urls-invalid.md index e74a1e0..92f7cd2 100644 --- a/test/fixtures/no-literal-urls-invalid.md +++ b/test/fixtures/no-literal-urls-invalid.md @@ -1,5 +1,5 @@ http://example.com -foo@example.com which isn’t detected by mdast yet. +foo@example.com which isn’t detected by remark yet. -mailto:foo@example.com which isn’t detected by mdast yet. +mailto:foo@example.com which isn’t detected by remark yet. diff --git a/test/fixtures/no-literal-urls-valid.md b/test/fixtures/no-literal-urls-valid.md index 058c91d..c3b27c1 100644 --- a/test/fixtures/no-literal-urls-valid.md +++ b/test/fixtures/no-literal-urls-valid.md @@ -1,5 +1,5 @@ - which isn’t detected by mdast yet. + which isn’t detected by remark yet. - which isn’t detected by mdast yet. + which isn’t detected by remark yet. diff --git a/test/index.js b/test/index.js index 01b3b1f..c862d40 100644 --- a/test/index.js +++ b/test/index.js @@ -2,8 +2,8 @@ * @author Titus Wormer * @copyright 2015 Titus Wormer * @license MIT - * @module mdast:lint:test - * @fileoverview Tests for mdast-lint. + * @module remark:lint:test + * @fileoverview Tests for remark-lint. */ 'use strict'; @@ -54,7 +54,7 @@ function toFile(filePath) { * Shortcut. * * @param {string} filePath - Path to `file`. - * @param {Object?} options - Passed to `mdast-lint` + * @param {Object?} options - Passed to `remark-lint` * @param {Object?} settings - Passed to `mdast` * @param {boolean?} shouldClean - Uses `clean` plugin, * when truthy. @@ -93,7 +93,7 @@ var currentRule = null; var currentSetting = null; /** - * Describe a single mdast-lint rule. + * Describe a single remark-lint rule. * * @param {string} ruleId - Rule to turn on when testing. * @param {Function} description - Passed to `describe()`. @@ -107,7 +107,7 @@ function describeRule(ruleId, description) { } /** - * Describe how a single mdast-lint rule should behave + * Describe how a single remark-lint rule should behave * when given a certain `setting`. * * @param {*} setting - Passed to the rule. @@ -131,7 +131,7 @@ function describeSetting(setting, description) { * `test/fixtures/`. * @param {Array.} messages - Assertions. * @param {Object?} settings - Passed to `mdast`. - * @param {Object?} overwrite - Passed to `mdast-lint` + * @param {Object?} overwrite - Passed to `remark-lint` * instead of constructing based on BDD-like tests. */ function assertFile(filePath, messages, settings, overwrite) { @@ -145,7 +145,7 @@ function assertFile(filePath, messages, settings, overwrite) { options = overwrite; } else { /* - * Construct mdast-lint options. + * Construct remark-lint options. */ options = {}; @@ -184,7 +184,7 @@ function assertFile(filePath, messages, settings, overwrite) { * Basic tests. */ -describe('mdast-lint', function () { +describe('remark-lint', function () { it('should work without `options`', function () { assert(process('file-extension-markdown.markdown').length === 1); }); @@ -253,7 +253,7 @@ describe('External', function () { it('should fail on invalid external rules', function () { assert.throws(function () { process('lorem-valid.md', { - 'external': ['mdast'] + 'external': ['remark'] }); }); }); @@ -1885,7 +1885,7 @@ var nonnode = [ 'no-file-name-irregular-characters' ]; -describe('mdast-lint with generated nodes', function () { +describe('remark-lint with generated nodes', function () { fs.readdirSync(join(__dirname, 'fixtures')) .filter(function (filePath) { return filePath.charAt(0) !== '.';