This document describes how to configure rules and lists all available official rules. Each rule is a separate package. See their readme’s for more information.
false
turns rules off — the code no longer runs:
remark()
.use(require('remark-lint-final-newline'), false)
// ...
true
turns a rule on again:
remark()
.use(require('remark-lint-final-newline'), true)
// ...
Rules can be configured with a severity too. The following ignores all messages from the plugin:
remark()
.use(require('remark-lint-final-newline'), [0])
// ...
...and passing [1]
explicitly sets the normal behaviour (warn for problems).
To trigger an error instead of a warning, pass 2
:
remark()
.use(require('remark-lint-final-newline'), [2])
// ...
It’s also possible to pass both a severity and configuration:
remark()
.use(require('remark-lint-maximum-line-length'), [2, 70])
// ...
Lastly, strings can also be passed, instead of numbers:
off
instead of 0
, warn
or on
instead of 1
, and
error
instead of 2
.
remark()
.use(require('remark-lint-maximum-line-length'), ['error', 70])
// ...
This lists contains all “official” rules, developed in this repository. For rules developed outside of this repo, view the List of External Rules.
blockquote-indentation
— warn when blockquotes are either indented too much or too littlecheckbox-character-style
— warn when list item checkboxes violate a given stylecheckbox-content-indent
— warn when list item checkboxes are followed by too much white-spacecode-block-style
— warn when code-blocks do not adhere to a given styledefinition-case
— warn when definition labels are not lower-casedefinition-spacing
— warn when consecutive white space is used in a definitionemphasis-marker
— warn when emphasis markers violate the given stylefenced-code-flag
— warn when fenced code blocks occur without language flagfenced-code-marker
— warn when fenced code markers violate the given stylefile-extension
— warn when the file’s extension violates the given stylefinal-definition
— warn when definitions are not placed at the end of the filefinal-newline
— warn when a newline at the end of a file is missingfirst-heading-level
— warn when the first heading has a level other than a specified valuehard-break-spaces
— warn when too many spaces are used to create a hard breakheading-increment
— warn when headings increment with more than 1 level at a timeheading-style
— warn when heading style violates the given stylelinebreak-style
— warn when linebreaks violate a given or detected stylelink-title-style
— warn when link and definition titles occur with incorrect quoteslist-item-bullet-indent
— warn when list item bullets are indentedlist-item-content-indent
— warn when the content of a list item has mixed indentationlist-item-indent
— warn when the spacing between a list item’s bullet and its content violates a given stylelist-item-spacing
— warn when list looseness is incorrectmaximum-heading-length
— warn when headings are too longmaximum-line-length
— warn when lines are too longno-auto-link-without-protocol
— warn for angle-bracketed links without protocolno-blockquote-without-marker
— warn when blank lines without markers (`>`) are found in a blockquoteno-consecutive-blank-lines
— warn for too many consecutive blank linesno-duplicate-definitions
— warn on duplicate definitionsno-duplicate-headings
— warn on duplicate headingsno-duplicate-headings-in-section
— warn on duplicate headings in a sectionno-emphasis-as-heading
— warn when emphasis or importance is used instead of a headingno-empty-url
— warn on empty URLs in links and imagesno-file-name-articles
— warn when file name start with an articleno-file-name-consecutive-dashes
— warn when file names contain consecutive dashesno-file-name-irregular-characters
— warn when file names contain irregular charactersno-file-name-mixed-case
— warn when file names use mixed caseno-file-name-outer-dashes
— warn when file names contain initial or final dashesno-heading-content-indent
— warn when heading content is indentedno-heading-indent
— warn when headings are indentedno-heading-like-paragraph
— for too many hashes (h7+ “headings”)no-heading-punctuation
— warn when headings end in illegal charactersno-html
— warn when HTML nodes are usedno-inline-padding
— warn when inline nodes are padded with spacesno-literal-urls
— warn when URLs without angle-brackets are usedno-missing-blank-lines
— warn when missing blank linesno-multiple-toplevel-headings
— warn when multiple top-level headings are usedno-paragraph-content-indent
— warn when the content in paragraphs are indentedno-reference-like-url
— warn when URLs are also defined identifiersno-shell-dollars
— warn when shell code is prefixed by dollarsno-shortcut-reference-image
— warn when shortcut reference images are usedno-shortcut-reference-link
— warn when shortcut reference links are usedno-table-indentation
— warn when tables are indentedno-tabs
— warn when hard tabs are used instead of spacesno-undefined-references
— warn when references to undefined definitions are foundno-unused-definitions
— warn when unused definitions are foundordered-list-marker-style
— warn when the markers of ordered lists violate a given styleordered-list-marker-value
— warn when the marker value of ordered lists violates a given stylerule-style
— warn when horizontal rules violate a given stylestrong-marker
— warn when importance (strong) markers violate the given styletable-cell-padding
— warn when table cells are incorrectly paddedtable-pipe-alignment
— warn when table pipes are not alignedtable-pipes
— warn when table rows are not fenced with pipesunordered-list-marker-style
— warn when markers of unordered lists violate a given style