import-js/eslint-plugin-import

Type only exports get flagged as not used by import/no-unused-modules

Aperta

#2502 aperta il 19 lug 2022

 (4 commenti) (4 reazioni) (0 assegnatari)JavaScript (1549 fork)batch import
bughelp wantedtypescript

Metriche repository

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

Descrizione

I have one file which uses a type export:

export type TopNavStore = {

Which is clearly imported with a type only import in another file:

import { createStore, ZustandProvider, type TopNavStore } from './store';

But it gets flagged with : 35:1 warning exported declaration 'TopNavStore' not used within other modules import/no-unused-modules

The file is a .tsx file from a .ts file if that matters?

Guida contributor