Skip to content

yml/no-multiple-empty-lines

disallow multiple empty lines

  • 🔧 The --fix option on the command line can automatically fix some of the problems reported by this rule.

📖 Rule Details

This rule aims to reduce the scrolling required when reading through your code. It will warn when the maximum amount of empty lines has been exceeded. Use max: 0 if you want to remove all blank lines.

Now loading...

🔧 Options

yaml
yml/no-multiple-empty-lines:
  - error
  - max: 2
    maxEOF: 2
    maxBOF: 2
  • max ... Enforces a maximum number of consecutive empty lines. Default is 2.
  • maxEOF ... Enforces a maximum number of consecutive empty lines at the end of files. Default is value specified for max.
  • maxBOF ... Enforces a maximum number of consecutive empty lines at the beginning of files. Default is value specified for max.

Same as no-multiple-empty-lines rule option. See here for details.

🚀 Version

This rule was introduced in eslint-plugin-yml v0.12.0

🔍 Implementation

Taken with ❤️ from ESLint core