Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add urls pointing to docs on all messages #273

Merged
merged 8 commits into from
Sep 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion packages/remark-lint-blockquote-indentation/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ import {pointStart} from 'unist-util-position'
import {generated} from 'unist-util-generated'

const remarkLintBlockquoteIndentation = lintRule(
'remark-lint:blockquote-indentation',
{
origin: 'remark-lint:blockquote-indentation',
url: 'https://github.com/remarkjs/remark-lint/tree/main/packages/remark-lint-blockquote-indentation#readme'
},
/** @type {import('unified-lint-rule').Rule<Root, Options>} */
(tree, file, option = 'consistent') => {
visit(tree, 'blockquote', (node) => {
Expand Down
5 changes: 4 additions & 1 deletion packages/remark-lint-checkbox-character-style/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,10 @@ import {visit} from 'unist-util-visit'
import {pointStart} from 'unist-util-position'

const remarkLintCheckboxCharacterStyle = lintRule(
'remark-lint:checkbox-character-style',
{
origin: 'remark-lint:checkbox-character-style',
url: 'https://github.com/remarkjs/remark-lint/tree/main/packages/remark-lint-checkbox-character-style#readme'
},
/** @type {import('unified-lint-rule').Rule<Root, Options>} */
(tree, file, option = 'consistent') => {
const value = String(file)
Expand Down
5 changes: 4 additions & 1 deletion packages/remark-lint-checkbox-content-indent/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ import {visit} from 'unist-util-visit'
import {pointStart} from 'unist-util-position'

const remarkLintCheckboxContentIndent = lintRule(
'remark-lint:checkbox-content-indent',
{
origin: 'remark-lint:checkbox-content-indent',
url: 'https://github.com/remarkjs/remark-lint/tree/main/packages/remark-lint-checkbox-content-indent#readme'
},
/** @type {import('unified-lint-rule').Rule<Root, void>} */
(tree, file) => {
const value = String(file)
Expand Down
5 changes: 4 additions & 1 deletion packages/remark-lint-code-block-style/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,10 @@ import {pointStart, pointEnd} from 'unist-util-position'
import {generated} from 'unist-util-generated'

const remarkLintCodeBlockStyle = lintRule(
'remark-lint:code-block-style',
{
origin: 'remark-lint:code-block-style',
url: 'https://github.com/remarkjs/remark-lint/tree/main/packages/remark-lint-code-block-style#readme'
},
/** @type {import('unified-lint-rule').Rule<Root, Options>} */
(tree, file, option = 'consistent') => {
const value = String(file)
Expand Down
5 changes: 4 additions & 1 deletion packages/remark-lint-definition-case/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ import {pointStart, pointEnd} from 'unist-util-position'
const label = /^\s*\[((?:\\[\s\S]|[^[\]])+)]/

const remarkLintDefinitionCase = lintRule(
'remark-lint:definition-case',
{
origin: 'remark-lint:definition-case',
url: 'https://github.com/remarkjs/remark-lint/tree/main/packages/remark-lint-definition-case#readme'
},
/** @type {import('unified-lint-rule').Rule<Root, void>} */
(tree, file) => {
const value = String(file)
Expand Down
5 changes: 4 additions & 1 deletion packages/remark-lint-definition-spacing/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ import {pointStart, pointEnd} from 'unist-util-position'
const label = /^\s*\[((?:\\[\s\S]|[^[\]])+)]/

const remarkLintDefinitionSpacing = lintRule(
'remark-lint:definition-spacing',
{
origin: 'remark-lint:definition-spacing',
url: 'https://github.com/remarkjs/remark-lint/tree/main/packages/remark-lint-definition-spacing#readme'
},
/** @type {import('unified-lint-rule').Rule<Root, void>} */
(tree, file) => {
const value = String(file)
Expand Down
5 changes: 4 additions & 1 deletion packages/remark-lint-emphasis-marker/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,10 @@ import {visit} from 'unist-util-visit'
import {pointStart} from 'unist-util-position'

const remarkLintEmphasisMarker = lintRule(
'remark-lint:emphasis-marker',
{
origin: 'remark-lint:emphasis-marker',
url: 'https://github.com/remarkjs/remark-lint/tree/main/packages/remark-lint-emphasis-marker#readme'
},
/** @type {import('unified-lint-rule').Rule<Root, Options>} */
(tree, file, option = 'consistent') => {
const value = String(file)
Expand Down
5 changes: 4 additions & 1 deletion packages/remark-lint-fenced-code-flag/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,10 @@ import {generated} from 'unist-util-generated'
const fence = /^ {0,3}([~`])\1{2,}/

const remarkLintFencedCodeFlag = lintRule(
'remark-lint:fenced-code-flag',
{
origin: 'remark-lint:fenced-code-flag',
url: 'https://github.com/remarkjs/remark-lint/tree/main/packages/remark-lint-fenced-code-flag#readme'
},
/** @type {import('unified-lint-rule').Rule<Root, Options>} */
(tree, file, option) => {
const value = String(file)
Expand Down
5 changes: 4 additions & 1 deletion packages/remark-lint-fenced-code-marker/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,10 @@ import {visit} from 'unist-util-visit'
import {pointStart} from 'unist-util-position'

const remarkLintFencedCodeMarker = lintRule(
'remark-lint:fenced-code-marker',
{
origin: 'remark-lint:fenced-code-marker',
url: 'https://github.com/remarkjs/remark-lint/tree/main/packages/remark-lint-fenced-code-marker#readme'
},
/** @type {import('unified-lint-rule').Rule<Root, Options>} */
(tree, file, option = 'consistent') => {
const contents = String(file)
Expand Down
5 changes: 4 additions & 1 deletion packages/remark-lint-file-extension/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@
import {lintRule} from 'unified-lint-rule'

const remarkLintFileExtension = lintRule(
'remark-lint:file-extension',
{
origin: 'remark-lint:file-extension',
url: 'https://github.com/remarkjs/remark-lint/tree/main/packages/remark-lint-file-extension#readme'
},
/** @type {import('unified-lint-rule').Rule<Root, Options>} */
(_, file, option = 'md') => {
const ext = file.extname
Expand Down
5 changes: 4 additions & 1 deletion packages/remark-lint-final-definition/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ import {pointStart} from 'unist-util-position'
import {generated} from 'unist-util-generated'

const remarkLintFinalDefinition = lintRule(
'remark-lint:final-definition',
{
origin: 'remark-lint:final-definition',
url: 'https://github.com/remarkjs/remark-lint/tree/main/packages/remark-lint-final-definition#readme'
},
/** @type {import('unified-lint-rule').Rule<Root, void>} */
(tree, file) => {
let last = 0
Expand Down
5 changes: 4 additions & 1 deletion packages/remark-lint-final-newline/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@
import {lintRule} from 'unified-lint-rule'

const remarkLintFinalNewline = lintRule(
'remark-lint:final-newline',
{
origin: 'remark-lint:final-newline',
url: 'https://github.com/remarkjs/remark-lint/tree/main/packages/remark-lint-final-newline#readme'
},
/** @type {import('unified-lint-rule').Rule<Root, void>} */
(_, file) => {
const value = String(file)
Expand Down
5 changes: 4 additions & 1 deletion packages/remark-lint-first-heading-level/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,10 @@ import {generated} from 'unist-util-generated'
const re = /<h([1-6])/

const remarkLintFirstHeadingLevel = lintRule(
'remark-lint:first-heading-level',
{
origin: 'remark-lint:first-heading-level',
url: 'https://github.com/remarkjs/remark-lint/tree/main/packages/remark-lint-first-heading-level#readme'
},
/** @type {import('unified-lint-rule').Rule<Root, Options>} */
(tree, file, option = 1) => {
visit(tree, (node) => {
Expand Down
5 changes: 4 additions & 1 deletion packages/remark-lint-hard-break-spaces/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ import {pointStart, pointEnd} from 'unist-util-position'
import {generated} from 'unist-util-generated'

const remarkLintHardBreakSpaces = lintRule(
'remark-lint:hard-break-spaces',
{
origin: 'remark-lint:hard-break-spaces',
url: 'https://github.com/remarkjs/remark-lint/tree/main/packages/remark-lint-hard-break-spaces#readme'
},
/** @type {import('unified-lint-rule').Rule<Root, void>} */
(tree, file) => {
const value = String(file)
Expand Down
5 changes: 4 additions & 1 deletion packages/remark-lint-heading-increment/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ import {visit} from 'unist-util-visit'
import {generated} from 'unist-util-generated'

const remarkLintHeadingIncrement = lintRule(
'remark-lint:heading-increment',
{
origin: 'remark-lint:heading-increment',
url: 'https://github.com/remarkjs/remark-lint/tree/main/packages/remark-lint-heading-increment#readme'
},
/** @type {import('unified-lint-rule').Rule<Root, void>} */
(tree, file) => {
/** @type {Depth} */
Expand Down
5 changes: 4 additions & 1 deletion packages/remark-lint-heading-style/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,10 @@ import {headingStyle} from 'mdast-util-heading-style'
import {generated} from 'unist-util-generated'

const remarkLintHeadingStyle = lintRule(
'remark-lint:heading-style',
{
origin: 'remark-lint:heading-style',
url: 'https://github.com/remarkjs/remark-lint/tree/main/packages/remark-lint-heading-style#readme'
},
/** @type {import('unified-lint-rule').Rule<Root, Options>} */
(tree, file, option = 'consistent') => {
if (
Expand Down
5 changes: 4 additions & 1 deletion packages/remark-lint-linebreak-style/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ import {location} from 'vfile-location'
const escaped = {unix: '\\n', windows: '\\r\\n'}

const remarkLintLinebreakStyle = lintRule(
'remark-lint:linebreak-style',
{
origin: 'remark-lint:linebreak-style',
url: 'https://github.com/remarkjs/remark-lint/tree/main/packages/remark-lint-linebreak-style#readme'
},
/** @type {import('unified-lint-rule').Rule<Root, Options>} */
(_, file, option = 'consistent') => {
const value = String(file)
Expand Down
5 changes: 4 additions & 1 deletion packages/remark-lint-link-title-style/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,10 @@ const markers = {
}

const remarkLintLinkTitleStyle = lintRule(
'remark-lint:link-title-style',
{
origin: 'remark-lint:link-title-style',
url: 'https://github.com/remarkjs/remark-lint/tree/main/packages/remark-lint-link-title-style#readme'
},
/** @type {import('unified-lint-rule').Rule<Root, Options>} */
(tree, file, option = 'consistent') => {
const value = String(file)
Expand Down
5 changes: 4 additions & 1 deletion packages/remark-lint-list-item-bullet-indent/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ import plural from 'pluralize'
import {visit} from 'unist-util-visit'

const remarkLintListItemBulletIndent = lintRule(
'remark-lint:list-item-bullet-indent',
{
origin: 'remark-lint:list-item-bullet-indent',
url: 'https://github.com/remarkjs/remark-lint/tree/main/packages/remark-lint-list-item-bullet-indent#readme'
},
/** @type {import('unified-lint-rule').Rule<Root, void>} */
(tree, file) => {
visit(tree, 'list', (list, _, grandparent) => {
Expand Down
5 changes: 4 additions & 1 deletion packages/remark-lint-list-item-content-indent/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ import {visit} from 'unist-util-visit'
import {pointStart} from 'unist-util-position'

const remarkLintListItemContentIndent = lintRule(
'remark-lint:list-item-content-indent',
{
origin: 'remark-lint:list-item-content-indent',
url: 'https://github.com/remarkjs/remark-lint/tree/main/packages/remark-lint-list-item-content-indent#readme'
},
/** @type {import('unified-lint-rule').Rule<Root, void>} */
(tree, file) => {
const value = String(file)
Expand Down
5 changes: 4 additions & 1 deletion packages/remark-lint-list-item-indent/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,10 @@ import {pointStart} from 'unist-util-position'
import {generated} from 'unist-util-generated'

const remarkLintListItemIndent = lintRule(
'remark-lint:list-item-indent',
{
origin: 'remark-lint:list-item-indent',
url: 'https://github.com/remarkjs/remark-lint/tree/main/packages/remark-lint-list-item-indent#readme'
},
/** @type {import('unified-lint-rule').Rule<Root, Options>} */
(tree, file, option = 'tab-size') => {
const value = String(file)
Expand Down
5 changes: 4 additions & 1 deletion packages/remark-lint-list-item-spacing/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,10 @@ import {pointStart, pointEnd} from 'unist-util-position'
import {generated} from 'unist-util-generated'

const remarkLintListItemSpacing = lintRule(
'remark-lint:list-item-spacing',
{
origin: 'remark-lint:list-item-spacing',
url: 'https://github.com/remarkjs/remark-lint/tree/main/packages/remark-lint-list-item-spacing#readme'
},
/** @type {import('unified-lint-rule').Rule<Root, Options>} */
(tree, file, option = {}) => {
const {checkBlanks} = option
Expand Down
5 changes: 4 additions & 1 deletion packages/remark-lint-maximum-heading-length/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ import {generated} from 'unist-util-generated'
import {toString} from 'mdast-util-to-string'

const remarkLintMaximumHeadingLength = lintRule(
'remark-lint:maximum-heading-length',
{
origin: 'remark-lint:maximum-heading-length',
url: 'https://github.com/remarkjs/remark-lint/tree/main/packages/remark-lint-maximum-heading-length#readme'
},
/** @type {import('unified-lint-rule').Rule<Root, Options>} */
(tree, file, option = 60) => {
visit(tree, 'heading', (node) => {
Expand Down
5 changes: 4 additions & 1 deletion packages/remark-lint-maximum-line-length/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,10 @@ import {pointStart, pointEnd} from 'unist-util-position'
import {generated} from 'unist-util-generated'

const remarkLintMaximumLineLength = lintRule(
'remark-lint:maximum-line-length',
{
origin: 'remark-lint:maximum-line-length',
url: 'https://github.com/remarkjs/remark-lint/tree/main/packages/remark-lint-maximum-line-length#readme'
},
/** @type {import('unified-lint-rule').Rule<Root, Options>} */
(tree, file, option = 80) => {
const value = String(file)
Expand Down
5 changes: 4 additions & 1 deletion packages/remark-lint-no-auto-link-without-protocol/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ import {toString} from 'mdast-util-to-string'
const protocol = /^[a-z][a-z+.-]+:\/?/i

const remarkLintNoAutoLinkWithoutProtocol = lintRule(
'remark-lint:no-auto-link-without-protocol',
{
origin: 'remark-lint:no-auto-link-without-protocol',
url: 'https://github.com/remarkjs/remark-lint/tree/main/packages/remark-lint-no-auto-link-without-protocol#readme'
},
/** @type {import('unified-lint-rule').Rule<Root, void>} */
(tree, file) => {
visit(tree, 'link', (node) => {
Expand Down
5 changes: 4 additions & 1 deletion packages/remark-lint-no-blockquote-without-marker/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@ import {pointStart, pointEnd} from 'unist-util-position'
import {generated} from 'unist-util-generated'

const remarkLintNoBlockquoteWithoutMarker = lintRule(
'remark-lint:no-blockquote-without-marker',
{
origin: 'remark-lint:no-blockquote-without-marker',
url: 'https://github.com/remarkjs/remark-lint/tree/main/packages/remark-lint-no-blockquote-without-marker#readme'
},
/** @type {import('unified-lint-rule').Rule<Root, void>} */
(tree, file) => {
const value = String(file)
Expand Down
5 changes: 4 additions & 1 deletion packages/remark-lint-no-consecutive-blank-lines/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ import {pointStart, pointEnd} from 'unist-util-position'
import {generated} from 'unist-util-generated'

const remarkLintNoConsecutiveBlankLines = lintRule(
'remark-lint:no-consecutive-blank-lines',
{
origin: 'remark-lint:no-consecutive-blank-lines',
url: 'https://github.com/remarkjs/remark-lint/tree/main/packages/remark-lint-no-consecutive-blank-lines#readme'
},
/** @type {import('unified-lint-rule').Rule<Root, void>} */
(tree, file) => {
visit(tree, (node) => {
Expand Down
5 changes: 4 additions & 1 deletion packages/remark-lint-no-duplicate-defined-urls/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ import {stringifyPosition} from 'unist-util-stringify-position'
import {visit} from 'unist-util-visit'

const remarkLintNoDuplicateDefinedUrls = lintRule(
'remark-lint:no-duplicate-defined-urls',
{
origin: 'remark-lint:no-duplicate-defined-urls',
url: 'https://github.com/remarkjs/remark-lint/tree/main/packages/remark-lint-no-duplicate-defined-urls#readme'
},
/** @type {import('unified-lint-rule').Rule<Root, void>} */
(tree, file) => {
/** @type {Record<string, string>} */
Expand Down
5 changes: 4 additions & 1 deletion packages/remark-lint-no-duplicate-definitions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ import {stringifyPosition} from 'unist-util-stringify-position'
import {visit} from 'unist-util-visit'

const remarkLintNoDuplicateDefinitions = lintRule(
'remark-lint:no-duplicate-definitions',
{
origin: 'remark-lint:no-duplicate-definitions',
url: 'https://github.com/remarkjs/remark-lint/tree/main/packages/remark-lint-no-duplicate-definitions#readme'
},
/** @type {import('unified-lint-rule').Rule<Root, void>} */
(tree, file) => {
/** @type {Record<string, string>} */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ import {stringifyPosition} from 'unist-util-stringify-position'
import {toString} from 'mdast-util-to-string'

const remarkLintNoDuplicateHeadingsInSection = lintRule(
'remark-lint:no-duplicate-headings-in-section',
{
origin: 'remark-lint:no-duplicate-headings-in-section',
url: 'https://github.com/remarkjs/remark-lint/tree/main/packages/remark-lint-no-duplicate-headings-in-section#readme'
},
/** @type {import('unified-lint-rule').Rule<Root, void>} */
(tree, file) => {
/** @type {Array.<Record<string, Heading>>} */
Expand Down
5 changes: 4 additions & 1 deletion packages/remark-lint-no-duplicate-headings/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ import {stringifyPosition} from 'unist-util-stringify-position'
import {toString} from 'mdast-util-to-string'

const remarkLintNoDuplicateHeadings = lintRule(
'remark-lint:no-duplicate-headings',
{
origin: 'remark-lint:no-duplicate-headings',
url: 'https://github.com/remarkjs/remark-lint/tree/main/packages/remark-lint-no-duplicate-headings#readme'
},
/** @type {import('unified-lint-rule').Rule<Root, void>} */
(tree, file) => {
/** @type {Record<string, string>} */
Expand Down
5 changes: 4 additions & 1 deletion packages/remark-lint-no-emphasis-as-heading/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ import {visit} from 'unist-util-visit'
import {generated} from 'unist-util-generated'

const remarkLintNoEmphasisAsHeading = lintRule(
'remark-lint:no-emphasis-as-heading',
{
origin: 'remark-lint:no-emphasis-as-heading',
url: 'https://github.com/remarkjs/remark-lint/tree/main/packages/remark-lint-no-emphasis-as-heading#readme'
},
/** @type {import('unified-lint-rule').Rule<Root, void>} */
(tree, file) => {
visit(tree, 'paragraph', (node, index, parent) => {
Expand Down
5 changes: 4 additions & 1 deletion packages/remark-lint-no-empty-url/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ import {visit} from 'unist-util-visit'
import {generated} from 'unist-util-generated'

const remarkLintNoEmptyUrl = lintRule(
'remark-lint:no-empty-url',
{
origin: 'remark-lint:no-empty-url',
url: 'https://github.com/remarkjs/remark-lint/tree/main/packages/remark-lint-no-empty-url#readme'
},
/** @type {import('unified-lint-rule').Rule<Root, void>} */
(tree, file) => {
visit(tree, (node) => {
Expand Down
Loading