pzavolinsky / ts-unused-exports

ts-unused-exports finds unused exported symbols in your Typescript project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ignore getServerSideProps for Next.js codebases

dshook opened this issue · comments

Hi there, thanks for the work on this!

I'm wondering if there's a way to excluded the getServerSideProps and default exports for Next.js projects with its file based router.

You can of course exclude the whole file with something like ts-unused-exports tsconfig.json | grep -v getServerSideProps but this will miss any other unused exports from the files as well.

hm sounds tricky!

For now, I'd disable such warnings with a comment:

// ts-unused-exports:disable-next-line
commented

Maybe we can add a --excludeSignatureFromReport flag?