eslint-plugin-import icon indicating copy to clipboard operation
eslint-plugin-import copied to clipboard

[New] `no-duplicates`: add `combineTypeImports` option to de-duplicate flow type imports

Open christianvuerings opened this issue 3 years ago • 3 comments

Description

#334 always duplicated flow type imports. In this diff we add the combineTypeImports option to be able to de-duplicate flow type imports.

TypeScript support can be added later, for now we only support combining regular & flow type imports.

Fixes: #909

Related PRs / Issues

  • https://github.com/import-js/eslint-plugin-import/pull/334: Check duplicates for normal imports and flow type imports separately
  • https://github.com/import-js/eslint-plugin-import/issues/909: Request: option to let no-duplicates force type & normal imports to be de-duplicated

christianvuerings avatar Sep 17 '21 16:09 christianvuerings

Codecov Report

Merging #2229 (806a09b) into main (7c382f0) will increase coverage by 0.01%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2229      +/-   ##
==========================================
+ Coverage   84.02%   84.03%   +0.01%     
==========================================
  Files          94       94              
  Lines        3017     3020       +3     
  Branches      898      900       +2     
==========================================
+ Hits         2535     2538       +3     
  Misses        482      482              
Impacted Files Coverage Δ
src/rules/no-duplicates.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 7c382f0...806a09b. Read the comment docs.

codecov[bot] avatar Sep 17 '21 17:09 codecov[bot]

Closing since I no longer plan to work on this. Anyone should feel free to open a new PR and can use this PR as inspiration.

christianvuerings avatar Jan 22 '24 12:01 christianvuerings

That’s fine, but let’s leave it open so this PR can be updated later :-)

ljharb avatar Jan 22 '24 18:01 ljharb