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
Check yield
and @yields
/@yield
#354
Comments
This will be a seldom used rule. I will accept it if enough people shows interest in it. Otherwise it is better to keep the project small and simple. |
People have already expressed interest by filing an issue, and I would like the same. This is |
feat: require-yields rules; fixes gajus#354
…er form) is present in the function body; fixes gajus#354
…er form) is present in the function body; fixes gajus#354
…er form) is present in the function body; fixes gajus#354
…er form) is present in the function body; fixes gajus#354
…er form) is present in the function body; fixes #354
🎉 This issue has been resolved in version 31.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
While #271 aims to support
yield
withrequire-returns-check
(in environments like TypeScript where there is no@yields
tag support and thus it makes some sense to use@returns
to contain this information), I think a new rule ought to be added for regular jsdoc mode (i.e., not TypeScript or GCC which don't support@yields
/@yield
) to ensure ayield
is present when the@yields
/@yield
tag is used.Similarly, I think we need another rule equivalent to
require-returns
as well, which checks that if ayield
is present, that there is a@yields
/@yield
tag.And this rule should allowIterableIterator<void>
andIterableIterator<SomeType>
within@returns
as well (for TypeScript/GCC which don't support@yields
currently).@returns
might perhaps be reserved for the generator return values or if using the actual Generator/iterator such asIterableIterator
with a generic/template, then use anyreturn
value as the variable portion rather than theyield
value.The text was updated successfully, but these errors were encountered: