diff --git a/.eslintrc.json b/.eslintrc.json
index bfa8c17fa0c..815a1e9d961 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -14,6 +14,7 @@
"prettier/prettier": [
"error",
{
+ "comma-dangle": "never",
"endOfLine": "auto"
}
],
diff --git a/copy-db.js b/copy-db.js
index c584760d88d..0484cb81f31 100644
--- a/copy-db.js
+++ b/copy-db.js
@@ -9,7 +9,7 @@ const APP = process.argv.includes(`--prod`) ? PROD_APP : STAGE_APP;
if (APP === STAGE_APP) {
console.log(
- `Running db copy for staging, run with --prod to run for production`
+ `Running db copy for staging, run with --prod to run for production`,
);
}
@@ -100,7 +100,7 @@ postgres(`createdb ${DB_FLAGS} wagtail`);
console.log(`Building user roles...`);
[ROLE, `datastudio`, `datagrip-cade`].forEach((role) =>
- postgres(`createuser ${DB_FLAGS} -s ${role}`, true)
+ postgres(`createuser ${DB_FLAGS} -s ${role}`, true),
);
console.log(`Importing database snapshot...`);
@@ -117,7 +117,7 @@ run(`inv createsuperuser`, true, silent);
console.log(`Migrating database to match current branch migrations...`);
run(
- `docker exec ${IMAGE_NAMES.BACKEND} ./dockerpythonvenv/bin/python network-api/manage.py migrate`
+ `docker exec ${IMAGE_NAMES.BACKEND} ./dockerpythonvenv/bin/python network-api/manage.py migrate`,
);
console.log(`Stopping docker images...`);
diff --git a/source/js/buyers-guide/analytics-events.js b/source/js/buyers-guide/analytics-events.js
index d4c5c70e301..50b77b99cc8 100644
--- a/source/js/buyers-guide/analytics-events.js
+++ b/source/js/buyers-guide/analytics-events.js
@@ -123,7 +123,7 @@ function bindCheckboxCheckedGA(selector, eventData) {
ReactGA.event(eventData);
}
},
- true
+ true,
);
}
@@ -156,7 +156,7 @@ function trackSearchBoxUsage() {
sessionStorage.setItem(SESSION_KEY, true);
},
- true
+ true,
);
}
@@ -166,7 +166,7 @@ function trackSearchBoxUsage() {
function trackGoBackToAllProductsLink() {
const link = document.querySelector("body.catalog .go-back-to-all-link");
const searchBox = document.querySelector(
- "body.catalog input#product-filter-search-input"
+ "body.catalog input#product-filter-search-input",
);
if (!(link && searchBox)) {
@@ -183,7 +183,7 @@ function trackGoBackToAllProductsLink() {
label: `All link tap for ${searchBox.value}`,
});
},
- true
+ true,
);
}
diff --git a/source/js/buyers-guide/bg-main.js b/source/js/buyers-guide/bg-main.js
index 261224db371..832edeb50d4 100644
--- a/source/js/buyers-guide/bg-main.js
+++ b/source/js/buyers-guide/bg-main.js
@@ -48,7 +48,7 @@ let main = {
initializeSentry(
env.SENTRY_DSN,
env.RELEASE_VERSION,
- env.SENTRY_ENVIRONMENT
+ env.SENTRY_ENVIRONMENT,
);
}
diff --git a/source/js/buyers-guide/components/creepiness-chart/creepiness-chart.jsx b/source/js/buyers-guide/components/creepiness-chart/creepiness-chart.jsx
index 70f7fda50f3..92d1e20e80d 100644
--- a/source/js/buyers-guide/components/creepiness-chart/creepiness-chart.jsx
+++ b/source/js/buyers-guide/components/creepiness-chart/creepiness-chart.jsx
@@ -63,7 +63,7 @@ class CreepChart extends Component {
{this.state.creepinessData.map((data, index) => {
let percent = Math.round(
- (100 * data.value) / this.state.totalCreepiness
+ (100 * data.value) / this.state.totalCreepiness,
);
let voteColumn =
this.props.userVoteGroup === index ? `your-vote` : ``;
diff --git a/source/js/buyers-guide/components/creepometer/creepometer.jsx b/source/js/buyers-guide/components/creepometer/creepometer.jsx
index 6c459bfa08d..06722230316 100644
--- a/source/js/buyers-guide/components/creepometer/creepometer.jsx
+++ b/source/js/buyers-guide/components/creepometer/creepometer.jsx
@@ -181,7 +181,7 @@ class Creepometer extends Component {
*/
render() {
let frameOffset = Math.round(
- (this.state.percentage * (this.faceCount - 1)) / 100
+ (this.state.percentage * (this.faceCount - 1)) / 100,
);
let trackheadOpts = {
diff --git a/source/js/buyers-guide/components/product-quiz/product-quiz.jsx b/source/js/buyers-guide/components/product-quiz/product-quiz.jsx
index 56893bb3e43..31f82833e37 100644
--- a/source/js/buyers-guide/components/product-quiz/product-quiz.jsx
+++ b/source/js/buyers-guide/components/product-quiz/product-quiz.jsx
@@ -28,7 +28,7 @@ class ProductQuiz extends Component {
componentDidMount() {
this.setState({
numBad: this.state.selectedChoices.filter(
- (choice) => choice.points === POINTS.bad
+ (choice) => choice.points === POINTS.bad,
).length,
score: this.state.selectedChoices.reduce((acc, choice) => {
return acc + choice.points;
@@ -41,7 +41,7 @@ class ProductQuiz extends Component {
this.setState({
// find out how many "bad" products are selected
numBad: this.state.selectedChoices.filter(
- (choice) => choice.points === POINTS.bad
+ (choice) => choice.points === POINTS.bad,
).length,
// calculate the score
score: this.state.selectedChoices.reduce((acc, choice) => {
diff --git a/source/js/buyers-guide/components/social-share/product-quiz-share-buttons.jsx b/source/js/buyers-guide/components/social-share/product-quiz-share-buttons.jsx
index 346f1b8b2ee..cfd0bb5edac 100644
--- a/source/js/buyers-guide/components/social-share/product-quiz-share-buttons.jsx
+++ b/source/js/buyers-guide/components/social-share/product-quiz-share-buttons.jsx
@@ -55,7 +55,7 @@ class ProductQuizShareButtons extends Component {
shareButtonClicked(event, shareProgressButtonId) {
if (shareProgressButtonId) {
const shareProgressButton = document.querySelector(
- `#${shareProgressButtonId} a`
+ `#${shareProgressButtonId} a`,
);
if (shareProgressButton) {
@@ -81,18 +81,18 @@ class ProductQuizShareButtons extends Component {
{this.renderFacebookButton(
- Share on Facebook
+ Share on Facebook,
)}
{this.renderTwitterButton(
- Share on Twitter
+ Share on Twitter,
)}
{this.renderEmailButton(
- Share by Email
+ Share by Email,
)}
{this.renderCopyLinkButton(
- Copy to clipboard
+ Copy to clipboard,
)}
diff --git a/source/js/buyers-guide/components/social-share/social-share.jsx b/source/js/buyers-guide/components/social-share/social-share.jsx
index 20df6cc2d48..87726bdf1d7 100644
--- a/source/js/buyers-guide/components/social-share/social-share.jsx
+++ b/source/js/buyers-guide/components/social-share/social-share.jsx
@@ -33,7 +33,7 @@ const SocialShareLink = (props) => {
srLabel = `Twitter`;
shareEvent.label += `to twitter`;
link = `https://twitter.com/intent/tweet?text=${encodeURIComponent(
- shareText
+ shareText,
)}`;
}
diff --git a/source/js/buyers-guide/homepage-c-slider.js b/source/js/buyers-guide/homepage-c-slider.js
index fe139c21532..f4b64616838 100644
--- a/source/js/buyers-guide/homepage-c-slider.js
+++ b/source/js/buyers-guide/homepage-c-slider.js
@@ -72,7 +72,7 @@ export default {
// Figure out which face to show while scrolling:
let dingFilter = !!document.querySelector(`body.show-ding-only`);
let visible = Array.from(products).filter((v) =>
- isElementInViewport(v, dingFilter)
+ isElementInViewport(v, dingFilter),
);
let n = visible.length;
@@ -96,16 +96,16 @@ export default {
MINIMUM_HAPPINESS_RATING,
MAXIMUM_CREEPINESS_RATING,
0,
- 100
+ 100,
),
1,
- 100
+ 100,
);
// The averageCreepiness will be in range [1,100] so we can dec1 the
// valueto make sure we're in frame range [0,frames.length-1]:
let frame = Math.round(
- ((SPRITE_FRAME_COUNT - 1) * (mappedAverageCreepiness - 1)) / 100
+ ((SPRITE_FRAME_COUNT - 1) * (mappedAverageCreepiness - 1)) / 100,
);
face.style.backgroundPositionY = `${-frame * EMOJI_FRAME_HEIGHT}px`;
@@ -120,19 +120,19 @@ export default {
} else {
let format = pgettext(
"Creepiness label followed by an exclamation mark",
- "%(label)s!"
+ "%(label)s!",
);
bubbleText.textContent = interpolate(
format,
{ label: CREEPINESS_LABELS[bin] },
- true
+ true,
);
bubble.classList.remove(`d-none`);
}
},
{
passive: true, // remember not to bog down the UI thread.
- }
+ },
);
/**
@@ -196,7 +196,7 @@ export default {
},
{
passive: true, // remember not to bog down the UI thread.
- }
+ },
);
}
},
diff --git a/source/js/buyers-guide/inject-react/creep-vote.js b/source/js/buyers-guide/inject-react/creep-vote.js
index 80648c19a1c..c1f1be16c7b 100644
--- a/source/js/buyers-guide/inject-react/creep-vote.js
+++ b/source/js/buyers-guide/inject-react/creep-vote.js
@@ -42,9 +42,9 @@ export default (apps, siteUrl) => {
votes={votes}
whenLoaded={() => resolve()}
joinUsApiUrl={`${siteUrl}/api/campaign/signups/0/`}
- />
+ />,
);
- })
+ }),
);
});
};
diff --git a/source/js/buyers-guide/inject-react/product-quiz.js b/source/js/buyers-guide/inject-react/product-quiz.js
index a91f5bf4012..8f04e8ef68b 100644
--- a/source/js/buyers-guide/inject-react/product-quiz.js
+++ b/source/js/buyers-guide/inject-react/product-quiz.js
@@ -17,9 +17,9 @@ export default (apps, siteUrl) => {
whenLoaded={() => resolve()}
joinUsApiUrl={`${siteUrl}/api/campaign/signups/0/`}
pniHomeUrl={`${siteUrl}/privacynotincluded/`}
- />
+ />,
);
- })
+ }),
);
});
};
diff --git a/source/js/buyers-guide/newsletter-box.js b/source/js/buyers-guide/newsletter-box.js
index 20a35569972..1ff00917f00 100644
--- a/source/js/buyers-guide/newsletter-box.js
+++ b/source/js/buyers-guide/newsletter-box.js
@@ -6,18 +6,18 @@
const NewsletterBox = {
toggleVisibilityClasses: () => {
const buyersGuideNewsletterBox = document.querySelectorAll(
- ".buyersguide-newsletter-box"
+ ".buyersguide-newsletter-box",
);
// Used for toggle visibility for buyersguide newsletter container
if (buyersGuideNewsletterBox.length > 0) {
buyersGuideNewsletterBox.forEach((box) =>
- box.classList.remove("tw-hidden")
+ box.classList.remove("tw-hidden"),
);
}
// Used for buyersguide product review grid toggle visibility
const buyersGuideGridContainer = document.querySelector(
- "#product-grid-newsletter-signup"
+ "#product-grid-newsletter-signup",
);
if (buyersGuideGridContainer) {
buyersGuideGridContainer.classList.add("tw-flex");
diff --git a/source/js/buyers-guide/product-tab.js b/source/js/buyers-guide/product-tab.js
index 45ddb8c13b4..4daf391d2b8 100644
--- a/source/js/buyers-guide/product-tab.js
+++ b/source/js/buyers-guide/product-tab.js
@@ -10,7 +10,7 @@ function setHighlight(target) {
button.classList.remove(
"tw-bg-white",
"tw-text-black",
- "hover:tw-text-blue-80"
+ "hover:tw-text-blue-80",
);
button.classList.add("tw-bg-black", "tw-text-white");
button.setAttribute("aria-selected", "true");
diff --git a/source/js/buyers-guide/search/history.js b/source/js/buyers-guide/search/history.js
index 54bfaffa240..642d7f159a1 100644
--- a/source/js/buyers-guide/search/history.js
+++ b/source/js/buyers-guide/search/history.js
@@ -16,21 +16,21 @@ export function setupHistoryManagement(
searchBar,
searchInput,
mobileSearchBar,
- mobileSearchInput
+ mobileSearchInput,
) {
setupPopStateHandler(
instance,
searchBar,
searchInput,
mobileSearchBar,
- mobileSearchInput
+ mobileSearchInput,
);
performInitialHistoryReplace(
instance,
searchBar,
searchInput,
mobileSearchBar,
- mobileSearchInput
+ mobileSearchInput,
);
}
@@ -45,7 +45,7 @@ export function performInitialHistoryReplace(
searchBar,
searchInput,
mobileSearchBar,
- mobileSearchInput
+ mobileSearchInput,
) {
history.replaceState(
{
@@ -57,7 +57,7 @@ export function performInitialHistoryReplace(
sort: history.state?.sort ?? "ASCENDING",
},
Utils.getTitle(categoryTitle.value.trim()),
- location.href
+ location.href,
);
if (history.state?.search) {
@@ -86,7 +86,7 @@ export function performInitialHistoryReplace(
sort: history.state?.sort,
},
Utils.getTitle(categoryTitle.value.trim()),
- location.href
+ location.href,
);
searchBar.classList.add(`has-content`);
@@ -130,7 +130,7 @@ export function setupPopStateHandler(
searchBar,
searchInput,
mobileSearchBar,
- mobileSearchInput
+ mobileSearchInput,
) {
window.addEventListener(`popstate`, (event) => {
const { state } = event;
diff --git a/source/js/buyers-guide/search/member-functions.js b/source/js/buyers-guide/search/member-functions.js
index 924ad16571f..8921dce48c9 100644
--- a/source/js/buyers-guide/search/member-functions.js
+++ b/source/js/buyers-guide/search/member-functions.js
@@ -10,7 +10,7 @@ const subcategories = document.querySelectorAll(`.subcategories`);
*/
export function setupNavLinks(instance) {
const navLinks = document.querySelectorAll(
- `#multipage-nav a,.category-header,#pni-nav-mobile a`
+ `#multipage-nav a,.category-header,#pni-nav-mobile a`,
);
for (const nav of navLinks) {
@@ -45,7 +45,7 @@ export function setupNavLinks(instance) {
sort: history.state?.sort,
},
Utils.getTitle(categoryName),
- evt.target.href
+ evt.target.href,
);
document.title = Utils.getTitle(categoryName);
@@ -84,7 +84,7 @@ export function setupNavLinks(instance) {
categoryTitle.value = evt.target.dataset.parent;
parentTitle.value = "";
href = document.querySelector(
- `#multipage-nav a[data-name="${evt.target.dataset.parent}"],.category-header`
+ `#multipage-nav a[data-name="${evt.target.dataset.parent}"],.category-header`,
).href;
instance.toggleSubcategory(true);
}
@@ -99,18 +99,18 @@ export function setupNavLinks(instance) {
sort: history.state?.sort,
},
Utils.getTitle(subcategoryName),
- href
+ href,
);
document.title = Utils.getTitle(categoryTitle.value.trim());
Utils.updateHeader(
categoryTitle.value.trim(),
- parentTitle.value.trim()
+ parentTitle.value.trim(),
);
instance.filterCategory(categoryTitle.value.trim());
}
},
- true
+ true,
);
}
}
@@ -142,7 +142,7 @@ export function setupGoBackToAll(instance) {
sort: history.state?.sort,
},
Utils.getTitle(evt.target.dataset.name),
- evt.target.href
+ evt.target.href,
);
Utils.setActiveCatNavLink("None");
diff --git a/source/js/buyers-guide/search/pni-sort-dropdown.js b/source/js/buyers-guide/search/pni-sort-dropdown.js
index 154ec8305fd..9307fa0d2cb 100644
--- a/source/js/buyers-guide/search/pni-sort-dropdown.js
+++ b/source/js/buyers-guide/search/pni-sort-dropdown.js
@@ -10,26 +10,26 @@ export class PNISortDropdown {
this.dropdown = document.querySelector("[data-pni-sort-dropdown]");
this.dropdownButton = document.querySelector(
- "[data-pni-sort-dropdown-button]"
+ "[data-pni-sort-dropdown-button]",
);
this.dropdownButtonContent = document.querySelector(
- "[data-pni-sort-dropdown-button-content]"
+ "[data-pni-sort-dropdown-button-content]",
);
this.dropdownButtonArrow = document.querySelector(
- "[data-pni-sort-dropdown-button-arrow]"
+ "[data-pni-sort-dropdown-button-arrow]",
);
this.listContainer = document.querySelector(
- "[data-pni-sort-dropdown-list-container]"
+ "[data-pni-sort-dropdown-list-container]",
);
this.listItems = document.querySelectorAll(
- "[data-pni-sort-dropdown-list-item]"
+ "[data-pni-sort-dropdown-list-item]",
);
this.listItemIds = [];
if (!this.dropdown) {
return console.error(
- `Could not find the PNI Creepiness Dropdown. PNI Creepiness Dropdown will not be available.`
+ `Could not find the PNI Creepiness Dropdown. PNI Creepiness Dropdown will not be available.`,
);
}
@@ -75,7 +75,7 @@ export class PNISortDropdown {
if (history.state?.sort && !searchParameter) {
document
.querySelector(
- `[data-pni-sort-dropdown-list-item][data-value=${history.state.sort}]`
+ `[data-pni-sort-dropdown-list-item][data-value=${history.state.sort}]`,
)
.click();
}
diff --git a/source/js/buyers-guide/search/pni-toggle.js b/source/js/buyers-guide/search/pni-toggle.js
index b5c3a47b576..03e91a122f4 100644
--- a/source/js/buyers-guide/search/pni-toggle.js
+++ b/source/js/buyers-guide/search/pni-toggle.js
@@ -13,7 +13,7 @@ export class PNIToggle {
// we can be confident that any page that should have it, has it,
// failing our tests on pages that should but don't.
return console.warn(
- `Could not find the PNI filter checkbox. PNI filtering will not be available.`
+ `Could not find the PNI filter checkbox. PNI filtering will not be available.`,
);
}
diff --git a/source/js/buyers-guide/search/search-filter.js b/source/js/buyers-guide/search/search-filter.js
index b8033f29d87..a7cf170bff2 100644
--- a/source/js/buyers-guide/search/search-filter.js
+++ b/source/js/buyers-guide/search/search-filter.js
@@ -42,7 +42,7 @@ export class SearchFilter {
searchBar,
searchInput,
mobileSearchBar,
- mobileSearchInput
+ mobileSearchInput,
);
setupReviewLinks(this);
@@ -59,7 +59,7 @@ export class SearchFilter {
// we want the animation to start when the first eight products images are loaded
Promise.allSettled(
Array.from(
- document.querySelectorAll(".product-box.d-flex img.product-thumbnail")
+ document.querySelectorAll(".product-box.d-flex img.product-thumbnail"),
)
.slice(0, 8)
.filter((img) => !img.complete)
@@ -68,8 +68,8 @@ export class SearchFilter {
new Promise((resolve, reject) => {
img.onload = resolve;
img.onerror = reject;
- })
- )
+ }),
+ ),
).then(() => {
if (this.categoryTitle.value === "None") {
Utils.toggleScrollAnimation();
@@ -86,16 +86,16 @@ export class SearchFilter {
*/
setupSearchBar() {
const searchBar = (this.searchBar = document.querySelector(
- `#product-filter-search`
+ `#product-filter-search`,
));
const mobileSearchBar = (this.mobileSearchBar = document.querySelector(
- `#pni-mobile-search-container`
+ `#pni-mobile-search-container`,
));
if (!searchBar || !mobileSearchBar) {
return console.warn(
- `Could not find the PNI search bar. Search will not be available.`
+ `Could not find the PNI search bar. Search will not be available.`,
);
}
@@ -126,7 +126,7 @@ export class SearchFilter {
this.clearText();
applyHistory(this);
}
- }, 500)
+ }, 500),
);
mobileSearchInput.addEventListener(
@@ -141,14 +141,14 @@ export class SearchFilter {
this.clearText();
applyHistory(this);
}
- }, 500)
+ }, 500),
);
const clear = searchBar.querySelector(`.clear-icon`);
const mobileClear = mobileSearchBar.querySelector(`.clear-icon`);
if (!clear || !mobileClear) {
return console.warn(
- `Could not find the PNI search input clear icon. Search will work, but clearing will not.`
+ `Could not find the PNI search input clear icon. Search will work, but clearing will not.`,
);
}
@@ -269,7 +269,7 @@ export class SearchFilter {
updateSubCatLinkClass(
document.querySelector(`a.subcategories.active`),
defaultClasses,
- activeClasses
+ activeClasses,
);
if (clear === true) return;
@@ -283,7 +283,7 @@ export class SearchFilter {
updateSubCatLinkClass(
document.querySelector(`a.subcategories[data-name="${categoryName}"]`),
activeClasses,
- defaultClasses
+ defaultClasses,
);
Utils.scrollToSubCategory(categoryName);
diff --git a/source/js/buyers-guide/search/slider-area.js b/source/js/buyers-guide/search/slider-area.js
index 524d14323cc..6b2cc1a3194 100644
--- a/source/js/buyers-guide/search/slider-area.js
+++ b/source/js/buyers-guide/search/slider-area.js
@@ -45,10 +45,10 @@ function markScrollEnd(event) {
subClasses.remove("cursor-grabbing", "select-none");
[`mousemove`].forEach((type) =>
- document.removeEventListener(type, markScrollMove)
+ document.removeEventListener(type, markScrollMove),
);
[`mouseup`].forEach((type) =>
- document.removeEventListener(type, markScrollEnd)
+ document.removeEventListener(type, markScrollEnd),
);
}
diff --git a/source/js/buyers-guide/search/utils.js b/source/js/buyers-guide/search/utils.js
index 1fb32af50e0..827c7dcc83d 100644
--- a/source/js/buyers-guide/search/utils.js
+++ b/source/js/buyers-guide/search/utils.js
@@ -5,10 +5,10 @@ const FILTERS = [`company`, `name`, `blurb`, `worst-case`];
const ALL_PRODUCTS = document.querySelectorAll(`figure.product-box`);
const SUBMIT_PRODUCT = document.querySelector(".recommend-product");
const NO_RESULTS_NOTICE = document.getElementById(
- `product-filter-no-results-notice`
+ `product-filter-no-results-notice`,
);
const ALL_CATEGORY_LABEL = document.querySelector(
- `#multipage-nav .multipage-link[data-name="None"]`
+ `#multipage-nav .multipage-link[data-name="None"]`,
).textContent;
const PARENT_TITLE = document.querySelector(`.parent-title`);
@@ -42,7 +42,7 @@ export class Utils {
if (document.querySelector(`#multipage-nav a[data-name="${parent}"]`)) {
document.querySelector(".category-header").href =
document.querySelector(
- `#multipage-nav a[data-name="${parent}"]`
+ `#multipage-nav a[data-name="${parent}"]`,
).href;
}
document.querySelector(`#pni-nav-mobile .active-link-label`).textContent =
@@ -54,7 +54,7 @@ export class Utils {
if (document.querySelector(`#multipage-nav a[data-name="${category}"]`)) {
document.querySelector(".category-header").href =
document.querySelector(
- `#multipage-nav a[data-name="${category}"]`
+ `#multipage-nav a[data-name="${category}"]`,
).href;
}
document.querySelector(`#pni-nav-mobile .active-link-label`).textContent =
@@ -89,10 +89,10 @@ export class Utils {
*/
static activateCatNav(category = "None") {
const linkForLarge = document.querySelector(
- `#multipage-nav a[data-name="${category}"]`
+ `#multipage-nav a[data-name="${category}"]`,
);
const linkForMobile = document.querySelector(
- `#pni-nav-mobile a[data-name="${category}"]`
+ `#pni-nav-mobile a[data-name="${category}"]`,
);
// for larger screens
@@ -194,7 +194,7 @@ export class Utils {
y: 0,
stagger: 0.1,
overwrite: true,
- }
+ },
);
}
@@ -269,7 +269,7 @@ export class Utils {
}
const productCategories = Array.from(
- product.querySelectorAll(".product-categories")
+ product.querySelectorAll(".product-categories"),
);
return productCategories.map((c) => c.value.trim()).includes(category);
@@ -301,8 +301,8 @@ export class Utils {
return propertyNameA < propertyNameB
? -1
: propertyNameA > propertyNameB
- ? 1
- : 0;
+ ? 1
+ : 0;
}
}
});
@@ -333,7 +333,7 @@ export class Utils {
static moveCreepyFace() {
const CREEPINESS_FACE = document.querySelector(
- ".creep-o-meter-information"
+ ".creep-o-meter-information",
);
// When searching, check to see how many products are still visible
// If there are no visible products, there are "no search results"
@@ -382,7 +382,7 @@ export class Utils {
*/
static scrollToSubCategory(category) {
const subcatLink = document.querySelector(
- `a.subcategories[data-name="${category}"]`
+ `a.subcategories[data-name="${category}"]`,
);
if (!category || !subcatLink) return;
diff --git a/source/js/buyers-guide/template-js-handler/desktop-search-bar.js b/source/js/buyers-guide/template-js-handler/desktop-search-bar.js
index 47dad6609f2..78ae599d416 100644
--- a/source/js/buyers-guide/template-js-handler/desktop-search-bar.js
+++ b/source/js/buyers-guide/template-js-handler/desktop-search-bar.js
@@ -10,6 +10,6 @@ export default () => {
setupSearchBar(
"#product-filter-search-input",
"#product-filter-search-input + .clear-icon",
- `#product-filter-search`
+ `#product-filter-search`,
);
};
diff --git a/source/js/buyers-guide/template-js-handler/mobile-nav-stickiness-handler.js b/source/js/buyers-guide/template-js-handler/mobile-nav-stickiness-handler.js
index 03b99c22985..e501f5d762f 100644
--- a/source/js/buyers-guide/template-js-handler/mobile-nav-stickiness-handler.js
+++ b/source/js/buyers-guide/template-js-handler/mobile-nav-stickiness-handler.js
@@ -9,7 +9,7 @@
export default () => {
const menuBurger = document.querySelector(".burger");
const primaryNavContainer = document.querySelector(
- ".primary-nav-container-wrapper"
+ ".primary-nav-container-wrapper",
);
if (!menuBurger || !primaryNavContainer) return;
diff --git a/source/js/buyers-guide/template-js-handler/mobile-search-bar.js b/source/js/buyers-guide/template-js-handler/mobile-search-bar.js
index cdb8a6a55fa..fe770d750d5 100644
--- a/source/js/buyers-guide/template-js-handler/mobile-search-bar.js
+++ b/source/js/buyers-guide/template-js-handler/mobile-search-bar.js
@@ -3,7 +3,7 @@ import setupSearchBar from "./search-bar";
export default () => {
const mobileSearch = document.querySelector("#mobile-search");
const searchContainer = document.querySelector(
- "#pni-mobile-search-container"
+ "#pni-mobile-search-container",
);
const mobileCatNav = document.querySelector("#pni-nav-mobile");
@@ -28,7 +28,7 @@ export default () => {
setupSearchBar(
"#pni-mobile-bar",
"#pni-mobile-search-container .clear-icon",
- `#pni-mobile-search-container`
+ `#pni-mobile-search-container`,
);
} else {
const input = document.querySelector("#pni-mobile-bar");
diff --git a/source/js/buyers-guide/template-js-handler/pni-category-dropdown.js b/source/js/buyers-guide/template-js-handler/pni-category-dropdown.js
index 9198ea89990..a7685ff5897 100644
--- a/source/js/buyers-guide/template-js-handler/pni-category-dropdown.js
+++ b/source/js/buyers-guide/template-js-handler/pni-category-dropdown.js
@@ -1,12 +1,12 @@
export default () => {
const dropdown = document.querySelector(".pni-category-dropdown");
const dropdownButton = dropdown.querySelector(
- ".pni-category-dropdown-button"
+ ".pni-category-dropdown-button",
);
const dropdownButtonContent = dropdownButton.querySelector("span");
const dropdownButtonChevron = dropdownButton.querySelector("svg");
const dropdownSelect = dropdown.querySelector(
- "#pni-category-dropdown-select"
+ "#pni-category-dropdown-select",
);
let defaultDropdownHeaderText; // Keep track of dropdown button's default text for different locales
@@ -21,7 +21,7 @@ export default () => {
const resizeCategoryNavigation = () => {
const categoryLinks = [
...document.querySelectorAll(
- "#buyersguide-category-link-container > .multipage-link"
+ "#buyersguide-category-link-container > .multipage-link",
),
].reverse();
@@ -52,7 +52,7 @@ export default () => {
"tw-bg-white",
"tw-text-gray-40",
"hover:tw-text-black",
- "tw-mb-0"
+ "tw-mb-0",
);
category.classList.add(
"tw-w-full",
@@ -60,7 +60,7 @@ export default () => {
"tw-font-sans",
"tw-font-bold",
"tw-p-8",
- "tw-text-right"
+ "tw-text-right",
);
category.classList.remove("tw-block");
el.append(category);
@@ -70,7 +70,7 @@ export default () => {
// Highlight selected category
const highlightSelectedCategory = () => {
const activeCategory = document.querySelector(
- "#pni-category-dropdown-select .active"
+ "#pni-category-dropdown-select .active",
);
const dropdownHeaderText = dropdownButtonContent.querySelector("span");
@@ -117,7 +117,7 @@ export default () => {
"tw-w-full",
"large:tw-w-4/5",
"tw-overflow-x-auto",
- "tw-mr-8"
+ "tw-mr-8",
);
defaultDropdownHeaderText =
diff --git a/source/js/buyers-guide/template-js-handler/product-page-comment-handler.js b/source/js/buyers-guide/template-js-handler/product-page-comment-handler.js
index 943f6d85e1c..0c07871408d 100644
--- a/source/js/buyers-guide/template-js-handler/product-page-comment-handler.js
+++ b/source/js/buyers-guide/template-js-handler/product-page-comment-handler.js
@@ -6,7 +6,7 @@
export default () => {
// Commento's parent div, in which it loads all of its content through JS.
const commentoContainer = document.querySelector(
- "#view-product-page #commento"
+ "#view-product-page #commento",
);
if (!commentoContainer) {
diff --git a/source/js/common/google-analytics.js b/source/js/common/google-analytics.js
index f3889a6fcdf..8e9908fe913 100644
--- a/source/js/common/google-analytics.js
+++ b/source/js/common/google-analytics.js
@@ -36,7 +36,7 @@ const getIdentifier = (type = "ga") => {
if (!identifier) {
console.warn(
- `No ${type.toUpperCase()} identifier found: skipping bootstrap step`
+ `No ${type.toUpperCase()} identifier found: skipping bootstrap step`,
);
}
diff --git a/source/js/common/inject-react/newsletter-signup-module.js b/source/js/common/inject-react/newsletter-signup-module.js
index 2509122a059..d275e0e4ef5 100644
--- a/source/js/common/inject-react/newsletter-signup-module.js
+++ b/source/js/common/inject-react/newsletter-signup-module.js
@@ -11,7 +11,7 @@ export default (apps, siteUrl) => {
// excluding `.newsletter-signup-module.on-nav` because it's taken care of by nav-newsletter.js
document
.querySelectorAll(
- `.newsletter-signup-module:not(.on-nav):not(.react-rendered)`
+ `.newsletter-signup-module:not(.on-nav):not(.react-rendered)`,
)
.forEach((element) => {
const props = element.dataset;
@@ -31,7 +31,7 @@ export default (apps, siteUrl) => {
new Promise((resolve) => {
const root = createRoot(element);
root.render(