From 0c829c88c5075b911b2d5a08ed672cbbf5cfc40f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fe=CC=81lix=20Pe=CC=81ault?=
Date: Fri, 10 Feb 2023 17:28:54 +0100
Subject: [PATCH] fix: eslint errors
---
apps/website/src/animations/crossfade.ts | 2 +-
apps/website/src/animations/easings.ts | 2 +-
apps/website/src/animations/reveal.ts | 2 +-
apps/website/src/animations/transitions.ts | 2 +-
apps/website/src/components/Analytics.svelte | 2 +-
apps/website/src/components/Metas.svelte | 2 +-
.../src/components/PageTransition.svelte | 2 +-
apps/website/src/components/SVGSprite.svelte | 2 +-
.../src/components/SmoothScroll.svelte | 2 +-
apps/website/src/components/SplitText.svelte | 3 +-
.../components/atoms/AboutGridPhoto.svelte | 2 +-
.../website/src/components/atoms/Badge.svelte | 2 +-
.../src/components/atoms/BoxCTA.svelte | 2 +-
.../src/components/atoms/Button.svelte | 3 +-
.../src/components/atoms/ButtonCart.svelte | 2 +-
.../src/components/atoms/ButtonCircle.svelte | 2 +-
.../src/components/atoms/DiscoverText.svelte | 2 +-
apps/website/src/components/atoms/Icon.svelte | 2 +-
.../src/components/atoms/IconArrow.svelte | 2 +-
.../src/components/atoms/IconEarth.svelte | 2 +-
.../website/src/components/atoms/Image.svelte | 12 ++--
.../components/atoms/ScrollingTitle.svelte | 2 +-
.../src/components/atoms/SiteTitle.svelte | 2 +-
.../components/layouts/PosterLayout.svelte | 4 +-
.../src/components/molecules/CartItem.svelte | 2 +-
.../src/components/molecules/EmailForm.svelte | 2 +-
.../src/components/molecules/Heading.svelte | 2 +-
.../src/components/molecules/House.svelte | 2 +-
.../src/components/molecules/Location.svelte | 8 +--
.../molecules/NewsletterIssue.svelte | 2 +-
.../molecules/NotificationCart.svelte | 5 +-
.../components/molecules/Pagination.svelte | 2 +-
.../src/components/molecules/PhotoCard.svelte | 2 +-
.../src/components/molecules/PostCard.svelte | 2 +-
.../src/components/molecules/Poster.svelte | 2 +-
.../components/molecules/ProcessStep.svelte | 4 +-
.../src/components/molecules/Select.svelte | 6 +-
.../molecules/ShopLocationSwitcher.svelte | 4 +-
.../src/components/molecules/Switcher.svelte | 12 ++--
.../src/components/organisms/Banner.svelte | 2 +-
.../src/components/organisms/Carousel.svelte | 2 +-
.../src/components/organisms/Cart.svelte | 7 ++-
.../src/components/organisms/Collage.svelte | 2 +-
.../src/components/organisms/Footer.svelte | 4 +-
.../organisms/InteractiveGlobe.svelte | 4 +-
.../src/components/organisms/ListCTAs.svelte | 2 +-
.../src/components/organisms/Locations.svelte | 6 +-
.../organisms/NewsletterModule.svelte | 4 +-
.../components/organisms/PostersGrid.svelte | 2 +-
.../components/organisms/ShopBanner.svelte | 2 +-
.../components/organisms/ShopModule.svelte | 4 +-
apps/website/src/modules/globe/pane.ts | 2 +-
.../src/routes/(shop)/shop/+error.svelte | 4 +-
.../src/routes/(shop)/shop/+layout.server.ts | 2 +-
.../src/routes/(shop)/shop/+layout.svelte | 2 +-
.../src/routes/(shop)/shop/+page.svelte | 2 +-
.../(shop)/shop/[type]-[name]/+page.svelte | 2 +-
.../[country]/[location]/+page.server.ts | 4 +-
.../(site)/[country]/[location]/+page.svelte | 11 ++--
.../[country]/[location]/[photo]/+page.svelte | 29 ++++++----
.../src/routes/(site)/about/+page.server.ts | 4 +-
.../src/routes/(site)/about/+page.svelte | 8 +--
.../src/routes/(site)/credits/+page.svelte | 2 +-
.../(site)/feed/products.xml/+server.ts | 4 +-
.../src/routes/(site)/locations/+page.svelte | 4 +-
.../src/routes/(site)/photos/+page.svelte | 4 +-
.../src/routes/(site)/subscribe/+page.svelte | 2 +-
.../src/routes/(site)/terms/+page.svelte | 2 +-
apps/website/src/routes/+error.svelte | 2 +-
apps/website/src/routes/+layout.server.ts | 2 +-
apps/website/src/routes/+layout.svelte | 2 +-
apps/website/src/routes/+page.server.ts | 4 +-
apps/website/src/routes/+page.svelte | 2 +-
.../website/src/routes/sitemap.xml/+server.ts | 2 +-
apps/website/src/service-workers.ts | 56 +++++++++----------
apps/website/src/utils/analytics.ts | 2 +-
apps/website/src/utils/api.ts | 2 +-
apps/website/src/utils/constants.ts | 2 +-
.../src/utils/functions/notifications.ts | 2 +-
apps/website/src/utils/functions/shop.ts | 2 +-
.../website/src/utils/functions/shopServer.ts | 2 +-
apps/website/src/utils/interactions/swipe.ts | 2 +-
apps/website/src/utils/polyfills.ts | 2 +-
apps/website/src/utils/stores/index.ts | 2 +-
apps/website/src/utils/stores/shop.ts | 2 +-
packages/config/eslintrc.config.cjs | 2 +-
86 files changed, 171 insertions(+), 169 deletions(-)
diff --git a/apps/website/src/animations/crossfade.ts b/apps/website/src/animations/crossfade.ts
index 3b38540..66205c0 100644
--- a/apps/website/src/animations/crossfade.ts
+++ b/apps/website/src/animations/crossfade.ts
@@ -24,4 +24,4 @@ export const [send, receive] = crossfade({
`
}
}
-})
\ No newline at end of file
+})
diff --git a/apps/website/src/animations/easings.ts b/apps/website/src/animations/easings.ts
index 7f55a49..c67d83e 100644
--- a/apps/website/src/animations/easings.ts
+++ b/apps/website/src/animations/easings.ts
@@ -4,4 +4,4 @@ import type { Easing } from 'motion'
/**
* Ease: Quart Out Array
*/
-export const quartOut: Easing = [.165, .84, .44, 1]
\ No newline at end of file
+export const quartOut: Easing = [.165, .84, .44, 1]
diff --git a/apps/website/src/animations/reveal.ts b/apps/website/src/animations/reveal.ts
index bc4fe29..d567906 100644
--- a/apps/website/src/animations/reveal.ts
+++ b/apps/website/src/animations/reveal.ts
@@ -42,4 +42,4 @@ export default (node: Element | any, {
}, {
amount: options.threshold,
})
-}
\ No newline at end of file
+}
diff --git a/apps/website/src/animations/transitions.ts b/apps/website/src/animations/transitions.ts
index 3f3cd38..df45e23 100644
--- a/apps/website/src/animations/transitions.ts
+++ b/apps/website/src/animations/transitions.ts
@@ -57,4 +57,4 @@ export const revealSplit = (node: HTMLElement, {
return null
}
}
-}
\ No newline at end of file
+}
diff --git a/apps/website/src/components/Analytics.svelte b/apps/website/src/components/Analytics.svelte
index 3b7329b..d13c6d4 100644
--- a/apps/website/src/components/Analytics.svelte
+++ b/apps/website/src/components/Analytics.svelte
@@ -12,4 +12,4 @@
}
{/if}
-
\ No newline at end of file
+
diff --git a/apps/website/src/components/Metas.svelte b/apps/website/src/components/Metas.svelte
index 9d4d2f8..6995566 100644
--- a/apps/website/src/components/Metas.svelte
+++ b/apps/website/src/components/Metas.svelte
@@ -34,4 +34,4 @@
-
\ No newline at end of file
+
diff --git a/apps/website/src/components/PageTransition.svelte b/apps/website/src/components/PageTransition.svelte
index 9fbe958..6fd0e52 100644
--- a/apps/website/src/components/PageTransition.svelte
+++ b/apps/website/src/components/PageTransition.svelte
@@ -30,4 +30,4 @@
}}
>
-
\ No newline at end of file
+
diff --git a/apps/website/src/components/SVGSprite.svelte b/apps/website/src/components/SVGSprite.svelte
index e71cd94..4526bce 100644
--- a/apps/website/src/components/SVGSprite.svelte
+++ b/apps/website/src/components/SVGSprite.svelte
@@ -35,4 +35,4 @@
-
\ No newline at end of file
+
diff --git a/apps/website/src/components/SmoothScroll.svelte b/apps/website/src/components/SmoothScroll.svelte
index 89b1d22..46dc94d 100644
--- a/apps/website/src/components/SmoothScroll.svelte
+++ b/apps/website/src/components/SmoothScroll.svelte
@@ -34,4 +34,4 @@
$smoothScroll.destroy()
}
})
-
\ No newline at end of file
+
diff --git a/apps/website/src/components/SplitText.svelte b/apps/website/src/components/SplitText.svelte
index 94df918..6774394 100644
--- a/apps/website/src/components/SplitText.svelte
+++ b/apps/website/src/components/SplitText.svelte
@@ -17,7 +17,6 @@
{#each split as word, i}
{word} {#if word.includes('\n')} {/if}
-
{#if i < split.length - 1}{/if}
{/each}
@@ -39,4 +38,4 @@
{char}
{/each}
-{/if}
\ No newline at end of file
+{/if}
diff --git a/apps/website/src/components/atoms/AboutGridPhoto.svelte b/apps/website/src/components/atoms/AboutGridPhoto.svelte
index 0a0a180..664e37f 100644
--- a/apps/website/src/components/atoms/AboutGridPhoto.svelte
+++ b/apps/website/src/components/atoms/AboutGridPhoto.svelte
@@ -38,4 +38,4 @@
ratio={1.5}
{alt}
/>
-
\ No newline at end of file
+
diff --git a/apps/website/src/components/atoms/Badge.svelte b/apps/website/src/components/atoms/Badge.svelte
index b4ee61c..1ad95fd 100644
--- a/apps/website/src/components/atoms/Badge.svelte
+++ b/apps/website/src/components/atoms/Badge.svelte
@@ -9,4 +9,4 @@
{text}
-
\ No newline at end of file
+
diff --git a/apps/website/src/components/atoms/BoxCTA.svelte b/apps/website/src/components/atoms/BoxCTA.svelte
index 9650af1..f41cb8e 100644
--- a/apps/website/src/components/atoms/BoxCTA.svelte
+++ b/apps/website/src/components/atoms/BoxCTA.svelte
@@ -18,4 +18,4 @@
{label}
-
\ No newline at end of file
+
diff --git a/apps/website/src/components/atoms/Button.svelte b/apps/website/src/components/atoms/Button.svelte
index 4cf58ce..262d361 100644
--- a/apps/website/src/components/atoms/Button.svelte
+++ b/apps/website/src/components/atoms/Button.svelte
@@ -45,7 +45,6 @@
href={url} class={classes}
{target} {rel}
data-sveltekit-noscroll={isExternal || isProtocol ? 'off' : ''}
- {disabled}
tabindex="0"
on:click
>
@@ -57,4 +56,4 @@
{/if}
-{/if}
\ No newline at end of file
+{/if}
diff --git a/apps/website/src/components/atoms/ButtonCart.svelte b/apps/website/src/components/atoms/ButtonCart.svelte
index ee70977..d3763c2 100644
--- a/apps/website/src/components/atoms/ButtonCart.svelte
+++ b/apps/website/src/components/atoms/ButtonCart.svelte
@@ -24,4 +24,4 @@
{$cartAmount}
{/if}
-
\ No newline at end of file
+
diff --git a/apps/website/src/components/atoms/ButtonCircle.svelte b/apps/website/src/components/atoms/ButtonCircle.svelte
index bac24a8..7307de7 100644
--- a/apps/website/src/components/atoms/ButtonCircle.svelte
+++ b/apps/website/src/components/atoms/ButtonCircle.svelte
@@ -41,4 +41,4 @@
{/if}
-{/if}
\ No newline at end of file
+{/if}
diff --git a/apps/website/src/components/atoms/DiscoverText.svelte b/apps/website/src/components/atoms/DiscoverText.svelte
index e8eb65f..23156a1 100644
--- a/apps/website/src/components/atoms/DiscoverText.svelte
+++ b/apps/website/src/components/atoms/DiscoverText.svelte
@@ -12,4 +12,4 @@
Discover {count.photos} homes
from {count.locations} places
in {count.countries} countries
-
\ No newline at end of file
+
diff --git a/apps/website/src/components/atoms/Icon.svelte b/apps/website/src/components/atoms/Icon.svelte
index 2b9fcc1..f4bb6a4 100644
--- a/apps/website/src/components/atoms/Icon.svelte
+++ b/apps/website/src/components/atoms/Icon.svelte
@@ -7,4 +7,4 @@
-
\ No newline at end of file
+
diff --git a/apps/website/src/components/atoms/IconArrow.svelte b/apps/website/src/components/atoms/IconArrow.svelte
index 21595e6..71ba346 100644
--- a/apps/website/src/components/atoms/IconArrow.svelte
+++ b/apps/website/src/components/atoms/IconArrow.svelte
@@ -12,4 +12,4 @@
class:arrow--flip={flip}
>
-
\ No newline at end of file
+
diff --git a/apps/website/src/components/atoms/IconEarth.svelte b/apps/website/src/components/atoms/IconEarth.svelte
index a367feb..6ccb07f 100644
--- a/apps/website/src/components/atoms/IconEarth.svelte
+++ b/apps/website/src/components/atoms/IconEarth.svelte
@@ -41,4 +41,4 @@
{/if}
-
\ No newline at end of file
+
diff --git a/apps/website/src/components/atoms/Image.svelte b/apps/website/src/components/atoms/Image.svelte
index 1a5e2ed..405bda6 100644
--- a/apps/website/src/components/atoms/Image.svelte
+++ b/apps/website/src/components/atoms/Image.svelte
@@ -10,7 +10,7 @@
export let ratio: number = undefined
export let alt: string
export let lazy = true
- export let decoding: "auto" | "sync" | "async" = "auto"
+ export let decoding: 'auto' | 'sync' | 'async' = 'auto'
interface Sizes {
small?: { width?: number, height?: number }
@@ -50,16 +50,16 @@
$: imgSrc = id ? getAssetUrlKey(id, `${sizeKey}-small-jpg`) : src ? src : undefined
$: srcSet = {
// WebP
- webp:
- sizes ? [
+ webp: sizes
+ ? [
`${getAssetUrlKey(id, `${sizeKey}-small-webp`)} 345w`,
sizes.medium ? `${getAssetUrlKey(id, `${sizeKey}-medium-webp`)} 768w` : null,
sizes.large ? `${getAssetUrlKey(id, `${sizeKey}-large-webp`)} 1280w` : null,
]
: [getAssetUrlKey(id, `${sizeKey}-webp`)],
// JPG
- jpg:
- sizes ? [
+ jpg: sizes
+ ? [
`${getAssetUrlKey(id, `${sizeKey}-small-jpg`)} 345w`,
sizes.medium ? `${getAssetUrlKey(id, `${sizeKey}-medium-jpg`)} 768w` : null,
sizes.large ? `${getAssetUrlKey(id, `${sizeKey}-large-jpg`)} 1280w` : null,
@@ -83,4 +83,4 @@
loading={lazy ? 'lazy' : undefined}
{decoding}
/>
-
\ No newline at end of file
+
diff --git a/apps/website/src/components/atoms/ScrollingTitle.svelte b/apps/website/src/components/atoms/ScrollingTitle.svelte
index 22f8a2f..ce1b1ce 100644
--- a/apps/website/src/components/atoms/ScrollingTitle.svelte
+++ b/apps/website/src/components/atoms/ScrollingTitle.svelte
@@ -69,4 +69,4 @@
use:reveal={revealOptions}
>
-
\ No newline at end of file
+
diff --git a/apps/website/src/components/atoms/SiteTitle.svelte b/apps/website/src/components/atoms/SiteTitle.svelte
index 82e985e..b2a347a 100644
--- a/apps/website/src/components/atoms/SiteTitle.svelte
+++ b/apps/website/src/components/atoms/SiteTitle.svelte
@@ -34,4 +34,4 @@
Of The
World
-{/if}
\ No newline at end of file
+{/if}
diff --git a/apps/website/src/components/layouts/PosterLayout.svelte b/apps/website/src/components/layouts/PosterLayout.svelte
index f4b8b91..068df11 100644
--- a/apps/website/src/components/layouts/PosterLayout.svelte
+++ b/apps/website/src/components/layouts/PosterLayout.svelte
@@ -97,7 +97,7 @@
{#if product.photos_preview.length}
- {#each product.photos_preview.slice(0, 3) as { directus_files_id}, index}
+ {#each product.photos_preview.slice(0, 3) as { directus_files_id }, index}
{/if}
-
\ No newline at end of file
+
diff --git a/apps/website/src/components/molecules/CartItem.svelte b/apps/website/src/components/molecules/CartItem.svelte
index 15f42be..7a77455 100644
--- a/apps/website/src/components/molecules/CartItem.svelte
+++ b/apps/website/src/components/molecules/CartItem.svelte
@@ -66,4 +66,4 @@
-
\ No newline at end of file
+
diff --git a/apps/website/src/components/molecules/EmailForm.svelte b/apps/website/src/components/molecules/EmailForm.svelte
index 2187b41..d0190dc 100644
--- a/apps/website/src/components/molecules/EmailForm.svelte
+++ b/apps/website/src/components/molecules/EmailForm.svelte
@@ -103,4 +103,4 @@
{formMessages[formStatus.message]}
{/if}
-
\ No newline at end of file
+
diff --git a/apps/website/src/components/molecules/Heading.svelte b/apps/website/src/components/molecules/Heading.svelte
index c1b0d1b..ff1888d 100644
--- a/apps/website/src/components/molecules/Heading.svelte
+++ b/apps/website/src/components/molecules/Heading.svelte
@@ -14,4 +14,4 @@
{@html text}
-
\ No newline at end of file
+
diff --git a/apps/website/src/components/molecules/House.svelte b/apps/website/src/components/molecules/House.svelte
index 10f5430..f7c977f 100644
--- a/apps/website/src/components/molecules/House.svelte
+++ b/apps/website/src/components/molecules/House.svelte
@@ -63,4 +63,4 @@
{index}
-
\ No newline at end of file
+
diff --git a/apps/website/src/components/molecules/Location.svelte b/apps/website/src/components/molecules/Location.svelte
index 5fcc9ba..c881117 100644
--- a/apps/website/src/components/molecules/Location.svelte
+++ b/apps/website/src/components/molecules/Location.svelte
@@ -31,7 +31,7 @@
// Detect if location has new content
const seenLocationDate = dayjs(parsedSeenLocations[location.id])
- const isLocationSeen = parsedSeenLocations?.hasOwnProperty(location.id)
+ const isLocationSeen = location.id in parsedSeenLocations
// Define if location is has new photos
if (seenLocationDate && isLocationSeen) {
@@ -48,9 +48,9 @@
* Moving cursor over
*/
const offset = spring({ x: 0, y: 0 }, {
- stiffness: 0.075,
- damping: 0.9
- })
+ stiffness: 0.075,
+ damping: 0.9
+ })
const handleMouseMove = ({ clientX }: MouseEvent) => {
const { width, left } = locationEl.getBoundingClientRect()
const moveProgress = (clientX - left) / width // 0 to 1
diff --git a/apps/website/src/components/molecules/NewsletterIssue.svelte b/apps/website/src/components/molecules/NewsletterIssue.svelte
index 28491c1..a0d3fc8 100644
--- a/apps/website/src/components/molecules/NewsletterIssue.svelte
+++ b/apps/website/src/components/molecules/NewsletterIssue.svelte
@@ -30,4 +30,4 @@
-
\ No newline at end of file
+
diff --git a/apps/website/src/components/molecules/NotificationCart.svelte b/apps/website/src/components/molecules/NotificationCart.svelte
index ec0cd4d..1403ec4 100644
--- a/apps/website/src/components/molecules/NotificationCart.svelte
+++ b/apps/website/src/components/molecules/NotificationCart.svelte
@@ -19,8 +19,9 @@
@@ -29,4 +30,4 @@
{title}
{name}
-
\ No newline at end of file
+
diff --git a/apps/website/src/components/molecules/Pagination.svelte b/apps/website/src/components/molecules/Pagination.svelte
index d4c0035..de5c70c 100644
--- a/apps/website/src/components/molecules/Pagination.svelte
+++ b/apps/website/src/components/molecules/Pagination.svelte
@@ -20,4 +20,4 @@
-
\ No newline at end of file
+
diff --git a/apps/website/src/components/molecules/PhotoCard.svelte b/apps/website/src/components/molecules/PhotoCard.svelte
index 323dcb8..dc4e1ef 100644
--- a/apps/website/src/components/molecules/PhotoCard.svelte
+++ b/apps/website/src/components/molecules/PhotoCard.svelte
@@ -67,4 +67,4 @@
{lazy}
/>
{/if}
-
\ No newline at end of file
+
diff --git a/apps/website/src/components/molecules/PostCard.svelte b/apps/website/src/components/molecules/PostCard.svelte
index d12c07f..631d58a 100644
--- a/apps/website/src/components/molecules/PostCard.svelte
+++ b/apps/website/src/components/molecules/PostCard.svelte
@@ -45,4 +45,4 @@
{location}{region ? `, ${region}` : ''}
-
\ No newline at end of file
+
diff --git a/apps/website/src/components/molecules/Poster.svelte b/apps/website/src/components/molecules/Poster.svelte
index 4b4b9f9..661d483 100644
--- a/apps/website/src/components/molecules/Poster.svelte
+++ b/apps/website/src/components/molecules/Poster.svelte
@@ -47,4 +47,4 @@
on:click={() => addToCart(product)}
/>
-
\ No newline at end of file
+
diff --git a/apps/website/src/components/molecules/ProcessStep.svelte b/apps/website/src/components/molecules/ProcessStep.svelte
index 19af9d3..f54b28e 100644
--- a/apps/website/src/components/molecules/ProcessStep.svelte
+++ b/apps/website/src/components/molecules/ProcessStep.svelte
@@ -36,7 +36,7 @@
alt={image.title}
/>
{:else if video && video.mp4 && video.webm}
-
+
@@ -48,4 +48,4 @@
{@html text}
-
\ No newline at end of file
+
diff --git a/apps/website/src/components/molecules/Select.svelte b/apps/website/src/components/molecules/Select.svelte
index c11f4c3..10cb781 100644
--- a/apps/website/src/components/molecules/Select.svelte
+++ b/apps/website/src/components/molecules/Select.svelte
@@ -1,5 +1,5 @@
@@ -70,4 +70,4 @@
{/each}
-
\ No newline at end of file
+
diff --git a/apps/website/src/components/organisms/Banner.svelte b/apps/website/src/components/organisms/Banner.svelte
index 36eb7b5..e70f397 100644
--- a/apps/website/src/components/organisms/Banner.svelte
+++ b/apps/website/src/components/organisms/Banner.svelte
@@ -39,4 +39,4 @@
}}
lazy={false}
/>
-
\ No newline at end of file
+
diff --git a/apps/website/src/components/organisms/Carousel.svelte b/apps/website/src/components/organisms/Carousel.svelte
index ba86e3b..b9be4aa 100644
--- a/apps/website/src/components/organisms/Carousel.svelte
+++ b/apps/website/src/components/organisms/Carousel.svelte
@@ -127,4 +127,4 @@
{/if}
-
\ No newline at end of file
+
diff --git a/apps/website/src/components/organisms/Cart.svelte b/apps/website/src/components/organisms/Cart.svelte
index f1490f2..d98e487 100644
--- a/apps/website/src/components/organisms/Cart.svelte
+++ b/apps/website/src/components/organisms/Cart.svelte
@@ -10,12 +10,12 @@
import { smoothScroll } from '$utils/stores'
import { cartOpen, cartData, cartAmount, cartIsUpdating } from '$utils/stores/shop'
import { initSwell, getCart, updateCartItem, removeCartItem } from '$utils/functions/shop'
+ import { sendEvent } from '$utils/analytics'
// Components
import Button from '$components/atoms/Button.svelte'
import Icon from '$components/atoms/Icon.svelte'
import CartItem from '$components/molecules/CartItem.svelte'
import ShopLocationSwitcher from '$components/molecules/ShopLocationSwitcher.svelte'
- import { sendEvent } from '$utils/analytics';
// Block scroll if cart is open
@@ -140,7 +140,7 @@
text="Checkout"
color="pink"
size="small"
- on:click={() => sendEvent('cartCheckout', { props: { amount: $cartAmount }})}
+ on:click={() => sendEvent('cartCheckout', { props: { amount: $cartAmount } })}
/>
{/if}
@@ -151,5 +151,6 @@
-{/if}
\ No newline at end of file
+{/if}
diff --git a/apps/website/src/components/organisms/Collage.svelte b/apps/website/src/components/organisms/Collage.svelte
index 82655fb..53b96c1 100644
--- a/apps/website/src/components/organisms/Collage.svelte
+++ b/apps/website/src/components/organisms/Collage.svelte
@@ -26,4 +26,4 @@
/>
{/each}
-{/if}
\ No newline at end of file
+{/if}
diff --git a/apps/website/src/components/organisms/Footer.svelte b/apps/website/src/components/organisms/Footer.svelte
index 4bc7b1c..6a1ae8b 100644
--- a/apps/website/src/components/organisms/Footer.svelte
+++ b/apps/website/src/components/organisms/Footer.svelte
@@ -8,7 +8,7 @@
import SplitText from '$components/SplitText.svelte'
import SiteTitle from '$components/atoms/SiteTitle.svelte'
- const { settings: { instagram, footer_links }}: any = getContext('global')
+ const { settings: { instagram, footer_links } }: any = getContext('global')
@@ -42,4 +42,4 @@
-
\ No newline at end of file
+
diff --git a/apps/website/src/components/organisms/InteractiveGlobe.svelte b/apps/website/src/components/organisms/InteractiveGlobe.svelte
index 6f8ba48..c836ab9 100644
--- a/apps/website/src/components/organisms/InteractiveGlobe.svelte
+++ b/apps/website/src/components/organisms/InteractiveGlobe.svelte
@@ -31,7 +31,7 @@
const { continents, locations }: any = getContext('global')
const randomContinent: any = getRandomItem(continents)
- const markers = locations.map(({ name, slug, country, coordinates: { coordinates }}): Marker => ({
+ const markers = locations.map(({ name, slug, country, coordinates: { coordinates } }): Marker => ({
name,
slug,
country: { ...country },
@@ -154,4 +154,4 @@
{/if}
-
\ No newline at end of file
+
diff --git a/apps/website/src/components/organisms/ListCTAs.svelte b/apps/website/src/components/organisms/ListCTAs.svelte
index ea51f4e..ca53c03 100644
--- a/apps/website/src/components/organisms/ListCTAs.svelte
+++ b/apps/website/src/components/organisms/ListCTAs.svelte
@@ -21,4 +21,4 @@
\ No newline at end of file
+
diff --git a/apps/website/src/components/organisms/Locations.svelte b/apps/website/src/components/organisms/Locations.svelte
index 7b3e63c..cbb848a 100644
--- a/apps/website/src/components/organisms/Locations.svelte
+++ b/apps/website/src/components/organisms/Locations.svelte
@@ -16,12 +16,12 @@
export let locations: any[]
- const { continents, settings: { explore_list }}: any = getContext('global')
+ const { continents, settings: { explore_list } }: any = getContext('global')
// Continents filtering logic
let currentContinent: string = undefined
- $: filteredLocations = locations.filter(({ country: { continent }}: any) => {
+ $: filteredLocations = locations.filter(({ country: { continent } }: any) => {
if (!currentContinent) {
// Show all locations by default
return true
@@ -89,4 +89,4 @@
{/each}
-
\ No newline at end of file
+
diff --git a/apps/website/src/components/organisms/NewsletterModule.svelte b/apps/website/src/components/organisms/NewsletterModule.svelte
index 0566d50..0d9a833 100644
--- a/apps/website/src/components/organisms/NewsletterModule.svelte
+++ b/apps/website/src/components/organisms/NewsletterModule.svelte
@@ -9,7 +9,7 @@
export let theme = 'default'
- const { settings: { newsletter_text, newsletter_subtitle }}: any = getContext('global')
+ const { settings: { newsletter_text, newsletter_subtitle } }: any = getContext('global')
@@ -21,4 +21,4 @@
-
\ No newline at end of file
+
diff --git a/apps/website/src/components/organisms/PostersGrid.svelte b/apps/website/src/components/organisms/PostersGrid.svelte
index a3f1a80..c391b3f 100644
--- a/apps/website/src/components/organisms/PostersGrid.svelte
+++ b/apps/website/src/components/organisms/PostersGrid.svelte
@@ -117,4 +117,4 @@
{/if}
{/if}
-
\ No newline at end of file
+
diff --git a/apps/website/src/components/organisms/ShopBanner.svelte b/apps/website/src/components/organisms/ShopBanner.svelte
index 6ca9054..bf8bc7c 100644
--- a/apps/website/src/components/organisms/ShopBanner.svelte
+++ b/apps/website/src/components/organisms/ShopBanner.svelte
@@ -163,4 +163,4 @@
{/if}
-
\ No newline at end of file
+
diff --git a/apps/website/src/components/organisms/ShopModule.svelte b/apps/website/src/components/organisms/ShopModule.svelte
index f031bb9..54855e3 100644
--- a/apps/website/src/components/organisms/ShopModule.svelte
+++ b/apps/website/src/components/organisms/ShopModule.svelte
@@ -63,7 +63,7 @@
-
\ No newline at end of file
+
diff --git a/apps/website/src/modules/globe/pane.ts b/apps/website/src/modules/globe/pane.ts
index 04a30f1..92fbbf4 100644
--- a/apps/website/src/modules/globe/pane.ts
+++ b/apps/website/src/modules/globe/pane.ts
@@ -53,4 +53,4 @@ export const createPane = (ctx: any) => {
max: 1,
step: 0.01,
})
-}
\ No newline at end of file
+}
diff --git a/apps/website/src/routes/(shop)/shop/+error.svelte b/apps/website/src/routes/(shop)/shop/+error.svelte
index dcd77f9..e804d95 100644
--- a/apps/website/src/routes/(shop)/shop/+error.svelte
+++ b/apps/website/src/routes/(shop)/shop/+error.svelte
@@ -15,7 +15,7 @@
},
500: {
title: 'Server error',
- message: "That is embarassing, the problem is on our side.",
+ message: 'That is embarassing, the problem is on our side.',
},
}
@@ -40,4 +40,4 @@
-
\ No newline at end of file
+
diff --git a/apps/website/src/routes/(shop)/shop/+layout.server.ts b/apps/website/src/routes/(shop)/shop/+layout.server.ts
index 600481b..1157cc7 100644
--- a/apps/website/src/routes/(shop)/shop/+layout.server.ts
+++ b/apps/website/src/routes/(shop)/shop/+layout.server.ts
@@ -53,7 +53,7 @@ export const load = (async () => {
}
}`)
- const { data: { shop, location, posters, settings }} = res
+ const { data: { shop, location, posters, settings } } = res
/**
diff --git a/apps/website/src/routes/(shop)/shop/+layout.svelte b/apps/website/src/routes/(shop)/shop/+layout.svelte
index 4a39a40..368f764 100644
--- a/apps/website/src/routes/(shop)/shop/+layout.svelte
+++ b/apps/website/src/routes/(shop)/shop/+layout.svelte
@@ -47,4 +47,4 @@
{/each}
-
\ No newline at end of file
+
diff --git a/apps/website/src/routes/(shop)/shop/+page.svelte b/apps/website/src/routes/(shop)/shop/+page.svelte
index 0dcaaea..2c8e790 100644
--- a/apps/website/src/routes/(shop)/shop/+page.svelte
+++ b/apps/website/src/routes/(shop)/shop/+page.svelte
@@ -37,4 +37,4 @@
-
\ No newline at end of file
+
diff --git a/apps/website/src/routes/(shop)/shop/[type]-[name]/+page.svelte b/apps/website/src/routes/(shop)/shop/[type]-[name]/+page.svelte
index c4cd505..f8909f3 100644
--- a/apps/website/src/routes/(shop)/shop/[type]-[name]/+page.svelte
+++ b/apps/website/src/routes/(shop)/shop/[type]-[name]/+page.svelte
@@ -36,4 +36,4 @@
-
\ No newline at end of file
+
diff --git a/apps/website/src/routes/(site)/[country]/[location]/+page.server.ts b/apps/website/src/routes/(site)/[country]/[location]/+page.server.ts
index a1a1058..53f7056 100644
--- a/apps/website/src/routes/(site)/[country]/[location]/+page.server.ts
+++ b/apps/website/src/routes/(site)/[country]/[location]/+page.server.ts
@@ -70,10 +70,10 @@ export const load = (async ({ params, setHeaders }) => {
}
}`)
- const { data: { location: location, photos, total_published, product }} = res
+ const { data: { location: location, photos, total_published, product } } = res
if (!location.length || location.length && params.country !== location[0].country.slug) {
- throw error(404, "This location is not available… yet!")
+ throw error(404, 'This location is not available… yet!')
}
setHeaders({ 'Cache-Control': 'public, max-age=1, stale-while-revalidate=604799' })
diff --git a/apps/website/src/routes/(site)/[country]/[location]/+page.svelte b/apps/website/src/routes/(site)/[country]/[location]/+page.svelte
index 216e425..c1836f1 100644
--- a/apps/website/src/routes/(site)/[country]/[location]/+page.svelte
+++ b/apps/website/src/routes/(site)/[country]/[location]/+page.svelte
@@ -91,7 +91,7 @@
}
}`,
})
- const { data: { photos }} = await res.json()
+ const { data: { photos } } = await res.json()
if (photos) {
// Return new photos
@@ -219,7 +219,6 @@
/>
-
@@ -241,7 +240,7 @@
{/if}
-
\ No newline at end of file
+
diff --git a/apps/website/src/routes/(site)/[country]/[location]/[photo]/+page.svelte b/apps/website/src/routes/(site)/[country]/[location]/[photo]/+page.svelte
index 75a02b4..11655bd 100644
--- a/apps/website/src/routes/(site)/[country]/[location]/[photo]/+page.svelte
+++ b/apps/website/src/routes/(site)/[country]/[location]/[photo]/+page.svelte
@@ -93,10 +93,10 @@
const handleKeydown = ({ key, defaultPrevented }: KeyboardEvent) => {
if (defaultPrevented) return
switch (key) {
- case 'ArrowLeft': goToPrevious(); break;
- case 'ArrowRight': goToNext(); break;
- case 'Escape': closeViewer(); break;
- default: return;
+ case 'ArrowLeft': goToPrevious(); break
+ case 'ArrowRight': goToNext(); break
+ case 'Escape': closeViewer(); break
+ default: return
}
}
@@ -105,15 +105,15 @@
// Swipe up and down on mobile/small screens
if (innerWidth < 992) {
switch (detail) {
- case '-y': goToNext(); break;
- case 'y': goToPrevious(); break;
+ case '-y': goToNext(); break
+ case 'y': goToPrevious(); break
}
}
// Swipe left and right on larger screens
else {
switch (detail) {
- case '-x': goToNext(); break;
- case 'x': goToPrevious(); break;
+ case '-x': goToNext(); break
+ case 'x': goToPrevious(); break
}
}
}
@@ -174,7 +174,7 @@
}
}`,
})
- const { data: { photos: newPhotos }} = await res.json()
+ const { data: { photos: newPhotos } } = await res.json()
// Not loading anymore
isLoading = false
@@ -320,7 +320,11 @@
-
+
{#each visiblePhotos as { id, image, title }, index (id)}
{#if isFullscreen}
-
@@ -398,4 +403,4 @@
{/if}
-
\ No newline at end of file
+
diff --git a/apps/website/src/routes/(site)/about/+page.server.ts b/apps/website/src/routes/(site)/about/+page.server.ts
index 179bc19..690d01d 100644
--- a/apps/website/src/routes/(site)/about/+page.server.ts
+++ b/apps/website/src/routes/(site)/about/+page.server.ts
@@ -70,7 +70,7 @@ export const load = (async ({ setHeaders }) => {
seo_image { id }
}
}`)
- const { data: { about, photos: photosIds }} = res
+ const { data: { about, photos: photosIds } } = res
// Get random photos
const randomPhotosIds = [...getRandomItems(photosIds, 42)].map(({ id }) => id)
@@ -89,7 +89,7 @@ export const load = (async ({ setHeaders }) => {
}`)
if (photosRes) {
- const { data: { photo: photos }} = photosRes
+ const { data: { photo: photos } } = photosRes
setHeaders({ 'Cache-Control': 'public, max-age=1, stale-while-revalidate=604799' })
diff --git a/apps/website/src/routes/(site)/about/+page.svelte b/apps/website/src/routes/(site)/about/+page.svelte
index f6e0098..983817d 100644
--- a/apps/website/src/routes/(site)/about/+page.svelte
+++ b/apps/website/src/routes/(site)/about/+page.svelte
@@ -3,7 +3,7 @@
-
\ No newline at end of file
+
diff --git a/apps/website/src/routes/(site)/photos/+page.svelte b/apps/website/src/routes/(site)/photos/+page.svelte
index 0c2205d..f24c9b8 100644
--- a/apps/website/src/routes/(site)/photos/+page.svelte
+++ b/apps/website/src/routes/(site)/photos/+page.svelte
@@ -193,7 +193,7 @@
}`,
})
- const { data: { photos }} = await res.json()
+ const { data: { photos } } = await res.json()
if (photos) {
// Return new photos
@@ -496,4 +496,4 @@
-
\ No newline at end of file
+
diff --git a/apps/website/src/routes/(site)/subscribe/+page.svelte b/apps/website/src/routes/(site)/subscribe/+page.svelte
index 875687a..3fc51da 100644
--- a/apps/website/src/routes/(site)/subscribe/+page.svelte
+++ b/apps/website/src/routes/(site)/subscribe/+page.svelte
@@ -96,4 +96,4 @@
-
\ No newline at end of file
+
diff --git a/apps/website/src/routes/(site)/terms/+page.svelte b/apps/website/src/routes/(site)/terms/+page.svelte
index 2847366..ef39a77 100644
--- a/apps/website/src/routes/(site)/terms/+page.svelte
+++ b/apps/website/src/routes/(site)/terms/+page.svelte
@@ -46,4 +46,4 @@
-
\ No newline at end of file
+
diff --git a/apps/website/src/routes/+error.svelte b/apps/website/src/routes/+error.svelte
index 52e1188..8e42fd9 100644
--- a/apps/website/src/routes/+error.svelte
+++ b/apps/website/src/routes/+error.svelte
@@ -82,4 +82,4 @@
-
\ No newline at end of file
+
diff --git a/apps/website/src/routes/+layout.server.ts b/apps/website/src/routes/+layout.server.ts
index b264096..b22d0ad 100644
--- a/apps/website/src/routes/+layout.server.ts
+++ b/apps/website/src/routes/+layout.server.ts
@@ -88,7 +88,7 @@ export const load = (async () => {
}`)
if (res) {
- const { data: { countPhotos, countLocations, countCountries, ...rest }} = res
+ const { data: { countPhotos, countLocations, countCountries, ...rest } } = res
return {
...rest,
diff --git a/apps/website/src/routes/+layout.svelte b/apps/website/src/routes/+layout.svelte
index b1f8d3d..685ec72 100644
--- a/apps/website/src/routes/+layout.svelte
+++ b/apps/website/src/routes/+layout.svelte
@@ -77,4 +77,4 @@
{#if browser}
-{/if}
\ No newline at end of file
+{/if}
diff --git a/apps/website/src/routes/+page.server.ts b/apps/website/src/routes/+page.server.ts
index c857fd4..73a17c5 100644
--- a/apps/website/src/routes/+page.server.ts
+++ b/apps/website/src/routes/+page.server.ts
@@ -18,7 +18,7 @@ export const load = (async ({ setHeaders }) => {
id
}
}`)
- const { data: { photo: photosIds }} = totalRes
+ const { data: { photo: photosIds } } = totalRes
// Get random photos
const randomPhotosIds = [...getRandomItems(photosIds, 11)].map(({ id }) => id)
@@ -41,7 +41,7 @@ export const load = (async ({ setHeaders }) => {
image { id }
}
}`)
- const { data: { photo: photos }} = photosRes
+ const { data: { photo: photos } } = photosRes
if (photos) {
setHeaders({ 'Cache-Control': 'public, max-age=1, stale-while-revalidate=599' })
diff --git a/apps/website/src/routes/+page.svelte b/apps/website/src/routes/+page.svelte
index 059c6a9..387c6b7 100644
--- a/apps/website/src/routes/+page.svelte
+++ b/apps/website/src/routes/+page.svelte
@@ -167,4 +167,4 @@
-
\ No newline at end of file
+
diff --git a/apps/website/src/routes/sitemap.xml/+server.ts b/apps/website/src/routes/sitemap.xml/+server.ts
index 122f8c6..d6b95f6 100644
--- a/apps/website/src/routes/sitemap.xml/+server.ts
+++ b/apps/website/src/routes/sitemap.xml/+server.ts
@@ -54,7 +54,7 @@ export const GET = (async ({ url, setHeaders }) => {
})),
// Products
- ...products.map(({ location: { slug }}) => ({
+ ...products.map(({ location: { slug } }) => ({
path: `/shop/poster-${slug}`,
priority: 0.7,
frequency: 'monthly',
diff --git a/apps/website/src/service-workers.ts b/apps/website/src/service-workers.ts
index 63ca5b6..411063f 100644
--- a/apps/website/src/service-workers.ts
+++ b/apps/website/src/service-workers.ts
@@ -15,12 +15,11 @@ const cached = build.concat(files);
.then(cache => cache.addAll(cached))
.then(() => {
// if you use typescript:
- (self as unknown as ServiceWorkerGlobalScope).skipWaiting();
+ (self as unknown as ServiceWorkerGlobalScope).skipWaiting()
// self.skipWaiting();
})
- );
- }
-);
+ )
+});
// self.addEventListener(
// if you use typescript:
@@ -38,7 +37,7 @@ const cached = build.concat(files);
(self as unknown as ServiceWorkerGlobalScope).clients.claim()
// self.clients.claim()
})
- );
+ )
})
@@ -87,28 +86,27 @@ async function fetchAndCache(request: Request) {
url.port !== self.location.port) ||
// ignore /_app/version.json
url.pathname === '/_app/version.json'
- ) {
- return
- }
-
- // always serve static files and bundler-generated assets from cache
- const isStaticAsset = url.host === self.location.host && cached.indexOf(url.pathname) > -1
-
- if (event.request.cache === 'only-if-cached' && !isStaticAsset) {
- return
- }
-
- // for everything else, try the network first, falling back to cache if the
- // user is offline. (If the pages never change, you might prefer a cache-first
- // approach to a network-first one.)
- event.respondWith(
- (async () => {
- // always serve static files and bundler-generated assets from cache.
- // if your application has other URLs with data that will never change,
- // set this variable to true for them and they will only be fetched once.
- const cachedAsset = isStaticAsset && (await caches.match(event.request))
- return cachedAsset || fetchAndCache(event.request)
- })()
- )
+ ) {
+ return
}
-)
\ No newline at end of file
+
+ // always serve static files and bundler-generated assets from cache
+ const isStaticAsset = url.host === self.location.host && cached.indexOf(url.pathname) > -1
+
+ if (event.request.cache === 'only-if-cached' && !isStaticAsset) {
+ return
+ }
+
+ // for everything else, try the network first, falling back to cache if the
+ // user is offline. (If the pages never change, you might prefer a cache-first
+ // approach to a network-first one.)
+ event.respondWith(
+ (async () => {
+ // always serve static files and bundler-generated assets from cache.
+ // if your application has other URLs with data that will never change,
+ // set this variable to true for them and they will only be fetched once.
+ const cachedAsset = isStaticAsset && (await caches.match(event.request))
+ return cachedAsset || fetchAndCache(event.request)
+ })()
+ )
+})
diff --git a/apps/website/src/utils/analytics.ts b/apps/website/src/utils/analytics.ts
index fa79ad5..9480c48 100644
--- a/apps/website/src/utils/analytics.ts
+++ b/apps/website/src/utils/analytics.ts
@@ -5,4 +5,4 @@ export const sendEvent = (action: string, props?: any) => {
if (typeof plausible !== 'undefined') {
plausible(action, props)
}
-}
\ No newline at end of file
+}
diff --git a/apps/website/src/utils/api.ts b/apps/website/src/utils/api.ts
index f05732d..a90366f 100644
--- a/apps/website/src/utils/api.ts
+++ b/apps/website/src/utils/api.ts
@@ -78,4 +78,4 @@ export const photoFields = `
// if (format) args += `&format=${format}`
// return `${API_URL}/assets/${id}?width=${width}&height=${height}&fit=${fit}${args}`
-// }
\ No newline at end of file
+// }
diff --git a/apps/website/src/utils/constants.ts b/apps/website/src/utils/constants.ts
index ceb2079..b2c1463 100644
--- a/apps/website/src/utils/constants.ts
+++ b/apps/website/src/utils/constants.ts
@@ -7,4 +7,4 @@ export const DELAY = {
export const DURATION = {
PAGE_IN: 400,
PAGE_OUT: 400,
-}
\ No newline at end of file
+}
diff --git a/apps/website/src/utils/functions/notifications.ts b/apps/website/src/utils/functions/notifications.ts
index 64605bb..827016f 100644
--- a/apps/website/src/utils/functions/notifications.ts
+++ b/apps/website/src/utils/functions/notifications.ts
@@ -29,4 +29,4 @@ export const addNotification = (notification: ShopNotification) => {
*/
export const dismissNotification = (id: number) => {
cartNotifications.update((all) => all.filter((t) => t.id !== id))
-}
\ No newline at end of file
+}
diff --git a/apps/website/src/utils/functions/shop.ts b/apps/website/src/utils/functions/shop.ts
index c107be9..61a90be 100644
--- a/apps/website/src/utils/functions/shop.ts
+++ b/apps/website/src/utils/functions/shop.ts
@@ -73,4 +73,4 @@ export const removeCartItem = async (productId: string) => {
if (updatedCart) {
return updatedCart
}
-}
\ No newline at end of file
+}
diff --git a/apps/website/src/utils/functions/shopServer.ts b/apps/website/src/utils/functions/shopServer.ts
index e826a22..b0745af 100644
--- a/apps/website/src/utils/functions/shopServer.ts
+++ b/apps/website/src/utils/functions/shopServer.ts
@@ -32,4 +32,4 @@ export const fetchSwell = async (path: string, options?: any) => {
return res
}
}
-}
\ No newline at end of file
+}
diff --git a/apps/website/src/utils/interactions/swipe.ts b/apps/website/src/utils/interactions/swipe.ts
index 8c17cf1..b29d940 100644
--- a/apps/website/src/utils/interactions/swipe.ts
+++ b/apps/website/src/utils/interactions/swipe.ts
@@ -83,4 +83,4 @@ export const swipe = (
node.removeEventListener('pointerup', onUp)
}
}
-}
\ No newline at end of file
+}
diff --git a/apps/website/src/utils/polyfills.ts b/apps/website/src/utils/polyfills.ts
index 115817e..6216879 100644
--- a/apps/website/src/utils/polyfills.ts
+++ b/apps/website/src/utils/polyfills.ts
@@ -2,4 +2,4 @@
* Add tabindex outlines when navigating with keyboard
* focus-visible polyfill: adds classes when tabbing
*/
- import 'focus-visible'
\ No newline at end of file
+import 'focus-visible'
diff --git a/apps/website/src/utils/stores/index.ts b/apps/website/src/utils/stores/index.ts
index d397a81..bd5660e 100644
--- a/apps/website/src/utils/stores/index.ts
+++ b/apps/website/src/utils/stores/index.ts
@@ -21,4 +21,4 @@ if (typeof localStorage !== 'undefined') {
const parsedValue = JSON.parse(value)
localStorage.setItem('seenLocations', JSON.stringify(parsedValue))
})
-}
\ No newline at end of file
+}
diff --git a/apps/website/src/utils/stores/shop.ts b/apps/website/src/utils/stores/shop.ts
index a6c7272..4c5db5f 100644
--- a/apps/website/src/utils/stores/shop.ts
+++ b/apps/website/src/utils/stores/shop.ts
@@ -25,4 +25,4 @@ export const cartIsUpdating: Writable = writable(false)
/** Amount of products present in cart */
export const cartAmount: Readable = derived(cartData, ($cart) => {
return $cart && $cart.item_quantity > 0 ? $cart.item_quantity : 0
-})
\ No newline at end of file
+})
diff --git a/packages/config/eslintrc.config.cjs b/packages/config/eslintrc.config.cjs
index 9cce9bf..c0fda97 100644
--- a/packages/config/eslintrc.config.cjs
+++ b/packages/config/eslintrc.config.cjs
@@ -39,7 +39,7 @@ module.exports = {
========================================= */
// Use spaces over tabs
'no-tabs': 'error',
- indent: ['error', 4],
+ indent: ['error', 4, { SwitchCase: 1 }],
// Use single quote in javascript
quotes: ['error', 'single', {
avoidEscape: true,