Skip to content
This repository has been archived by the owner on Nov 21, 2023. It is now read-only.

Commit

Permalink
Lint JS
Browse files Browse the repository at this point in the history
  • Loading branch information
dotherightthing committed Jan 7, 2021
1 parent 90b8f03 commit 63ea244
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions js/_frontend.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ const wpdtrtAnchorlinksUi = {
* @param {object} changes - Observed changes
* @param {object} observer - Intersection Observer
*/
highlightAnchorLink: (changes, observer) => {
highlightAnchorLink: (changes, observer) => { // eslint-disable-line no-unused-vars
const $ = wpdtrtAnchorlinksUi.jQuery;

changes.forEach(change => {
Expand Down Expand Up @@ -256,7 +256,7 @@ const wpdtrtAnchorlinksUi = {
* @param {object} changes - Observed changes
* @param {object} observer - Intersection Observer
*/
pinAnchorLinksList: (changes, observer) => {
pinAnchorLinksList: (changes, observer) => { // eslint-disable-line no-unused-vars
const $ = wpdtrtAnchorlinksUi.jQuery;
const $stickyTarget = $('.wpdtrt-anchorlinks');
const stickyClass = 'wpdtrt-anchorlinks--sticky';
Expand Down Expand Up @@ -330,11 +330,12 @@ const wpdtrtAnchorlinksUi = {
// but this gives us control over the max-height

if (pinController.length) {
const pinAnchorLinksListObserver = new IntersectionObserver(wpdtrtAnchorlinksUi.pinAnchorLinksList, {
root: null, // relative to document viewport
rootMargin: '0px', // margin around root, unitless values not allowed
threshold: 0.1 // visible amount of item shown in relation to root
});
const pinAnchorLinksListObserver = new IntersectionObserver(wpdtrtAnchorlinksUi.pinAnchorLinksList,
{
root: null, // relative to document viewport
rootMargin: '0px', // margin around root, unitless values not allowed
threshold: 0.1 // visible amount of item shown in relation to root
});

pinAnchorLinksListObserver.observe(pinController.get(0));
}
Expand Down Expand Up @@ -363,7 +364,7 @@ const wpdtrtAnchorlinksUi = {
};

jQuery(document).ready(($) => {
const config = wpdtrt_anchorlinks_config; // eslint-disable-line camelcase
const config = wpdtrt_anchorlinks_config; // eslint-disable-line camelcase, no-unused-vars
wpdtrtAnchorlinksUi.jQuery = $;
wpdtrtAnchorlinksUi.init();
});

0 comments on commit 63ea244

Please sign in to comment.