You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: crates/biome_js_analyze/src/lint/nursery/no_return_assign.rs
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -80,18 +80,18 @@ impl Rule for NoReturnAssign {
80
80
rule_category!(),
81
81
state,
82
82
match ctx.query(){
83
-
AnyReturn::JsReturnStatement(_) =>
83
+
AnyReturn::JsArrowFunctionExpression(_) =>
84
84
markup!{
85
85
<Emphasis>"Arrow function"</Emphasis>" should not return "<Emphasis>"assignment"</Emphasis>"."
86
86
},
87
-
AnyReturn::JsArrowFunctionExpression(_) =>
87
+
AnyReturn::JsReturnStatement(_) =>
88
88
markup!{
89
89
<Emphasis>"Function"</Emphasis>" should not return "<Emphasis>"assignment"</Emphasis>"."
90
90
},
91
91
}
92
92
)
93
93
.note(markup!{
94
-
"noReturnAssign: Return statements are often considered side-effect free.\nYou likely want to do a comparison `==`\nOtherwise move the assignment outside of the return statement"
94
+
"Return statements are often considered side-effect free.\nYou likely want to do a comparison `==`\nOtherwise move the assignment outside of the return statement"
0 commit comments