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

Add ESLint rule for blank line at beginning of function scope #339

Merged
merged 1 commit into from Apr 13, 2015

Conversation

@cjihrig
Copy link
Contributor

cjihrig commented Apr 8, 2015

The rule causes warnings if the blank line is missing. Testing turned up a couple places where the blank line was missing in lab.

@Marsup

This comment has been minimized.

Copy link
Member

Marsup commented Apr 8, 2015

👍 Shouldn't we create a single module for all hapi-related rules ? One module per rule seems overkill.

@Marsup

This comment has been minimized.

Copy link
Member

Marsup commented Apr 8, 2015

Also, wouldn't it be better to release it as an ESLint plugin ?

@cjihrig

This comment has been minimized.

Copy link
Contributor Author

cjihrig commented Apr 8, 2015

This was the only rule that @geek brought to my attention. What else is missing/not natively supported by ESLint?

@Marsup

This comment has been minimized.

Copy link
Member

Marsup commented Apr 8, 2015

There were a few when I first implemented ESLint into lab, maybe it changed. I'll try to put up a list someday.

@AdriVanHoudt

This comment has been minimized.

Copy link
Contributor

AdriVanHoudt commented Apr 13, 2015

@cjihrig I love the rule! But can you make it into a plugin so I can use it in other projects (without using cli params) (see eslint/eslint#2180)

@cjihrig

This comment has been minimized.

Copy link
Contributor Author

cjihrig commented Apr 13, 2015

I'll look into creating a plugin today.

@AdriVanHoudt

This comment has been minimized.

Copy link
Contributor

AdriVanHoudt commented Apr 13, 2015

@cjihrig cool thanks!

@cjihrig

This comment has been minimized.

Copy link
Contributor Author

cjihrig commented Apr 13, 2015

Converted to a plugin

@AdriVanHoudt

This comment has been minimized.

Copy link
Contributor

AdriVanHoudt commented Apr 13, 2015

@cjihrig thanks I will definitely use this!

@AdriVanHoudt AdriVanHoudt mentioned this pull request Apr 13, 2015
@cjihrig

This comment has been minimized.

Copy link
Contributor Author

cjihrig commented Apr 13, 2015

👍

@geek geek added the feature label Apr 13, 2015
@geek geek added this to the 5.5.2 milestone Apr 13, 2015
@geek geek self-assigned this Apr 13, 2015
geek added a commit that referenced this pull request Apr 13, 2015
Add ESLint rule for blank line at beginning of function scope
@geek geek merged commit c621a3a into hapijs:master Apr 13, 2015
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@tielur

This comment has been minimized.

Copy link
Contributor

tielur commented Apr 14, 2015

@geek I'm not familiar with the release cycle for lab, but when do you think this 5.5.2 will be pushed to npm?

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