Skip to content

Commit

Permalink
fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
jiftechnify committed Jan 8, 2024
1 parent cdd93bc commit 178266c
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 14 deletions.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
"preview": "vite preview",
"lint": "run-p type-check lint:*",
"lint:eslint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"lint:prettier": "prettier --check --loglevel warn src/**/*.{ts,tsx}",
"lint:prettier": "prettier --check --log-level warn src/**/*.{ts,tsx}",
"fix": "run-s fix:*",
"fix:eslint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0 --fix",
"fix:prettier": "prettier --check --loglevel warn src/**/*.{ts,tsx} --write",
"fix:prettier": "prettier --check --log-level warn src/**/*.{ts,tsx} --write",
"i18n-extract": "i18next src/**/*.tsx --config i18next-parser.config.js"
},
"dependencies": {
Expand Down Expand Up @@ -64,6 +64,7 @@
"eslint-plugin-react-refresh": "^0.4.3",
"i18next-parser": "^8.9.0",
"npm-run-all2": "^6.1.0",
"prettier": "^3.1.1",
"tsx": "^4.7.0",
"typescript": "^5.0.2",
"vite": "^5.0.10"
Expand Down
2 changes: 1 addition & 1 deletion src/components/ShareMusicDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const musicDataLoadableAtom = loadable(
return Promise.resolve(undefined);
}
return fetchMusicData(musicLink);
})
}),
);

type ShareMusicDialogProps = {
Expand Down
2 changes: 1 addition & 1 deletion src/components/UserStatusList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const UserStatusList = forwardRef<UserStatusListHandle>(function UserStat
},
};
},
[]
[],
);

const { t } = useTranslation();
Expand Down
2 changes: 1 addition & 1 deletion src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ import "./index.css";
ReactDOM.createRoot(document.getElementById("root")!).render(
<React.StrictMode>
<App />
</React.StrictMode>
</React.StrictMode>,
);
18 changes: 9 additions & 9 deletions src/states/nostr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export const userProfileAtomFamily = atomFamily((pubkey: string) => {
},
(a, b) => {
return a.srcEventId === b.srcEventId;
}
},
);
});

Expand All @@ -170,7 +170,7 @@ export const userStatusAtomFamily = atomFamily((pubkey: string) => {
return a === b;
}
return UserStatus.contentId(a) === UserStatus.contentId(b);
}
},
);
});

Expand Down Expand Up @@ -223,7 +223,7 @@ const pubkeyInNostrExtAtomBase = loadable(
return window.nostr.getPublicKey();
}
return Promise.resolve(undefined);
})
}),
);

const pubkeyInNostrExtAtom = atom((get) => {
Expand Down Expand Up @@ -303,9 +303,9 @@ export const fetchAccountData = async (pubkey: string): Promise<AccountMetadata>
authors: [pubkey],
kinds: [kind],
},
{ connectTimeoutMs: 3000 }
)
)
{ connectTimeoutMs: 3000 },
),
),
);
if (!isDefault && (k0 === undefined || [k3, k10002].every((ev) => ev === undefined))) {
// if some of event are not found in relays from NIP-07 ext, fallback to default relays
Expand Down Expand Up @@ -453,7 +453,7 @@ jotaiStore.sub(bootstrapFinishedAtom, async () => {
const iter = fetcherOnRxNostr.fetchLastEventPerAuthor(
{ authors: cacheMissPubkeys, relayUrls: readRelays },
{ kinds: [0] },
{ abortSignal: fetchProfilesAbortCtrl.signal, connectTimeoutMs: 3000 }
{ abortSignal: fetchProfilesAbortCtrl.signal, connectTimeoutMs: 3000 },
);

const newProfiles: UserProfile[] = [];
Expand Down Expand Up @@ -661,14 +661,14 @@ const fetchPastStatuses = async (
pubkeys: string[],
readRelays: string[],
since: number | undefined,
myPubkey: string
myPubkey: string,
): Promise<boolean> => {
fetchPastStatusesAbortCtrl = new AbortController();
const pastStatusEvIter = fetcherOnRxNostr.allEventsIterator(
readRelays,
{ kinds: [30315], authors: pubkeys, "#d": ["general", "music"] },
{ since },
{ abortSignal: fetchPastStatusesAbortCtrl.signal, connectTimeoutMs: 3000 }
{ abortSignal: fetchPastStatusesAbortCtrl.signal, connectTimeoutMs: 3000 },
);

// save statuses cache periodically
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3635,6 +3635,11 @@ prettier@^2.8.8:
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da"
integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==

prettier@^3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.1.1.tgz#6ba9f23165d690b6cbdaa88cb0807278f7019848"
integrity sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw==

process-nextick-args@~2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2"
Expand Down

0 comments on commit 178266c

Please sign in to comment.