Skip to content

Latest commit

 

History

History
85 lines (65 loc) · 948 Bytes

empty-lines.md

File metadata and controls

85 lines (65 loc) · 948 Bytes

Manage empty lines in Pug (react-pug/empty-lines)

It creates rules for managing empty lines:

  • Require empty line in the beginning
  • Require empty line in the end
  • Require empty line before we go out from nesting
  • Require empty line between siblings (if there are more than 2 siblings)
  • Prohibit more than 1 empty line
  • Prohibit empty line for nested items

Rule Details

The following patterns are considered warnings:

pug`
  div Hello`
pug`
  div One
  div Two
  div Three
`
pug`
  div
    div Nested
  div Outside
`
pug`
  div

    div Nested
`

The following patterns are not considered warnings:

pug`div Hello`
pug`
  div Hello
`
pug`
  div One

  div Two

  div Three
`
pug`
  div
    div Nested

  div Outside
`
pug`
  div
    div Nested
`

When Not To Use It

If you don't want to have consistency in empty lines.