import-js/eslint-plugin-import

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

Aperta

#909 aperta il 4 ago 2017

 (9 commenti) (5 reazioni) (0 assegnatari)JavaScript (1549 fork)batch import
enhancementflowhelp wanted

Metriche repository

Star
 (5938 stelle)
Metriche merge PR
 (Merge medio 138g 22h) (3 PR mergiate in 30 g)

Descrizione

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

Guida contributor