import-js/eslint-plugin-import

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

Aberta

#2.502 aberto em 19 de jul. de 2022

 (4 comentários) (4 reações) (0 responsável)JavaScript (1.549 forks)batch import
bughelp wantedtypescript

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

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?

Guia do colaborador