Fix FP S2428 (`prefer-object-literal`): Ignore circular reference assignments
zloirock opened this issue · comments
const O = {}; // => error Declare one or more properties of this object inside of the object literal syntax instead of using separate statements sonarjs/prefer-object-literal
O.self = O;
The problem is that we can't define self references in the object literal. Sure, it can be worked around - but the error in this case is not what is expected from this rule.