Skip to content

Commit b4f3db7

Browse files
chore: fix lint errors in templates (#177)
* chore: fix lint errors in templates Signed-off-by: David Dal Busco <david.dalbusco@outlook.com> * chore: lint Signed-off-by: David Dal Busco <david.dalbusco@outlook.com> * chore: lint Signed-off-by: David Dal Busco <david.dalbusco@outlook.com> --------- Signed-off-by: David Dal Busco <david.dalbusco@outlook.com>
1 parent 73f515f commit b4f3db7

9 files changed

Lines changed: 37 additions & 17 deletions

File tree

templates/angular-example/src/app/components/passkey/passkey/passkey.component.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,17 @@ import { PasskeyProgress } from '../../../types/passkey';
44
import { ButtonComponent } from '../../button/button.component';
55
import { CreatePasskeyComponent } from '../create-passkey/create-passkey.component';
66
import { UsePasskeyComponent } from '../use-passkey/use-passkey.component';
7+
import { BackdropComponent } from '../../backdrop/backdrop.component';
78

89
@Component({
910
selector: 'app-passkey',
1011
templateUrl: './passkey.component.html',
11-
imports: [ButtonComponent, CreatePasskeyComponent, UsePasskeyComponent],
12+
imports: [
13+
ButtonComponent,
14+
CreatePasskeyComponent,
15+
UsePasskeyComponent,
16+
BackdropComponent,
17+
],
1218
})
1319
export class PasskeyComponent implements OnInit {
1420
readonly #passkeySupported = signal(true);

templates/nextjs-example/src/components/logout.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
import { signOut } from "@junobuild/core";
22

33
export const Logout = () => {
4+
const doSignOut = (): Promise<void> => signOut();
5+
46
return (
57
<button
68
type="button"
7-
onClick={signOut}
9+
onClick={doSignOut}
810
className="hover:text-lavender-blue-500 active:text-lavender-blue-400 mt-24 flex items-center gap-2 dark:text-white"
911
>
1012
<svg

templates/react-ts-example/src/components/Logout.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@ import { signOut } from "@junobuild/core";
22
import { FC } from "react";
33

44
export const Logout: FC = () => {
5+
const doSignOut = (): Promise<void> => signOut();
6+
57
return (
68
<button
79
type="button"
8-
onClick={signOut}
10+
onClick={doSignOut}
911
className="hover:text-lavender-blue-500 active:text-lavender-blue-400 mt-24 flex items-center gap-2 dark:text-white"
1012
>
1113
<svg

templates/sveltekit-example/eslint.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,10 @@ export default ts.config(
2929
},
3030
{
3131
ignores: ['build/', '.svelte-kit/', 'dist/', 'static/']
32+
},
33+
{
34+
rules: {
35+
'svelte/no-navigation-without-resolve': 'off'
36+
}
3237
}
3338
);

templates/sveltekit-example/src/app.d.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,6 @@ declare global {
77
// interface PageData {}
88
// interface Platform {}
99
}
10-
11-
/* eslint-disable */
12-
13-
declare namespace svelteHTML {
14-
interface HTMLAttributes<T> {
15-
onjunoSignOutAuthTimer?: (event: CustomEvent<any>) => void;
16-
onjunoExampleReload?: (event: CustomEvent<any>) => void;
17-
}
18-
}
19-
20-
/* eslint-enable */
2110
}
2211

2312
export {};
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
declare module 'svelte/elements' {
2+
/* eslint-disable */
3+
4+
export interface HTMLAttributes<T> {
5+
onjunoSignOutAuthTimer?: (event: CustomEvent<any>) => void;
6+
onjunoExampleReload?: (event: CustomEvent<any>) => void;
7+
}
8+
9+
/* eslint-enable */
10+
}
11+
12+
export {};

templates/sveltekit-example/src/lib/components/Logout.svelte

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
<script lang="ts">
22
import { signOut } from '@junobuild/core';
3+
4+
const doSignOut = (): Promise<void> => signOut();
35
</script>
46

57
<button
68
type="button"
7-
onclick={signOut}
9+
onclick={doSignOut}
810
class="hover:text-lavender-blue-500 active:text-lavender-blue-400 mt-24 flex items-center gap-2 dark:text-white"
911
>
1012
<svg

templates/vue-example/src/components/Logout.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
<script setup lang="ts">
22
import { signOut } from '@junobuild/core'
3+
4+
const doSignOut = (): Promise<void> => signOut()
35
</script>
46

57
<template>
68
<button
79
type="button"
8-
@click="signOut"
10+
@click="doSignOut"
911
class="hover:text-lavender-blue-500 active:text-lavender-blue-400 mt-24 flex items-center gap-2 dark:text-white"
1012
>
1113
<svg

templates/vue-example/src/components/passkey/CreatePasskey.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
signUp,
66
WebAuthnSignUpProgressStep,
77
} from '@junobuild/core'
8-
import type { PasskeyProgress, PasskeyProps } from '@/types/passkey.ts'
8+
import type { PasskeyProps } from '@/types/passkey.ts'
99
import { computed, ref } from 'vue'
1010
import Button from '@/components/Button.vue'
1111
import Progress from '@/components/passkey/Progress.vue'

0 commit comments

Comments
 (0)