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
Closed

Rule suggestion: Enforce padding between class functions #438

LinusU opened this issue Feb 24, 2016 · 10 comments

Comments

@LinusU
Copy link
Member

LinusU 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
Copy link
Contributor

sure, seems reasonable

@feross
Copy link
Member

feross 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
Copy link
Member Author

LinusU commented Apr 24, 2016

eslint/eslint#5949

@LinusU
Copy link
Member Author

LinusU commented Apr 24, 2016

I also created a working rule 🙌

eslint/eslint#5950

@feross
Copy link
Member

feross 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
Copy link
Member Author

LinusU commented Jul 13, 2016

Will do 👌

@feross
Copy link
Member

feross 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 as completed Aug 19, 2016
@LinusU
Copy link
Member Author

LinusU commented Oct 2, 2017

eslint/eslint@ee99876

It has finally landed 🚀 🎉

@LinusU LinusU reopened this Oct 2, 2017
@LinusU
Copy link
Member Author

LinusU 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
Copy link
Member

feross commented Jul 5, 2019

Let's include this in standard 13.

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

@feross feross added the accepted label Jul 5, 2019
@feross feross closed this as completed Jul 6, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Archived in project
Development

No branches or pull requests

5 participants