tools
tools copied to clipboard
feat(rome_js_analyze): `noAssignInExpressions`
Summary
This is an exclusive rule for Rome! This disallows any assignment in an expression.
This covers two ESLint's rules: no-cond-assign and no-return-assign.
Implemenattion alternatives
The rule could be relaxed to allow assignment of assignment such as:
let a, b;
a = b = 5;
and void-assign:
let a;
void (a = 5);
I could keep the rule as is and open an issue to gather interest.
Test Plan
Unit tests and doc tests included.