import-js/eslint-plugin-import

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

Open

#3.035 geöffnet am 15. Aug. 2024

Auf GitHub ansehen
 (1 Kommentar) (0 Reaktionen) (0 zugewiesene Personen)JavaScript (4.946 Stars) (1.540 Forks)batch import
bughelp wantedtypescript

Beschreibung

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