Upgrade packages & lint (partially)

This commit is contained in:
Emmanuel 2023-01-31 16:12:09 +01:00
parent b141cccf8b
commit 379d414649
23 changed files with 33 additions and 80 deletions

View file

@ -11,12 +11,12 @@ module.exports = {
],
ignorePatterns: ["*.cjs"],
overrides: [{ files: ["*.svelte"], processor: "svelte3/svelte3" }],
plugins: ["svelte3", "@typescript-eslint"],
parser: "@typescript-eslint/parser",
parserOptions: {
sourceType: "module",
ecmaVersion: 2020,
},
plugins: ["svelte3", "@typescript-eslint"],
root: true,
settings: {
"svelte3/typescript": () => require("typescript"),

View file

@ -16,8 +16,8 @@
"configure": "tsx src/scripts/configure.ts",
"dev": "vite dev",
"format": "prettier --plugin-search-dir . --write .",
"lint": "prettier --plugin-search-dir . --check . && eslint .",
"package": "svelte-package",
"lint": "prettier --check --plugin-search-dir . . && eslint .",
"package": "svelte-kit sync && svelte-package",
"preview": "vite preview",
"test": "playwright test"
},

2
src/app.d.ts vendored
View file

@ -2,8 +2,8 @@
// for information about these interfaces
// and what to do when importing types
declare namespace App {
// interface Error {}
// interface Locals {}
// interface PageData {}
// interface Error {}
// interface Platform {}
}

View file

@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width" />
%sveltekit.head%
</head>
<body>
<div>%sveltekit.body%</div>
<body data-sveltekit-preload-data="hover">
<div style="display: contents">%sveltekit.body%</div>
</body>
</html>

View file

@ -62,7 +62,11 @@
</script>
{#if componentAndProperties === undefined}
<div class="inline-flex align-top" on:click|stopPropagation={toggle}>
<div
class="inline-flex align-top"
on:click|stopPropagation={toggle}
on:keyup|stopPropagation={toggle}
>
<iconify-icon class="mt-1 inline-block shrink-0" icon={dash} inline />
<a class="link-hover link-primary link" href={pathnameFromLegalId(id)}>
{lien["#text"]}
@ -72,6 +76,7 @@
<div
class="inline-flex cursor-pointer align-top"
on:click|stopPropagation={toggle}
on:keyup|stopPropagation={toggle}
>
<iconify-icon
class="mt-1 inline-block shrink-0"

View file

@ -10,10 +10,7 @@ import { db } from "$lib/server/database"
import type { RequestHandler } from "./$types"
export function auditQuery(
audit: Audit,
query: URLSearchParams,
): [unknown, unknown] {
function auditQuery(audit: Audit, query: URLSearchParams): [unknown, unknown] {
if (query == null) {
return [query, null]
}

View file

@ -9,10 +9,7 @@ import { db } from "$lib/server/database"
import type { RequestHandler } from "./$types"
export function auditQuery(
audit: Audit,
query: URLSearchParams,
): [unknown, unknown] {
function auditQuery(audit: Audit, query: URLSearchParams): [unknown, unknown] {
if (query == null) {
return [query, null]
}

View file

@ -22,10 +22,7 @@ import { joinSqlClauses } from "$lib/server/sql"
import type { RequestHandler } from "./$types"
export function auditQuery(
audit: Audit,
query: URLSearchParams,
): [unknown, unknown] {
function auditQuery(audit: Audit, query: URLSearchParams): [unknown, unknown] {
if (query == null) {
return [query, null]
}

View file

@ -10,10 +10,7 @@ import { db } from "$lib/server/database"
import type { RequestHandler } from "./$types"
export function auditQuery(
audit: Audit,
query: URLSearchParams,
): [unknown, unknown] {
function auditQuery(audit: Audit, query: URLSearchParams): [unknown, unknown] {
if (query == null) {
return [query, null]
}

View file

@ -7,10 +7,7 @@ import { db } from "$lib/server/database"
import type { PageServerLoad } from "./$types"
export function auditQuery(
audit: Audit,
query: URLSearchParams,
): [unknown, unknown] {
function auditQuery(audit: Audit, query: URLSearchParams): [unknown, unknown] {
if (query == null) {
return [query, null]
}

View file

@ -7,10 +7,7 @@ import { urlFromUrlAndQuery } from "$lib/urls"
import type { PageLoad } from "./$types"
export function auditQuery(
audit: Audit,
query: URLSearchParams,
): [unknown, unknown] {
function auditQuery(audit: Audit, query: URLSearchParams): [unknown, unknown] {
if (query == null) {
return [query, null]
}

View file

@ -7,10 +7,7 @@ import { db } from "$lib/server/database"
import type { PageServerLoad } from "./$types"
export function auditQuery(
audit: Audit,
query: URLSearchParams,
): [unknown, unknown] {
function auditQuery(audit: Audit, query: URLSearchParams): [unknown, unknown] {
if (query == null) {
return [query, null]
}

View file

@ -7,10 +7,7 @@ import { db } from "$lib/server/database"
import type { PageServerLoad } from "./$types"
export function auditQuery(
audit: Audit,
query: URLSearchParams,
): [unknown, unknown] {
function auditQuery(audit: Audit, query: URLSearchParams): [unknown, unknown] {
if (query == null) {
return [query, null]
}

View file

@ -7,10 +7,7 @@ import { db } from "$lib/server/database"
import type { PageServerLoad } from "./$types"
export function auditQuery(
audit: Audit,
query: URLSearchParams,
): [unknown, unknown] {
function auditQuery(audit: Audit, query: URLSearchParams): [unknown, unknown] {
if (query == null) {
return [query, null]
}

View file

@ -7,10 +7,7 @@ import { db } from "$lib/server/database"
import type { PageServerLoad } from "./$types"
export function auditQuery(
audit: Audit,
query: URLSearchParams,
): [unknown, unknown] {
function auditQuery(audit: Audit, query: URLSearchParams): [unknown, unknown] {
if (query == null) {
return [query, null]
}

View file

@ -7,10 +7,7 @@ import { db } from "$lib/server/database"
import type { PageServerLoad } from "./$types"
export function auditQuery(
audit: Audit,
query: URLSearchParams,
): [unknown, unknown] {
function auditQuery(audit: Audit, query: URLSearchParams): [unknown, unknown] {
if (query == null) {
return [query, null]
}

View file

@ -7,10 +7,7 @@ import { db } from "$lib/server/database"
import type { PageServerLoad } from "./$types"
export function auditQuery(
audit: Audit,
query: URLSearchParams,
): [unknown, unknown] {
function auditQuery(audit: Audit, query: URLSearchParams): [unknown, unknown] {
if (query == null) {
return [query, null]
}

View file

@ -7,10 +7,7 @@ import { db } from "$lib/server/database"
import type { PageServerLoad } from "./$types"
export function auditQuery(
audit: Audit,
query: URLSearchParams,
): [unknown, unknown] {
function auditQuery(audit: Audit, query: URLSearchParams): [unknown, unknown] {
if (query == null) {
return [query, null]
}

View file

@ -7,10 +7,7 @@ import { db } from "$lib/server/database"
import type { PageServerLoad } from "./$types"
export function auditQuery(
audit: Audit,
query: URLSearchParams,
): [unknown, unknown] {
function auditQuery(audit: Audit, query: URLSearchParams): [unknown, unknown] {
if (query == null) {
return [query, null]
}

View file

@ -7,10 +7,7 @@ import { urlFromUrlAndQuery } from "$lib/urls"
import type { PageLoad } from "./$types"
export function auditQuery(
audit: Audit,
query: URLSearchParams,
): [unknown, unknown] {
function auditQuery(audit: Audit, query: URLSearchParams): [unknown, unknown] {
if (query == null) {
return [query, null]
}

View file

@ -7,10 +7,7 @@ import { db } from "$lib/server/database"
import type { PageServerLoad } from "./$types"
export function auditQuery(
audit: Audit,
query: URLSearchParams,
): [unknown, unknown] {
function auditQuery(audit: Audit, query: URLSearchParams): [unknown, unknown] {
if (query == null) {
return [query, null]
}

View file

@ -1,5 +1,5 @@
import adapter from "@sveltejs/adapter-node"
import preprocess from "svelte-preprocess"
import { vitePreprocess } from "@sveltejs/kit/vite"
/** @type {import('@sveltejs/kit').Config} */
const config = {
@ -12,13 +12,9 @@ const config = {
},
},
// Consult https://github.com/sveltejs/svelte-preprocess
// Consult https://kit.svelte.dev/docs/integrations#preprocessors
// for more information about preprocessors
preprocess: [
preprocess({
postcss: true,
}),
],
preprocess: vitePreprocess(),
kit: {
adapter: adapter({

View file

@ -8,11 +8,11 @@ const config = {
"./node_modules/augmented-data-viewer/**/*.{html,js,svelte,ts}",
],
plugins: [typography, daisyui],
theme: {
extend: {},
},
plugins: [typography, daisyui],
}
module.exports = config