Fix ESLint errors

This commit is contained in:
MacFJA
2021-09-10 22:52:13 +02:00
parent c2c76df660
commit d1c04f0bf7
12 changed files with 16 additions and 41 deletions

View File

@@ -5,7 +5,6 @@
export let description = '';
export let tags = [];
export let stars;
export let addedOn = new Date();
export let url = '';
export let npm = '';
export let repo = '';
@@ -33,9 +32,9 @@
};
</script>
<div class="card" class:active id="component-{escape(title)}">
<div class="card" class:active id="component-{encodeURI(title)}">
<h3>
<a href="#component-{escape(title)}">#</a> <a href={url}>{title}</a>
<a href="#component-{encodeURI(title)}">#</a> <a href={url}>{title}</a>
{#if npm}<Tag
click={() => copyToClipboard(`${packageManagers[manager]}l ${cleanupNpm(npm)}`)}
variant="copy"

View File

@@ -3,7 +3,7 @@
</script>
<div class="list">
<h1 id="category-{escape(title)}">{title} <a href="#category-{escape(title)}">#</a></h1>
<h1 id="category-{encodeURI(title)}">{title} <a href="#category-{encodeURI(title)}">#</a></h1>
<div class="grid">
<slot />
</div>

View File

@@ -59,20 +59,4 @@
a:hover {
text-decoration: underline;
}
/* mobile design */
@media only screen and (max-width: 768px) {
.wrapper {
display: flex;
flex-direction: column;
}
.society-wrapper {
flex: 0 1 auto;
margin-top: 5%;
padding: 2rem;
--tw-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000),
var(--tw-shadow);
}
}
</style>

View File

@@ -65,11 +65,6 @@
var(--tw-shadow);
border-radius: 0.5rem;
}
h5.title {
font-size: 1.5em;
margin-block-start: 0.8em;
margin-block-end: 0.5em;
}
h6.continent {
font-size: 25px;
color: #64748b;

View File

@@ -1,6 +1,5 @@
<script>
export let nodes;
export let currentPath;
</script>
<ul>

View File

@@ -4,8 +4,7 @@
import { categories } from '$lib/stores/recipes';
import { page } from '$app/stores';
export let title,
description = '';
export let title;
</script>
<main>
@@ -40,9 +39,6 @@
.TOCLink.active a {
font-weight: bold;
}
.TOCLink img {
height: 1em;
}
@media (min-width: 1024px) {
main {
display: flex;

View File

@@ -6,8 +6,7 @@
const childrenNodes = $categories.find((c) => c.path === $page.path).children || [];
export let title,
description = '';
export let title;
</script>
<main>
@@ -50,9 +49,6 @@
.TOCLink.active a {
font-weight: bold;
}
.TOCLink img {
height: 1em;
}
@media (min-width: 1024px) {
main {
display: flex;

View File

@@ -2,7 +2,7 @@ import type { Writable } from 'svelte/store';
import { writable } from 'svelte/store';
type Recipe = {
meta: any;
meta: unknown;
filename: string;
path: string;
children: Recipe[];

View File

@@ -1,7 +1,9 @@
/**
* @type {import('@sveltejs/kit').RequestHandler}
*/
export async function get() {
import type { EndpointOutput } from '@sveltejs/kit';
export async function get(): Promise<EndpointOutput> {
const events = await Promise.all(
Object.entries(import.meta.glob('./*.svx')).map(async ([path, page]) => {
const { metadata } = await page();

View File

@@ -1,5 +1,7 @@
<script lang="ts" context="module">
export async function load({ fetch }) {
import type { LoadInput, LoadOutput } from '@sveltejs/kit';
export async function load({ fetch }: LoadInput): Promise<LoadOutput> {
const res = await fetch('/events/events');
if (res.ok) return { props: { events: await res.json() } };
return {

View File

@@ -1,8 +1,9 @@
<script lang="ts" context="module">
import { categories } from '$lib/stores/recipes';
import '$styles/highlight.css';
import type { LoadInput, LoadOutput } from '@sveltejs/kit';
export async function load({ fetch }) {
export async function load({ fetch }: LoadInput): Promise<LoadOutput> {
const res = await fetch('/recipes/recipes');
const recipeCategories = await res.json();

View File

@@ -1,7 +1,8 @@
import type { EndpointOutput } from '@sveltejs/kit';
/**
* @type {import('@sveltejs/kit').RequestHandler}
*/
export async function get() {
export async function get(): Promise<EndpointOutput> {
const pages = await Promise.all(
Object.entries(import.meta.glob('./**/*.svx')).map(async ([path, page]) => {
const { metadata } = await page();