tools
tools copied to clipboard
📎 Suggestion: Rename `noConditionalAssignment` to `noAssignmentInCondition`
Description
I realize this may be a nitpick, but I found the name noConditionalAssignment to be confusing and thought it would relate to code such as this:
let foo;
if (bar) {
foo = “foo”;
}
But the rule is actually about assignments in places where conditions are expected. The assignment itself isn’t conditional though, it’s unconditionally executed when the condition is evaluated.
So I was hoping you may still consider renaming noConditionalAssignment to noAssignmentInCondition.