tools icon indicating copy to clipboard operation
tools copied to clipboard

📎 Suggestion: Rename `noConditionalAssignment` to `noAssignmentInCondition`

Open arendjr opened this issue 3 years ago • 0 comments

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.

arendjr avatar Nov 28 '22 07:11 arendjr