From 970fd603df017f29de5a5de00ced79553ce69838 Mon Sep 17 00:00:00 2001 From: Rob Rusher Date: Tue, 16 Jan 2024 08:45:07 -0700 Subject: [PATCH] disable linting on specific functions --- blocks/hero-slides/hero-slides.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/blocks/hero-slides/hero-slides.js b/blocks/hero-slides/hero-slides.js index ecfdc9a0..ff46460c 100644 --- a/blocks/hero-slides/hero-slides.js +++ b/blocks/hero-slides/hero-slides.js @@ -1,5 +1,6 @@ import { createOptimizedPicture, readBlockConfig } from '../../scripts/aem.js'; +// eslint-disable-next-line no-unused-vars async function fetchListings(config) { const resp = await fetch(`${window.hlx.codeBasePath}/drafts/rrusher/listings.json`); // eslint-disable-next-line no-return-await @@ -13,12 +14,14 @@ function setupSlideControls(block) { const paging = block.querySelector('.slideshow-buttons div'); paging.innerText = paging.innerText.replace(/\d+/, index + 1); // automatically advance slides. Reset timer when user interacts with the slideshow + // eslint-disable-next-line no-use-before-define autoplaySlides(); } let autoSlideInterval = null; function autoplaySlides() { clearInterval(autoSlideInterval); + // eslint-disable-next-line no-use-before-define autoSlideInterval = setInterval(() => advanceSlides(+1), 3000); } @@ -74,7 +77,7 @@ function plainText(text) { */ export default async function decorate(block) { const config = readBlockConfig(block); - const listings = await fetchListings(config); + const listings = await fetchListings(config); block.textContent = ''; const { advanceSlides } = setupSlideControls(block);