Linter configuration file

Article last updated at August 11, 2026

In the project root, you can place a linter configuration file .yfmlint to manage documentation build checks.

Default configuration values:

log-levels:
  MD001: 'disabled' # Heading levels should only increment by one level at a time
  MD002: 'disabled' # First heading should be a top-level heading~~
  MD003: 'disabled' # Heading style
  MD004: 'disabled' # Unordered list style
  MD005: 'disabled' # Inconsistent indentation for list items at the same level
  MD006: 'disabled' # Consider starting bulleted lists at the beginning of the line~~
  MD007: 'disabled' # Unordered list indentation
  MD009: 'disabled' # Trailing spaces
  MD010: 'disabled' # Hard tabs
  MD011: 'disabled' # Reversed link syntax
  MD012: 'disabled' # Multiple consecutive blank lines
  MD013: 'disabled' # Line length
  MD014: 'disabled' # Dollar signs used before commands without showing output
  MD018: 'error'    # No space after hash on atx style heading
  MD019: 'disabled' # Multiple spaces after hash on atx style heading
  MD020: 'disabled' # No space inside hashes on closed atx style heading
  MD021: 'disabled' # Multiple spaces inside hashes on closed atx style heading
  MD022: 'disabled' # Headings should be surrounded by blank lines
  MD023: 'disabled' # Headings must start at the beginning of the line
  MD024: 'disabled' # Multiple headings with the same content
  MD025: 'disabled' # Multiple top-level headings in the same document
  MD026: 'disabled' # Trailing punctuation in heading
  MD027: 'disabled' # Multiple spaces after blockquote symbol
  MD028: 'disabled' # Blank line inside blockquote
  MD029: 'disabled' # Ordered list item prefix
  MD030: 'disabled' # Spaces after list markers
  MD031: 'disabled' # Fenced code blocks should be surrounded by blank lines
  MD032: 'disabled' # Lists should be surrounded by blank lines
  MD033: 'disabled' # Inline HTML
  MD034: 'disabled' # Bare URL used
  MD035: 'disabled' # Horizontal rule style
  MD036: 'disabled' # Emphasis used instead of a heading
  MD037: 'disabled' # Spaces inside emphasis markers
  MD038: 'disabled' # Spaces inside code span elements
  MD039: 'disabled' # Spaces inside link text
  MD040: 'disabled' # Fenced code blocks should have a language specified
  MD041: 'disabled' # First line in a file should be a top-level heading
  MD042: 'disabled' # No empty links
  MD043: 'disabled' # Required heading structure
  MD044: 'disabled' # Proper names should have the correct capitalization
  MD045: 'disabled' # Images should have alternate text (alt text)
  MD046: 'disabled' # Code block style
  MD047: 'disabled' # Files should end with a single newline character
  MD048: 'disabled' # Code fence style
  
  YFM001: 'warn'    # Inline code length
  YFM002: 'warn'    # No header found in the file for the link text
  YFM003: 'error'   # Link is unreachable
  YFM004: 'error'   # Table not closed
  YFM005: 'warn'    # Tab list, cut, note not opened or closed
  YFM006: 'warn'    # Term definition duplicated
  YFM007: 'warn'    # Term used without definition
  YFM008: 'warn'    # Term inside definition not allowed
  YFM009: 'error'   # Term definition used not at the end of file
  YFM010: 'warn'    # Autotitle anchor is missed
  YFM011: 'warn'    # Max svg size
  YFM012: 'error'   # Max output html size
  YFM013: 'error'   # Max single asset size
  YFM014: 'warn'    # Anchor cannot be used as file path
  YFM015: 'warn'    # Anchor not found in file
  YFM016: 'error'   # The file is included in itself
  YFM017: 'error'   # Invalid front matter format: duplicated mapping key
  YFM018: 'info'    # Term definition from include
  YFM020: 'warn'    # Invalid yfm directive
  YFM021: 'warn'    # Non-BMP (UTF-16 surrogate pair) character
  YFM022: 'info'    # llms-full.txt max size reached


# Inline code length
YFM001:
  maximum: 100

Rules with the MD prefix are provided by the markdownlint library.
A detailed description of all rules with the MD prefix can be found at the link.
A detailed description of all rules with the YFM prefix can be found at the link.

You can override the logging level in the .yfmlint file in the log-levels section separately for each rule: error, warn, disabled.

Warning

You cannot override the errors YFM014, YFM015, YFM016, and YFM017.

In the root section, you can configure the values passed to the rules. For example:

# Inline code length
YFM001:
  level: warn
  maximum: 100

# Supported yfm directives
YFM020:
  level: warn
  customDirectives:
    - diagram       # skip warning on {% diagram %} directive

# Line length
MD013:
  line_length: 100 # default: 80 characters
  code_blocks: false # exclude this rule for code_blocks
  tables: false # exclude this rule for tables
  headings: false # exclude this rule for headings

# Inline HTML
MD033:
  allowed_elements: [ "span", "br", "p" ]


# Section for defining log levels
log-levels:

The default values for rules with the MD prefix are specified at the link.
The default values for rules with the YFM prefix are specified at the link.

Rules can be enabled, disabled, or configured for an entire file or a paragraph within a file.
Examples can be viewed at the link.

See also: Ajv schema of .yfmlint linter configuration files