Skip to content

no-inline-assertions rule #152

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

Closed
sindresorhus opened this issue Oct 22, 2016 · 5 comments · Fixed by #262
Closed

no-inline-assertions rule #152

sindresorhus opened this issue Oct 22, 2016 · 5 comments · Fixed by #262
Labels
enhancement 🎁 Rewarded on Issuehunt This issue has been rewarded on Issuehunt help wanted

Comments

@sindresorhus
Copy link
Member

sindresorhus commented Oct 22, 2016

Issuehunt badges

For readability reasons, I try to not use inline arrow functions when the function doesn't return, to make it clear it doesn't return. I would like to prevent assertions from being called in an inline arrow function test. This might seem like an edge-case, but I've seen it many times and have had to comment about it on multiple pull requests.

Fail

test('foo', t => t.true(fn()));

Pass

test('foo', t => {
    t.true(fn());
});

IssueHunt Summary

jlhwung jlhwung has been rewarded.

Backers (Total: $60.00)

Submitted pull Requests


Tips


IssueHunt has been backed by the following sponsors. Become a sponsor

@jfmengels
Copy link
Contributor

Sounds good to me.

@issuehunt-oss issuehunt-oss bot added the 💵 Funded on Issuehunt This issue has been funded on Issuehunt label Jun 9, 2019
@IssueHuntBot
Copy link

@issuehunt has funded $60.00 to this issue.


@JLHwung
Copy link
Contributor

JLHwung commented Jun 10, 2019

I would like to work on it in couple of days.

@sindresorhus
Copy link
Member Author

Go ahead :)

Make sure you carefully read https://github.com/avajs/eslint-plugin-ava/blob/master/docs/new-rule.md first and also look at some previous PRs to see how it's done.

@issuehunt-oss
Copy link

issuehunt-oss bot commented Jul 5, 2019

@sindresorhus has rewarded $54.00 to @JLHwung. See it on IssueHunt

  • 💰 Total deposit: $60.00
  • 🎉 Repository reward(0%): $0.00
  • 🔧 Service fee(10%): $6.00

@issuehunt-oss issuehunt-oss bot added 🎁 Rewarded on Issuehunt This issue has been rewarded on Issuehunt and removed 💵 Funded on Issuehunt This issue has been funded on Issuehunt labels Jul 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 🎁 Rewarded on Issuehunt This issue has been rewarded on Issuehunt help wanted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants