From cb4da09a8be23c642f7cd8e4592b1154d26dbf8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Machulda?= Date: Wed, 10 Apr 2024 11:33:25 +0200 Subject: [PATCH] Style: Fix errors detected by @lmc-eu/eslint-config-typescript rules --- src/LmcCookieConsentManager.ts | 4 ++-- src/utils.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/LmcCookieConsentManager.ts b/src/LmcCookieConsentManager.ts index ab729cfc..bd6bfac0 100644 --- a/src/LmcCookieConsentManager.ts +++ b/src/LmcCookieConsentManager.ts @@ -12,9 +12,9 @@ import { import { CookieConsentCategory, DisplayMode, SecondaryButtonMode } from './constants'; import { assembleLanguagesConfig } from './languages/loader'; -/* eslint-disable-next-line no-unused-vars */ +/* eslint-disable-next-line no-unused-vars, @typescript-eslint/no-empty-function */ const noopAcceptCallback: OnAcceptCallback = (cookieConsent) => {}; -/* eslint-disable-next-line no-unused-vars */ +/* eslint-disable-next-line no-unused-vars, @typescript-eslint/no-empty-function */ const noopChangeCallback: OnChangeCallback = (cookieConsent, categories) => {}; const defaultOptions: CookieConsentManagerOptions = { diff --git a/src/utils.ts b/src/utils.ts index cc11d657..91619352 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -1,7 +1,7 @@ import { CookieConsentCategoryValues, CookieTableCategories, Values, VanillaCookieConsent } from './types'; import { CookieConsentCategory, SecondaryButtonMode } from './constants'; -export const addSeparators = (strings: string[], and: string = ''): string => +export const addSeparators = (strings: string[], and = ''): string => strings.reduce((accumulator: string, string: string, i: number) => { if (i === 0) { return `${accumulator}${string}`;