Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore getServerSideProps for Next.js codebases #217

Open
dshook opened this issue Jul 6, 2022 · 2 comments
Open

Ignore getServerSideProps for Next.js codebases #217

dshook opened this issue Jul 6, 2022 · 2 comments
Labels
enhancement has-workaround A bug, but it has a workaround help wanted

Comments

@dshook
Copy link

dshook commented Jul 6, 2022

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.

@mrseanryan
Copy link
Collaborator

hm sounds tricky!

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

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

@mrseanryan mrseanryan added help wanted has-workaround A bug, but it has a workaround labels Dec 11, 2022
@mon-jai
Copy link

mon-jai commented Jan 12, 2023

Maybe we can add a --excludeSignatureFromReport flag?

@mrseanryan mrseanryan pinned this issue Feb 12, 2023
@mrseanryan mrseanryan unpinned this issue May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement has-workaround A bug, but it has a workaround help wanted
Projects
None yet
Development

No branches or pull requests

3 participants