import-js/eslint-plugin-import

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

Open

#3,035 创建于 2024年8月15日

在 GitHub 查看
 (1 评论) (0 反应) (0 负责人)JavaScript (1,540 fork)batch import
bughelp wantedtypescript

仓库指标

Star
 (4,946 star)
PR 合并指标
 (平均合并 138天 22小时) (30 天内合并 3 个 PR)

描述

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

贡献者指南