We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 705ff91 commit 5791ac3Copy full SHA for 5791ac3
packages/gatsby-source-filesystem/src/gatsby-node.js
@@ -146,6 +146,15 @@ const createFSMachine = (
146
return interpret(fsMachine).start()
147
}
148
149
+if (process.env.GATSBY_EXPERIMENTAL_PLUGIN_OPTION_VALIDATION) {
150
+ exports.pluginOptionsSchema = ({ Joi }) =>
151
+ Joi.object({
152
+ name: Joi.string(),
153
+ path: Joi.string(),
154
+ ignore: Joi.array().items(Joi.string()),
155
+ })
156
+}
157
+
158
exports.sourceNodes = (api, pluginOptions) => {
159
// Validate that the path exists.
160
if (!fs.existsSync(pluginOptions.path)) {
0 commit comments