contentful-typescript-codegen icon indicating copy to clipboard operation
contentful-typescript-codegen copied to clipboard

Imports { Document } when it is not used

Open grantglidewell opened this issue 4 years ago • 2 comments

When we generate our types we are seeing import { Document } from '@contentful/rich-text-types'; when that type isnt used anywhere. The result is that our type checks and thus builds fail.

I believe this is being imported because we have a string value in one of our union types in contentful that is 'Document'.

grantglidewell avatar Nov 05 '21 20:11 grantglidewell

😮‍💨 its uh.... just part of the renderer template.

Please ping me if this library is still maintained and Ill work on a fix for it. Otherwise Ill spend some time transitioning this over to graphql codegen

grantglidewell avatar Nov 05 '21 20:11 grantglidewell

Running into the same issue and have worked around it using ESLint's ignore option. Would be great to get the proposed fix merged but not sure if this lib is still maintained...

wardoost avatar Jun 09 '22 02:06 wardoost