Skip to content

Commit

Permalink
feat: validate pluginType to be all-caps
Browse files Browse the repository at this point in the history
  • Loading branch information
KaiVandivier committed May 31, 2024
1 parent 73af4c7 commit cb75496
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions cli/src/lib/parseConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,18 @@ const validateConfig = (config) => {
)
}
})

const { pluginType } = config
if (pluginType?.toUpperCase() !== pluginType) {
throw new Error(
`Field ${chalk.bold(
'pluginType'
)} must be an all-uppercase string. Got: ${chalk.bold(
`"${pluginType}"`
)}`
)
}

return true
}

Expand Down

0 comments on commit cb75496

Please sign in to comment.