Closed vincent-aviva closed 2 years ago
Hey @vincent-aviva,
Quite a coincidence, as this was also an issue from our internal teams (https://github.com/kontent-ai/model-generator-js/issues/30). I have fixed this already and just released in to public in latest version. There were few more scenarios to cover (e.g. ignoring guidelines & snippet elements) to ensure the imports omitted in proper scenarios.
Thank you very much for creating the PR, but I have to close it this time :-(
When you have a content type that consist of only a snippet then the generator creates code that contain lint errors, example below.
With this PR the generation of the first import is removed as well as the Empty IContentItem at the type definition.
import { IContentItem, Elements } from '@kontent-ai/delivery-sdk' import { GeneralAssetFromBynder } from '../content-type-snippets/generalAssetFromBynder'
/**