import-js/eslint-plugin-import

Mixed `type` imports does not trigger `import/no-duplicates`

Open

#3,035 opened on Aug 15, 2024

 (2 comments) (0 reactions) (0 assignees)JavaScript (1,550 forks)batch import
bughelp wantedtypescript

Repository metrics

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

Description

This correctly triggers import/no-duplicates:

import { useEffect } from "react";
import { useState } from "react";

But this doesn't:

import { type ComponentProps, useEffect } from "react";
import { useState } from "react";

The rule should merge the imports above into:

import { type ComponentProps, useEffect, useState } from "react";

Contributor guide