import-js/eslint-plugin-import

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

Open

#3.035 aberto em 15 de ago. de 2024

Ver no GitHub
 (1 comment) (0 reactions) (0 assignees)JavaScript (4.946 stars) (1.540 forks)batch import
bughelp wantedtypescript

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";

Guia do colaborador