import-js/eslint-plugin-import

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

Aberta

#909 aberto em 4 de ago. de 2017

 (9 comentários) (5 reações) (0 responsável)JavaScript (1.549 forks)batch import
enhancementflowhelp wanted

Métricas do repositório

Stars
 (5.940 estrelas)
Métricas de merge de PR
 (Mesclagem média 138d 22h) (3 fundiu PRs em 30d)

Description

#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.

Guia do colaborador