Skip to content

Commit

Permalink
build: fix prettier format command not processing svelte files (#323)
Browse files Browse the repository at this point in the history
  • Loading branch information
peterpeterparker authored Nov 1, 2023
1 parent 74febd3 commit 0d432d9
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 10 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "prettier --check . && eslint .",
"format": "prettier --write .",
"lint": "prettier --check './**/*.{ts,js,mjs,json,scss,css,svelte,html,md}' && eslint .",
"format": "prettier --write './**/*.{ts,js,mjs,json,scss,css,svelte,html,md}'",
"test": "vitest --config ./vitest.config.ts",
"download:samples": "./scripts/download-samples.sh",
"i18n": "node scripts/i18n.types.mjs && prettier --write ./src/lib/types/i18n.d.ts",
Expand Down
6 changes: 3 additions & 3 deletions src/lib/components/InfiniteScroll.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
const onIntersection = (
entries: IntersectionObserverEntry[],
observer: IntersectionObserver
observer: IntersectionObserver,
) => {
const intersecting: IntersectionObserverEntry | undefined = entries.find(
({ isIntersecting }: IntersectionObserverEntry) => isIntersecting
({ isIntersecting }: IntersectionObserverEntry) => isIntersecting,
);
if (isNullish(intersecting)) {
Expand All @@ -41,7 +41,7 @@
const observer: IntersectionObserver = new IntersectionObserver(
onIntersection,
options
options,
);
// Svelte workaround: beforeUpdate is called twice when bindings are used -> https://github.com/sveltejs/svelte/issues/6016
Expand Down
3 changes: 2 additions & 1 deletion src/lib/components/Menu.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@
margin-left: 0;
}
transition: margin-left var(--animation-time-normal)
transition:
margin-left var(--animation-time-normal)
var(--menu-animation-timing-function),
width var(--animation-time-normal) var(--menu-animation-timing-function);
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/ProgressBar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
border-radius: var(--current-height);
box-shadow: var(--input-box-shadow);
border: 0;
&::-moz-progress-bar {
background-color: #fff;
box-shadow: var(--input-box-shadow);
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/QRCode.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
// We draw the canvas larger and scale its container down to avoid blurring on high-density displays
size: size.width * 2,
},
canvas
canvas,
);
dispatch("nnsQRCodeRendered");
Expand Down
5 changes: 4 additions & 1 deletion src/lib/components/Tag.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
export let testId = "tag";
</script>

<svelte:element this={tagName} data-tid={testId} class={`tag ${size === "large" ? "tag--large" : ""} ${intent}`}
<svelte:element
this={tagName}
data-tid={testId}
class={`tag ${size === "large" ? "tag--large" : ""} ${intent}`}
><slot /></svelte:element
>

Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/Toasts.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
let toasts: ToastMsg[] = [];
$: toasts = $toastsStore.filter(
({ position: pos }) => (pos ?? "bottom") === position
({ position: pos }) => (pos ?? "bottom") === position,
);
let hasErrors: boolean;
Expand Down

0 comments on commit 0d432d9

Please sign in to comment.