no-self-assign
Configuration
rslint.config.ts
Rule Details
Disallow assignments where both sides are exactly the same. Self-assignments have no effect, so they are probably errors due to incomplete refactoring.
Examples of incorrect code for this rule:
Examples of correct code for this rule:
Options
This rule has an object option:
props(boolean, default:true): Whentrue, checks member expression (property access and element access) self-assignments such asa.b = a.banda[0] = a[0]. Set tofalseto disable property checks.
Examples of correct code with { "props": false }: