django-stars / frontend-skeleton

frontend-skeleton
MIT License
56 stars 31 forks source link

Add padding-line-between-statements rule to eslint #261

Closed Pareder closed 2 years ago

Pareder commented 3 years ago

Added rule to eslint that requires the padding line after block-like statements (if, for, while, etc.). It makes code more readable, especially when there are a lot of block statements one after another.

// Wrong

if(true) {
  // code
}
for(let i = 0; i < 100; i++) {
  // code
}
while(true) {
  // code
}
// Correct

if(true) {
  // code
}

for(let i = 0; i < 100; i++) {
  // code
}

while(true) {
  // code
}