import-js/eslint-plugin-import

import/no-duplicates does not catch all duplicates

Open

#1,456 opened on Aug 19, 2019

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

Repository metrics

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

Description

Hi, I came across an example in our codebase where this rule did not catch the duplicate import.

import { ProfilePictureCard, SectionCard } from 'our-component-library';
import type { NativeEventHandler } from 'our-component-library';
// Expected ^^ to trigger error, but it did not. 

However this is correctly reported:

import { ProfilePictureCard, SectionCard } from 'our-component-library';
import { type NativeEventHandler } from 'our-component-library';
// ^^ Triggers error. 

Contributor guide