Input:
import {A1,} from 'foo';
import {B1,} from 'foo';
import {C1,} from 'foo';
import {
A2,
} from 'bar';
import {
B2,
} from 'bar';
import {
C2,
} from 'bar';
Expected:
Error and fixed to
import {A1,B1,C1,} from 'foo';
import {
A2,
B2,
C2,
} from 'bar';
(or something similar)
Actual:
Error and fixed to
import {A1,B1,,C1,} from 'foo';
^ SYNTAX ERROR
import {
A2,
B2,
,
^ SYNTAX ERROR
C2,
} from 'bar';
Interestingly this bug requires 3 (or more) duplicate declarations to trigger.
I haven't looked yet - but given it happens for 3 and not 2 - I'd assume that ESLint is merging the distinct fixes poorly - leading to the syntax error.