cometkim / gatsby-plugin-typegen

Let's give developers using GatsbyJS better DX with extreme type-safety
https://www.gatsbyjs.org/packages/gatsby-plugin-typegen/
MIT License
204 stars 25 forks source link

Migrate the plugin options validation to be schema-based #122

Closed cometkim closed 2 years ago

cometkim commented 3 years ago

Currently, this plugin is using custom validation logic (which is not pretty) for the plugin options and provides type definition separately.

I recently realized that Gatsby already has an API for it.

https://www.gatsbyjs.com/docs/node-apis/#pluginOptionsSchema

It can be migrated to the schema-based validation

cometkim commented 2 years ago

This has been done in v3 and will be released soon