import-js/eslint-plugin-import

Request: option to let `no-duplicates` force type & normal imports to be de-duplicated

开放

#909 创建于 2017年8月4日

 (9 条评论) (5 个反应) (0 位负责人)JavaScript (1,549 个派生)batch import
enhancementflowhelp wanted

仓库指标

星标
 (5,938 个星标)
PR 合并指标
 (平均合并 138天 22小时) (30 天内合并 3 个 PR)

描述

#225 asked to allow both type & normal imports to be allowed together, e.g.

import {someFunction} from '../src/foo';
import type {someType} from '../src/foo';

This was requested because according to the author there was no way to merge these together at that point in time.

However, currently flow does support merging these imports together:

import { someFunction, type someType } from '../src/foo';

I think it would therefore be useful if no-duplicates could be configured to have the same behaviour as before #225, i.e. to require type & normal imports to be merged.

贡献者指南