-
-
Notifications
You must be signed in to change notification settings - Fork 33
Closed
Labels
AcceptedThis issue or PR has been accepted.This issue or PR has been accepted.Type: BugInconsistencies or issues which will cause a problem for users or implementors.Inconsistencies or issues which will cause a problem for users or implementors.
Description
Bug Report
For the purposes of the no-expression-statements rule, I think a yield statement should be treated like a return statement, i.e., not flagged as a lint issue.
export function* mySaga() {
// Flagged by functional/no-expression-statements
yield "hello";
// Not flagged
return "hello";
}Expected behavior
yield xyz not flagged
Actual behavior
yield xyz flagged
Steps to reproduce
See example above.
Proposed changes
Add a dedicated special case to checkExpressionStatement for yield statements.
Metadata
Metadata
Assignees
Labels
AcceptedThis issue or PR has been accepted.This issue or PR has been accepted.Type: BugInconsistencies or issues which will cause a problem for users or implementors.Inconsistencies or issues which will cause a problem for users or implementors.