Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
Closed
Description
I would like to propose a new rule:no-duplicate-union-intersection
.
This rule reports duplicates in unions and intersections. The autofixer will remove all duplicates, keeping the first one.
The following lines will be reported:
typeA=1|2|3|1;typeB='foo'|'bar'|'foo';typeC=A|B|A|B;
This will be autofixed to:
typeA=1|2|3;typeB='foo'|'bar';typeC=A|B;
The rule won’t try to resolve references. This may be an addition for later.
If this is accepted, I’m willing to implement this.