Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rule suggestion: Enforce padding between class functions #438

Closed
LinusU opened this issue Feb 24, 2016 · 10 comments

Comments

@LinusU
Copy link
Member

commented Feb 24, 2016

I would like to propose a rule that enforces consistent spacing between class functions.

The following patterns would be considered problems:

class Test1 {
  constructor () {
    // ...
  }
  otherFunc () {
    // ...
  }
}

class Test2 {
  constructor () {
    // ...
  }


  otherFunc () {
    // ...
  }
}

The following pattern would be considered valid:

class Test3 {
  constructor () {
    // ...
  }

  otherFunc () {
    // ...
  }
}
@yoshuawuyts

This comment has been minimized.

Copy link
Contributor

commented Feb 24, 2016

sure, seems reasonable

@feross

This comment has been minimized.

Copy link
Member

commented Apr 24, 2016

There's no eslint core rule for this? @LinusU can you propose it on the eslint repo?

@feross feross added the blocked label Apr 24, 2016

@LinusU

This comment has been minimized.

Copy link
Member Author

commented Apr 24, 2016

@LinusU

This comment has been minimized.

Copy link
Member Author

commented Apr 24, 2016

I also created a working rule 🙌

eslint/eslint#5950

@feross

This comment has been minimized.

Copy link
Member

commented Jul 12, 2016

@LinusU Nice work! Please post a comment here / send a PR when that's merged and released in ESLint so we can add this rule to standard.

@LinusU

This comment has been minimized.

Copy link
Member Author

commented Jul 13, 2016

Will do 👌

@feross

This comment has been minimized.

Copy link
Member

commented Aug 19, 2016

@LinusU Looks like progress is going well on this rule -- it's almost there! I'm going to close this issue since it's already being tracked in the ESLint repo and there's nothing for us to do here.

Please open a new issue or PR when this rule is actually added to ESLint and I'll enable it. If you forget, no worries either. Every time I update ESLint, I evaluate every new rule for inclusion in standard so I will see it.

@feross feross closed this Aug 19, 2016

@LinusU

This comment has been minimized.

Copy link
Member Author

commented Oct 2, 2017

eslint/eslint@ee99876

It has finally landed 🚀 🎉

@LinusU LinusU reopened this Oct 2, 2017

@LinusU

This comment has been minimized.

Copy link
Member Author

commented Oct 25, 2017

Landed in eslint 4.9.0 🎉

@Flet Flet added this to the standard v11 milestone Nov 7, 2017

@feross feross removed the blocked label May 3, 2018

@feross feross modified the milestones: standard v12, standard v13 Aug 28, 2018

@feross

This comment has been minimized.

Copy link
Member

commented Jul 5, 2019

Let's include this in standard 13.

Ecosystem impact: only one failing package (webtorrent) and was automatically fixable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
5 participants
You can’t perform that action at this time.