Skip to content

Commit

Permalink
refactor(options-validator): leveraged the extracted language plugins…
Browse files Browse the repository at this point in the history
… schema
  • Loading branch information
travi committed Jul 6, 2023
1 parent fdac934 commit 6cbc532
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/options-validator.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import joi from 'joi';
import * as hoek from '@hapi/hoek';

import languagePluginsSchema from './language/schema';

export function validate(options) {
const schema = joi.object({
languages: joi.object().pattern(/^/, joi.func().arity(1)),
languages: languagePluginsSchema,
overrides: joi.object({copyrightHolder: joi.string()}),
vcsHosts: joi.object().pattern(/^/, joi.object({
scaffolder: joi.func().arity(1).required(),
Expand Down

0 comments on commit 6cbc532

Please sign in to comment.