import-js/eslint-plugin-import

`no-duplicates` rule has incorrect autofix when comment is present

Open

#1,838 opened on Jun 26, 2020

View on GitHub
 (0 comments) (0 reactions) (0 assignees)JavaScript (1,540 forks)batch import
bughelp wanted

Repository metrics

Stars
 (4,946 stars)
PR merge metrics
 (Avg merge 138d 22h) (3 merged PRs in 30d)

Description

Original:

import { set } from '@ember/object';
import EmberObject, { observer, computed } from '@ember/object'; // some comment

Autofixes to (invalid):

import EmberObject, { set } from '@ember/object';
import EmberObject, { observer, computed } from '@ember/object'; // some comment

Without the comment, this correctly autofixes to:

import EmberObject, { set, observer, computed } from '@ember/object';

Contributor guide