fix: resolve lint, format and type errors

This commit is contained in:
Bart van der Braak 2023-08-08 01:58:20 +02:00
parent 539dd2acbd
commit 16045ca5ba
4 changed files with 9 additions and 7 deletions

View file

@ -1,3 +1,7 @@
module.exports = {
'**/*.{js,ts,cjs,svelte,tsx}': [() => 'tsc -p tsconfig.json --noEmit', 'eslint --fix', 'prettier --write']
'**/*.{js,ts,cjs,svelte,tsx}': [
() => 'tsc -p tsconfig.json --noEmit',
'eslint --fix',
'prettier --write'
]
};

View file

@ -30,8 +30,8 @@ function sendToAnalytics(
debug: boolean;
}
) {
const page = Object.entries(options.params).reduce(
(acc, [key, value]) => acc.replace(value, `[${key}]`),
const page = (Object.entries(options.params) as [string, string][]).reduce(
(acc: string, [key, value]: [string, string]) => acc.replace(value, `[${key}]`),
options.path
);

View file

View file

@ -1,10 +1,8 @@
<script>
/** @type {import('./$types').PageData} */
export let data;
</script>
<svelte:head>
<title>hellob.art &mdash; {data.title}</title>
<title>hellob.art &mdash;</title>
</svelte:head>
<!-- <h1>{data.title}</h1>