alphagov / govuk-prototype-kit

Rapidly create HTML prototypes of GOV.UK services
https://prototype-kit.service.gov.uk
MIT License
303 stars 236 forks source link

Plugin validator should support nunjucks functions #2375

Closed BenSurgisonGDS closed 9 months ago

BenSurgisonGDS commented 9 months ago

The plugins validator should allow nunjucks functions to be included by validating the prototype config key nunjucksFunctions

BenSurgisonGDS commented 9 months ago

Looks good, seems to run the checkPathExists() validation still

Would be great to maintain a JSDoc definition so we don't lose track of fields like this again in future? There's one I made already over in 39a3b41 which can help catch issues too

Otherwise the schema comment in plugins.js is very out of date:

https://github.com/alphagov/govuk-prototype-kit/blob/1fc78df44cb816ccd748e4a58a03a58ff81ba6f7/lib/plugins/plugins.js#L14-L30

Thank you for spotting this. I'll update this in a separate PR