chinchiheather / tslint-lines-between-class-members

Custom rule for TSLint to enforce blank lines between class methods - achieves a similar thing to lines-between-class-members in ESLint
18 stars 5 forks source link

Bug: expects blank linke when default exporting an object #10

Closed simonhaenisch closed 5 years ago

simonhaenisch commented 5 years ago

Using the rule "lines-between-class-members": [true, 1]:

export default {
  foo() {},
}

must have 1 new line(s) between class methods, see docs for how to configure (lines-between-class-members)

Adding a blank line above foo() {} "fixes" it, but conflicts with no-empty-line-after-opening-brace and it's not really the case that it is "between" class members. This is not even a class, so the rule shouldn't apply anyway.

chinchiheather commented 5 years ago

Thanks for raising this @simonhaenisch, I'll start working on a fix for it soon

chinchiheather commented 5 years ago

This should be fixed now @simonhaenisch in v1.3.1