From 95df3522a15631abc51a4295cae0ea401a8d4e1e Mon Sep 17 00:00:00 2001 From: Markus Hatvan Date: Tue, 14 Sep 2021 19:58:52 +0200 Subject: feat: add eslint-plugin-unicorn (#1936) --- src/models/Recipe.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/models/Recipe.ts') diff --git a/src/models/Recipe.ts b/src/models/Recipe.ts index 0a93fbc5a..6022fb520 100644 --- a/src/models/Recipe.ts +++ b/src/models/Recipe.ts @@ -68,16 +68,16 @@ export default class Recipe { // TODO: Need to reconcile which of these are optional/mandatory constructor(data: IRecipe) { if (!data) { - throw Error('Recipe config not valid'); + throw new Error('Recipe config not valid'); } if (!data.id) { // Ferdi 4 recipes do not have an Id - throw Error(`Recipe '${data.name}' requires Id`); + throw new Error(`Recipe '${data.name}' requires Id`); } if (!semver.valid(data.version)) { - throw Error(`Version ${data.version} of recipe '${data.name}' is not a valid semver version`); + throw new Error(`Version ${data.version} of recipe '${data.name}' is not a valid semver version`); } this.id = data.id || this.id; -- cgit v1.2.3-54-g00ecf