-
Notifications
You must be signed in to change notification settings - Fork 149
New rule: no-wait-for-empty-cb #92
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
Comments
@thomlom @emmenko thoughts? |
I'll try to implement this one ! |
Could we reuse this one? https://github.com/eslint/eslint/blob/master/lib/rules/no-empty-function.js |
Of course! Didn't realize ESLint already has a rule for empty functions! How are you planning to reuse it tho? I don't know if there is a way to extend rules but that would be ideal. |
I was just about to copy paste it 😅 |
I see. I thought ESLint had a more fancy way of doing that, but that's probably too much magic haha. |
This will be released on v3 |
feat(await-async-utils): reflect waitFor changes (#89) feat: new rule no-wait-for-empty-callback (#94) feat: new rule prefer-wait-for (#88) feat: new rule prefer-screen-queries (#99) BREAKING CHANGE: drop support for node v8. Min version allowed is node v10.12 (#96) BREAKING CHANGE: rule `no-get-by-for-checking-element-not-present` removed in favor of new rule `prefer-presence-queries` (#98) Closes #85 Closes #86 Closes #90 Closes #92 Closes #95 Co-authored-by: timdeschryver <[email protected]>
🎉 This issue has been resolved in version 3.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Uh oh!
There was an error while loading. Please reload this page.
New
waitFor
method added in dom-testing-library v7 introduces a new restriction on empty async utils: a callback must be passed as param. Empty callbacks are allowed but not recommended. Quoting changelog itself:Because of that, a new rule called
no-wait-for-empty-cb
could enforce to pass non-empty callbacks towaitFor
.What would be considered a non-empty callback tho? I would say any of these:
() => {}
)function () {}
)noop
?The text was updated successfully, but these errors were encountered: