Skip to content

Commit

Permalink
TDW-2277 lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bosco-ensemble committed Apr 9, 2024
1 parent a57a677 commit ab97224
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
13 changes: 6 additions & 7 deletions scripts/delayed.js
Original file line number Diff line number Diff line change
Expand Up @@ -568,8 +568,7 @@ export function initGigya() {
if (userButton) userButton.replaceWith(userButton.cloneNode(true));
const favoriteButtons = document.querySelectorAll('.leaderboard-favorite-button');
if (favoriteButtons) favoriteButtons.forEach((btn) => btn.replaceWith(btn.cloneNode(true)));
loadScript('https://cdns.gigya.com/JS/socialize.js?apikey=3__4H034SWkmoUfkZ_ikv8tqNIaTA0UIwoX5rsEk96Ebk5vkojWtKRZixx60tZZdob', setupGigya,
);
loadScript('https://cdns.gigya.com/JS/socialize.js?apikey=3__4H034SWkmoUfkZ_ikv8tqNIaTA0UIwoX5rsEk96Ebk5vkojWtKRZixx60tZZdob', setupGigya,);

Check failure on line 571 in scripts/delayed.js

View workflow job for this annotation

GitHub Actions / build

Unexpected trailing comma
}

initGigya();
Expand Down Expand Up @@ -658,7 +657,7 @@ function getCookie(cookieName) {
return null;
}

const OptanonWrapper = (async function() {
const OptanonWrapper = (async function () {

Check warning on line 660 in scripts/delayed.js

View workflow job for this annotation

GitHub Actions / build

Unexpected unnamed async function
console.log('test');

Check warning on line 661 in scripts/delayed.js

View workflow job for this annotation

GitHub Actions / build

Unexpected console statement
const geoInfo = window.Optanon.getGeolocationData();
Object.keys(geoInfo).forEach((key) => {
Expand All @@ -680,9 +679,9 @@ const OptanonWrapper = (async function() {
}
}
sendAnalyticsPageEvent();
})
});

export const loadAds = (function() {
export const loadAds = (function () {

Check warning on line 684 in scripts/delayed.js

View workflow job for this annotation

GitHub Actions / build

Unexpected unnamed function
const otId = placeholders.onetrustId;
if (otId) {
const cookieScript = loadScript('https://cdn.cookielaw.org/scripttemplates/otSDKStub.js');
Expand Down Expand Up @@ -714,7 +713,7 @@ export const loadAds = (function() {
loadBlock(marketingBlock);
}
}
})
});

async function loadLiveChat() {
const liveChat = getMetadata('live-chat');
Expand Down Expand Up @@ -755,4 +754,4 @@ if (hasFevo) {
const hasWeFevo = document.querySelector('a.we-fevo-btn');
if (hasWeFevo) {
injectWeFevoScript();
}
}
6 changes: 2 additions & 4 deletions scripts/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
* governing permissions and limitations under the License.
*/

import {loadAds} from "./delayed.js";
// eslint-disable-next-line import/no-cycle
import { loadAds } from './delayed.js';

/**
* log RUM if part of the sample.
Expand Down Expand Up @@ -703,9 +704,6 @@ async function waitForLCP() {
});
}

// eslint-disable-next-line no-use-before-define
const placeholders = await fetchPlaceholders();

/**
* Decorates the page.
*/
Expand Down

0 comments on commit ab97224

Please sign in to comment.