From 763aecad93e4c987fbdccb9cc5c4cda457645f6a Mon Sep 17 00:00:00 2001 From: Miodec Date: Sat, 17 Feb 2024 17:24:41 +0100 Subject: [PATCH] chore: add no mixed operators rule --- .eslintrc.json | 8 +++++++- frontend/src/ts/popups/quote-approve-popup.ts | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index bf4b7000b..734ac1dcf 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -41,7 +41,13 @@ "ignore": ["^./constants/firebase-config$"] } ], - "import/no-duplicates": "off" + "import/no-duplicates": "off", + "no-mixed-operators": [ + "error", + { + "groups": [["+", "??"]] + } + ] }, "settings": { "import/resolver": { diff --git a/frontend/src/ts/popups/quote-approve-popup.ts b/frontend/src/ts/popups/quote-approve-popup.ts index 3241822a8..26f62286e 100644 --- a/frontend/src/ts/popups/quote-approve-popup.ts +++ b/frontend/src/ts/popups/quote-approve-popup.ts @@ -156,7 +156,7 @@ $("#popups").on("click", "#quoteApprovePopup .quote .approve", async (e) => { ); } - Notifications.add("Quote approved. " + response.message ?? "", 1); + Notifications.add(`Quote approved. ${response.message ?? ""}`, 1); quotes.splice(index, 1); updateList(); }); @@ -215,7 +215,7 @@ $("#popups").on("click", "#quoteApprovePopup .quote .edit", async (e) => { ); } - Notifications.add("Quote edited and approved. " + response.message ?? "", 1); + Notifications.add(`Quote edited and approved. ${response.message ?? ""}`, 1); quotes.splice(index, 1); updateList(); });