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"], ignorePatterns: ["*.cjs"],
overrides: [{ files: ["*.svelte"], processor: "svelte3/svelte3" }], overrides: [{ files: ["*.svelte"], processor: "svelte3/svelte3" }],
plugins: ["svelte3", "@typescript-eslint"],
parser: "@typescript-eslint/parser", parser: "@typescript-eslint/parser",
parserOptions: { parserOptions: {
sourceType: "module", sourceType: "module",
ecmaVersion: 2020, ecmaVersion: 2020,
}, },
plugins: ["svelte3", "@typescript-eslint"],
root: true, root: true,
settings: { settings: {
"svelte3/typescript": () => require("typescript"), "svelte3/typescript": () => require("typescript"),

View file

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

2
src/app.d.ts vendored
View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,5 +1,5 @@
import adapter from "@sveltejs/adapter-node" import adapter from "@sveltejs/adapter-node"
import preprocess from "svelte-preprocess" import { vitePreprocess } from "@sveltejs/kit/vite"
/** @type {import('@sveltejs/kit').Config} */ /** @type {import('@sveltejs/kit').Config} */
const 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 // for more information about preprocessors
preprocess: [ preprocess: vitePreprocess(),
preprocess({
postcss: true,
}),
],
kit: { kit: {
adapter: adapter({ adapter: adapter({

View file

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