Skip to content

Commit f86316e

Browse files
committed
chore: fixed lint of pictique.
1 parent 70aac9a commit f86316e

File tree

36 files changed

+125
-227
lines changed

36 files changed

+125
-227
lines changed

infrastructure/web3-adapter/src/evault/evault.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { GraphQLClient } from "graphql-request";
2-
import axios, { AxiosInstance } from "axios";
2+
import axios, { type AxiosInstance } from "axios";
33
import { v4 } from "uuid";
44

55
export interface MetaEnvelope {

infrastructure/web3-adapter/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as fs from "fs/promises";
22
import path from "path";
3-
import { IMapping } from "./mapper/mapper.types";
3+
import type { IMapping } from "./mapper/mapper.types";
44
import { fromGlobal, toGlobal } from "./mapper/mapper";
55
import { MappingDatabase } from "./db";
66
import { EVaultClient } from "./evault/evault";

infrastructure/web3-adapter/src/mapper/mapper.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { IMappingConversionOptions, IMapperResponse } from "./mapper.types";
1+
import type { IMappingConversionOptions, IMapperResponse } from "./mapper.types";
22

33
export function getValueByPath(obj: Record<string, any>, path: string): any {
44
// Handle array mapping case (e.g., "images[].src")
@@ -57,11 +57,11 @@ export async function fromGlobal({
5757
}: IMappingConversionOptions): Promise<Omit<IMapperResponse, "ownerEvault">> {
5858
const result: Record<string, unknown> = {};
5959

60-
for (let [localKey, globalPathRaw] of Object.entries(
60+
for (const [localKey, globalPathRaw] of Object.entries(
6161
mapping.localToUniversalMap,
6262
)) {
6363
let value: any;
64-
let targetKey: string = localKey;
64+
const targetKey: string = localKey;
6565
let tableRef: string | null = null;
6666

6767
const internalFnMatch = globalPathRaw.match(/^__(\w+)\((.+)\)$/);
@@ -164,7 +164,7 @@ export async function toGlobal({
164164
}: IMappingConversionOptions): Promise<IMapperResponse> {
165165
const result: Record<string, unknown> = {};
166166

167-
for (let [localKey, globalPathRaw] of Object.entries(
167+
for (const [localKey, globalPathRaw] of Object.entries(
168168
mapping.localToUniversalMap,
169169
)) {
170170
let value: any;

infrastructure/web3-adapter/src/mapper/mapper.types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { MappingDatabase } from "../db";
1+
import type { MappingDatabase } from "../db";
22

33
export interface IMapping {
44
/**

platforms/pictique/src/lib/components/CreatePostModal.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script lang="ts">
2-
import { createEventDispatcher } from 'svelte';
32
import { createPost } from '$lib/stores/posts';
43
import Button from '$lib/ui/Button/Button.svelte';
4+
import { createEventDispatcher } from 'svelte';
55
66
const dispatch = createEventDispatcher<{
77
close: void;
@@ -65,7 +65,7 @@
6565
placeholder="What's on your mind??"
6666
class="focus:border-brand-burnt-orange w-full rounded-lg border border-gray-300 p-3 focus:outline-none"
6767
rows="4"
68-
/>
68+
></textarea>
6969

7070
<div class="space-y-2">
7171
<label class="block text-sm font-medium text-gray-700"> Add Images </label>
@@ -80,7 +80,7 @@
8080

8181
{#if images.length > 0}
8282
<div class="grid grid-cols-3 gap-4">
83-
{#each images as image, index}
83+
{#each images as image, index (index)}
8484
<div class="relative">
8585
<img
8686
src={image}

platforms/pictique/src/lib/fragments/ActionMenu/ActionMenu.svelte

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@
5454
<button
5555
bind:this={buttonEl}
5656
onclick={(e) => {
57-
(e.preventDefault(), openMenu());
57+
e.preventDefault();
58+
openMenu();
5859
}}
5960
>
6061
<HugeiconsIcon icon={MoreVerticalIcon} size={24} color="black" />
@@ -68,7 +69,7 @@
6869
bind:this={menuEl}
6970
class={cn([cBase, restProps.class].join(' '))}
7071
>
71-
{#each options as option}
72+
{#each options as option, i (i)}
7273
<!-- svelte-ignore a11y_click_events_have_key_events -->
7374
<!-- svelte-ignore a11y_no_noninteractive_element_interactions -->
7475
<li

platforms/pictique/src/lib/fragments/BottomNav/BottomNav.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import { Camera, CommentsTwo, Home, Search } from '$lib/icons';
55
import { isNavigatingThroughNav } from '$lib/store/store.svelte';
66
import { uploadedImages } from '$lib/store/store.svelte';
7-
import { revokeImageUrls } from '$lib/utils';
7+
import { getAuthId, revokeImageUrls } from '$lib/utils';
88
import type { HTMLAttributes } from 'svelte/elements';
99
1010
interface IBottomNavProps extends HTMLAttributes<HTMLElement> {
@@ -17,6 +17,7 @@
1717
}: IBottomNavProps = $props();
1818
1919
const tabs = ['home', 'discover', 'post', 'messages', 'profile', 'settings'];
20+
let ownerId: string | null = $derived(getAuthId());
2021
let previousTab = $state('home');
2122
let _activeTab = $derived(page.url.pathname);
2223
let fullPath = $derived(page.url.pathname);

platforms/pictique/src/lib/fragments/Comment/Comment.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<script lang="ts">
22
import { Like } from '$lib/icons';
3+
import type { CommentType } from '$lib/types';
34
import { Avatar } from '$lib/ui';
45
import { cn } from '$lib/utils';
56
import type { HTMLAttributes } from 'svelte/elements';
6-
import type { CommentType } from '$lib/types';
77
88
interface ICommentProps extends HTMLAttributes<HTMLElement> {
99
comment: CommentType;
@@ -32,7 +32,7 @@
3232
</div>
3333
{#if comment?.replies?.length}
3434
<ul class="ms-12 mt-4 space-y-2">
35-
{#each comment.replies.slice(0, visibleReplies) as reply}
35+
{#each comment.replies.slice(0, visibleReplies) as reply, i (i)}
3636
<li>
3737
<div class="align-start flex gap-2">
3838
<Avatar src={reply.userImgSrc ?? '/images/user.png'} size="sm" />

platforms/pictique/src/lib/fragments/CreatePostModal/CreatePostModal.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script lang="ts">
2-
import { createPost, closeCreatePostModal } from '$lib/stores/posts';
3-
import Modal from '$lib/ui/Modal/Modal.svelte';
2+
import { closeCreatePostModal, createPost } from '$lib/stores/posts';
43
import Button from '$lib/ui/Button/Button.svelte';
4+
import Modal from '$lib/ui/Modal/Modal.svelte';
55
66
let text = $state('');
77
let images = $state<string[]>([]);
@@ -69,7 +69,7 @@
6969

7070
{#if images.length > 0}
7171
<div class="mb-4 grid grid-cols-2 gap-4">
72-
{#each images as image, index}
72+
{#each images as image, index (index)}
7373
<div class="relative">
7474
<!-- svelte-ignore a11y_img_redundant_alt -->
7575
<img

platforms/pictique/src/lib/fragments/Header/Header.svelte

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,8 @@
11
<script lang="ts">
22
import { cn } from '$lib/utils';
3-
import {
4-
ArrowLeft01Icon,
5-
ArrowLeft02Icon,
6-
MoreVerticalIcon,
7-
ZapIcon
8-
} from '@hugeicons/core-free-icons';
3+
import { ArrowLeft01Icon, ArrowLeft02Icon } from '@hugeicons/core-free-icons';
94
import { HugeiconsIcon } from '@hugeicons/svelte';
105
import type { HTMLAttributes } from 'svelte/elements';
11-
import ActionMenu from '../ActionMenu/ActionMenu.svelte';
126
137
interface IHeaderProps extends HTMLAttributes<HTMLElement> {
148
variant: 'primary' | 'secondary' | 'tertiary';
@@ -41,11 +35,11 @@
4135
tertiary: ArrowLeft02Icon
4236
};
4337
44-
const menuButton = {
45-
primary: ZapIcon,
46-
secondary: MoreVerticalIcon,
47-
tertiary: MoreVerticalIcon
48-
};
38+
// const menuButton = {
39+
// primary: ZapIcon,
40+
// secondary: MoreVerticalIcon,
41+
// tertiary: MoreVerticalIcon
42+
// };
4943
5044
const classes = $derived({
5145
common: cn(
@@ -87,10 +81,9 @@
8781
<button
8882
class={cn(['cursor-pointer rounded-full p-2 hover:bg-gray-100', classes.background])}
8983
onclick={callback}
84+
aria-label="Callback"
9085
>
9186
</button>
92-
{:else if variant === 'secondary' && options && isCallBackNeeded}
93-
<div></div>
9487
{/if}
9588
</header>
9689

0 commit comments

Comments
 (0)