Skip to content

Commit

Permalink
Merge pull request #257 from cosmos/upgrade-prettier
Browse files Browse the repository at this point in the history
Upgrade prettier to 3.4.2 and re-format codebase
  • Loading branch information
webmaster128 authored Jan 14, 2025
2 parents 8247b8f + 4d53dbd commit 8edea74
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 19 deletions.
4 changes: 2 additions & 2 deletions components/ChainConnect/ChainItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default function ChainItem({ chain, hoverCardElementBoundary }: ChainItem
}
}
className={cn(
"group relative inline-flex cursor-pointer items-center justify-center gap-2 rounded-full border-2 border-white p-2.5 text-sm font-medium text-white focus:outline-none focus:ring-4 focus:ring-red-100 aria-selected:text-gray-900",
"group relative inline-flex cursor-pointer items-center justify-center gap-2 rounded-full border-2 border-white p-2.5 text-sm font-medium text-white focus:outline-none focus:ring-4 focus:ring-red-100 aria-selected:text-gray-900",
connectedChain.registryName === chain.registryName
? "cursor-not-allowed border-green-600 bg-green-300 text-green-900 aria-selected:bg-green-300"
: "transparent cursor-pointer border-white",
Expand Down Expand Up @@ -62,7 +62,7 @@ export default function ChainItem({ chain, hoverCardElementBoundary }: ChainItem
</CommandItem>
</HoverCardTrigger>
<HoverCardContent
className="w-auto bg-fuchsia-900"
className="w-auto bg-fuchsia-900"
collisionBoundary={hoverCardElementBoundary}
>
<ChainDigest chain={chain} />
Expand Down
4 changes: 3 additions & 1 deletion components/ChainConnect/CustomChainForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,9 @@ export default function CustomChainForm() {
<JsonEditor
content={{ text: field.value }}
onChange={(newMsgContent) => {
field.onChange("text" in newMsgContent ? newMsgContent.text ?? "{}" : "{}");
field.onChange(
"text" in newMsgContent ? (newMsgContent.text ?? "{}") : "{}",
);
}}
/>
</div>
Expand Down
4 changes: 2 additions & 2 deletions components/ChainConnect/DialogButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ export default function DialogButton() {

return showChainSelect ? (
<DialogTrigger>
<div className="group relative m-1 inline-flex cursor-pointer items-center justify-center gap-2 rounded-full border-2 border-white p-2.5 text-sm font-medium text-white hover:bg-white hover:text-gray-900 focus:outline-none focus:ring-4 focus:ring-red-100">
<div className="group relative m-1 inline-flex cursor-pointer items-center justify-center gap-2 rounded-full border-2 border-white p-2.5 text-sm font-medium text-white hover:bg-white hover:text-gray-900 focus:outline-none focus:ring-4 focus:ring-red-100">
<ChainHeader />
</div>
</DialogTrigger>
) : (
<div className="group relative m-1 inline-flex items-center justify-center gap-2 p-2.5 text-sm font-medium text-white">
<div className="group relative m-1 inline-flex items-center justify-center gap-2 p-2.5 text-sm font-medium text-white">
<ChainHeader />
</div>
);
Expand Down
4 changes: 2 additions & 2 deletions components/dataViews/AccountView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default function AccountView() {
copy(walletInfo.address);
toast(`Copied address to clipboard`, { description: walletInfo.address });
}}
className=" flex items-center space-x-4 rounded-md border p-4 transition-colors hover:cursor-pointer hover:bg-muted/50"
className="flex items-center space-x-4 rounded-md border p-4 transition-colors hover:cursor-pointer hover:bg-muted/50"
>
<Copy className="w-5" />
<div className="flex-1 space-y-1">
Expand All @@ -70,7 +70,7 @@ export default function AccountView() {
copy(walletInfo.pubKey);
toast(`Copied public key to clipboard`, { description: walletInfo.pubKey });
}}
className=" flex items-center space-x-4 rounded-md border p-4 transition-colors hover:cursor-pointer hover:bg-muted/50"
className="flex items-center space-x-4 rounded-md border p-4 transition-colors hover:cursor-pointer hover:bg-muted/50"
>
<Copy className="w-5" />
<div className="flex-1 space-y-1">
Expand Down
2 changes: 1 addition & 1 deletion components/dataViews/MultisigView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export default function MultisigView() {
copy(multisigAddress);
toast(`Copied address to clipboard`, { description: multisigAddress });
}}
className=" flex items-center space-x-4 rounded-md border p-4 transition-colors hover:cursor-pointer hover:bg-muted/50"
className="flex items-center space-x-4 rounded-md border p-4 transition-colors hover:cursor-pointer hover:bg-muted/50"
>
<Copy className="w-5" />
<div className="flex-1 space-y-1">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ const MsgExecuteContractForm = ({
label="Msg JSON"
content={{ text: msgContent }}
onChange={(newMsgContent, _, { contentErrors }) => {
setMsgContent("text" in newMsgContent ? newMsgContent.text ?? "{}" : "{}");
setMsgContent("text" in newMsgContent ? (newMsgContent.text ?? "{}") : "{}");
jsonError.current = !!contentErrors;
}}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ const MsgInstantiateContract2Form = ({
label="Msg JSON"
content={{ text: msgContent }}
onChange={(newMsgContent, _, { contentErrors }) => {
setMsgContent("text" in newMsgContent ? newMsgContent.text ?? "{}" : "{}");
setMsgContent("text" in newMsgContent ? (newMsgContent.text ?? "{}") : "{}");
jsonError.current = !!contentErrors;
}}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ const MsgInstantiateContractForm = ({
label="Msg JSON"
content={{ text: msgContent }}
onChange={(newMsgContent, _, { contentErrors }) => {
setMsgContent("text" in newMsgContent ? newMsgContent.text ?? "{}" : "{}");
setMsgContent("text" in newMsgContent ? (newMsgContent.text ?? "{}") : "{}");
jsonError.current = !!contentErrors;
}}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ const MsgMigrateContractForm = ({
label="Msg JSON"
content={{ text: msgContent }}
onChange={(newMsgContent, _, { contentErrors }) => {
setMsgContent("text" in newMsgContent ? newMsgContent.text ?? "{}" : "{}");
setMsgContent("text" in newMsgContent ? (newMsgContent.text ?? "{}") : "{}");
jsonError.current = !!contentErrors;
}}
/>
Expand Down
2 changes: 1 addition & 1 deletion lib/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const requestJson = async (
{ method, headers, body, ...restConfig }: RequestConfig = {},
) => {
const config: RequestInit = {
method: method ?? body ? "POST" : "GET",
method: (method ?? body) ? "POST" : "GET",
headers: body ? { "Content-Type": "application/json", ...headers } : headers,
body: body ? JSON.stringify(body) : null,
...restConfig,
Expand Down
9 changes: 5 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"test:ci": "jest",
"build": "next build",
"start": "next start",
"format": "prettier --write --log-level warn \"./**/*.{js,jsx,ts,tsx}\"",
"format": "prettier --write --log-level warn \"./**/*.{js,jsx,mjs,ts,tsx}\"",
"lint": "eslint --max-warnings 0 \"./**/*.{js,jsx,ts,tsx}\"",
"lint:fix": "eslint --max-warnings 0 \"./**/*.{js,jsx,ts,tsx}\" --fix"
},
Expand Down Expand Up @@ -77,7 +77,7 @@
"next": "14.2.4",
"next-themes": "^0.3.0",
"postcss": "8.4.38",
"prettier": "^3.3.2",
"prettier": "^3.4.2",
"prettier-plugin-tailwindcss": "^0.6.5",
"react": "18.3.1",
"react-day-picker": "^8.10.1",
Expand Down

0 comments on commit 8edea74

Please sign in to comment.