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/News.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/models/News.ts') diff --git a/src/models/News.ts b/src/models/News.ts index a6ff86dda..4fc21f590 100644 --- a/src/models/News.ts +++ b/src/models/News.ts @@ -1,5 +1,3 @@ -// @flow - import { ifUndefinedString, ifUndefinedBoolean } from '../jsUtils'; interface INews { @@ -20,11 +18,11 @@ export default class News { constructor(data: INews) { if (!data) { - throw Error('News config not valid'); + throw new Error('News config not valid'); } if (!data.id) { - throw Error('News requires Id'); + throw new Error('News requires Id'); } this.id = data.id; -- cgit v1.2.3-70-g09d2