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

Handling Allman brace style for the first method case #6

Closed enessoylu closed 6 years ago

enessoylu commented 6 years ago

@chinchiheather This PR tries to fix the following case:

class FirstMethodNoNewLineWithAllmanBraceStlye
{
  constructor() {}

  method() {}
}

After styling this code piece becomes:

class FirstMethodNoNewLineWithAllmanBraceStlye
{

  constructor() {}

  method() {}
}

Which has the unwanted newline before the constructor.

chinchiheather commented 6 years ago

Thanks for doing this @enessoylu :) I just updated the version and pushed it to npm, so you should see your changes there now