Skip to content

Commit 9795bf9

Browse files
committed
autoformat files
1 parent 3aa8849 commit 9795bf9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+333
-238
lines changed

Diff for: .eslintrc.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
{
2-
"extends": ["next/core-web-vitals", "prettier", "plugin:storybook/recommended"],
2+
"extends": [
3+
"next/core-web-vitals",
4+
"prettier",
5+
"plugin:storybook/recommended"
6+
],
37
"env": { "es6": true },
48
"plugins": ["simple-import-sort"],
59
"rules": {

Diff for: .storybook/preview.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const chakraBreakpointArray = Object.entries(extendedTheme.breakpoints)
1111

1212
const preview: Preview = {
1313
globals: {
14-
locale: 'en',
14+
locale: "en",
1515
locales: baseLocales,
1616
},
1717
parameters: {

Diff for: next.config.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ const LIMIT_CPUS = Number(process.env.LIMIT_CPUS || 2)
66

77
const experimental = LIMIT_CPUS
88
? {
9-
// This option could be enabled in the future when flagged as stable, to speed up builds
10-
// (see https://nextjs.org/docs/pages/building-your-application/configuring/mdx#using-the-rust-based-mdx-compiler-experimental)
11-
// mdxRs: true,
12-
13-
// Reduce the number of cpus and disable parallel threads in prod envs to consume less memory
14-
workerThreads: false,
15-
cpus: LIMIT_CPUS,
16-
}
9+
// This option could be enabled in the future when flagged as stable, to speed up builds
10+
// (see https://nextjs.org/docs/pages/building-your-application/configuring/mdx#using-the-rust-based-mdx-compiler-experimental)
11+
// mdxRs: true,
12+
13+
// Reduce the number of cpus and disable parallel threads in prod envs to consume less memory
14+
workerThreads: false,
15+
cpus: LIMIT_CPUS,
16+
}
1717
: {}
1818

1919
/** @type {import('next').NextConfig} */

Diff for: package.json

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"start": "next start",
1010
"lint": "next lint",
1111
"lint:fix": "next lint --fix",
12+
"format": "prettier --write .",
1213
"preversion": "bash ./src/scripts/updatePublishDate.sh",
1314
"crowdin-contributors": "ts-node -O '{ \"module\": \"commonjs\" }' src/scripts/crowdin/getCrowdinContributors.ts",
1415
"storybook": "storybook dev -p 6006",

Diff for: src/components/Avatar/Avatar.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as React from "react"
2-
import { AvatarGroup, HStack,VStack } from "@chakra-ui/react"
2+
import { AvatarGroup, HStack, VStack } from "@chakra-ui/react"
33
import { Meta, StoryObj } from "@storybook/react"
44

55
import Avatar from "."

Diff for: src/components/Banners/BugBountyBanner.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ const BugBountyBanner: React.FC = () => (
99
<BannerNotification shouldShow>
1010
<Center>
1111
<Text m={0} p={0}>
12-
All Dencun-related bounties currently receive a 2x bonus multiplier
13-
(up to 500,000 USD) up to two weeks before the scheduled mainnet hardfork.
12+
All Dencun-related bounties currently receive a 2x bonus multiplier (up
13+
to 500,000 USD) up to two weeks before the scheduled mainnet hardfork.
1414
</Text>
1515
</Center>
1616
</BannerNotification>

Diff for: src/components/BaseStories/Radio.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as React from "react"
2-
import { Flex,Radio as RadioComponent, RadioGroup } from "@chakra-ui/react"
2+
import { Flex, Radio as RadioComponent, RadioGroup } from "@chakra-ui/react"
33
import { Meta, StoryObj } from "@storybook/react"
44

55
type RadioType = typeof RadioComponent

Diff for: src/components/Codeblock.tsx

+4-9
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ import { Box, BoxProps, Flex, useColorModeValue } from "@chakra-ui/react"
1111
import CopyToClipboard from "@/components/CopyToClipboard"
1212
import Emoji from "@/components/Emoji"
1313
// https://github.com/FormidableLabs/prism-react-renderer/tree/master#custom-language-support
14-
;
15-
(typeof global !== "undefined" ? global : window).Prism = Prism
14+
;(typeof global !== "undefined" ? global : window).Prism = Prism
1615
require("prismjs/components/prism-solidity")
1716

1817
const LINES_BEFORE_COLLAPSABLE = 8
@@ -218,7 +217,7 @@ const Codeblock: React.FC<IProps> = ({
218217
codeLanguage,
219218
fromHomepage = false,
220219
}) => {
221-
const { t } = useTranslation('common')
220+
const { t } = useTranslation("common")
222221
const selectedTheme = useColorModeValue(codeTheme.light, codeTheme.dark)
223222

224223
const codeText = React.Children.toArray(children)
@@ -322,11 +321,7 @@ const Codeblock: React.FC<IProps> = ({
322321
{allowCollapse &&
323322
totalLines - 1 > LINES_BEFORE_COLLAPSABLE && (
324323
<TopBarItem onClick={() => setIsCollapsed(!isCollapsed)}>
325-
{isCollapsed ? (
326-
t("show-all")
327-
) : (
328-
t("show-less")
329-
)}
324+
{isCollapsed ? t("show-all") : t("show-less")}
330325
</TopBarItem>
331326
)}
332327
{shouldShowCopyWidget && (
@@ -336,7 +331,7 @@ const Codeblock: React.FC<IProps> = ({
336331
{!isCopied ? (
337332
<>
338333
<Emoji text=":clipboard:" fontSize="md" />{" "}
339-
{t("copy")}
334+
{t("copy")}
340335
</>
341336
) : (
342337
<>

Diff for: src/components/CopyToClipboard.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { useEffect, useRef,useState } from "react"
1+
import { useEffect, useRef, useState } from "react"
22
import ClipboardJS from "clipboard"
33
import { Box } from "@chakra-ui/react"
44

Diff for: src/components/EthVideo.tsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
import { Box, useColorModeValue } from "@chakra-ui/react"
22

33
const EthVideo = () => {
4-
const src = useColorModeValue("ethereum-hero-light.mp4", "ethereum-hero-dark.mp4")
4+
const src = useColorModeValue(
5+
"ethereum-hero-light.mp4",
6+
"ethereum-hero-dark.mp4"
7+
)
58

69
return (
710
<Box>

Diff for: src/components/FindWallet/WalletTable/useWalletTable.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ export const useWalletTable = ({
303303
) => {
304304
const domItems: HTMLCollectionOf<Element> =
305305
document.getElementsByClassName(className)
306-
306+
307307
Array.from(domItems).forEach((item) => {
308308
item.classList.add("fade")
309309
})

Diff for: src/components/Leaderboard.tsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@ const Leaderboard = ({ content, limit = 100 }: LeaderboardProps) => {
5959
.filter((_, idx) => idx < limit)
6060
.map(({ name, username, score }, idx) => {
6161
const hasGitHub = !!username
62-
const avatarImg =
63-
GITHUB_URL + (username || "random") + ".png?size=40"
62+
const avatarImg = GITHUB_URL + (username || "random") + ".png?size=40"
6463
const avatarAlt = hasGitHub ? `${username} GitHub avatar` : ""
6564

6665
let emoji: string | null = null

Diff for: src/components/MatomoOptOut.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { useEffect,useState } from "react"
2-
import { Checkbox,Flex } from "@chakra-ui/react"
1+
import { useEffect, useState } from "react"
2+
import { Checkbox, Flex } from "@chakra-ui/react"
33

44
import Text from "@/components/OldText"
55

Diff for: src/components/MergeArticleList.tsx

+42-14
Original file line numberDiff line numberDiff line change
@@ -11,42 +11,70 @@ const MergeArticleList: React.FC<IProps> = () => {
1111
const reads: CardListItem[] = [
1212
{
1313
title: t("page-upgrades-index:page-upgrade-article-title-ethmerge"),
14-
description: t("page-upgrades-index:page-upgrade-article-author-ethmerge"),
14+
description: t(
15+
"page-upgrades-index:page-upgrade-article-author-ethmerge"
16+
),
1517
link: "https://ethmerge.com/",
1618
},
1719
{
18-
title: t("page-upgrades-index:page-upgrade-article-title-merge-is-coming"),
20+
title: t(
21+
"page-upgrades-index:page-upgrade-article-title-merge-is-coming"
22+
),
1923
description: t("page-upgrades-index:page-upgrade-article-author-alchemy"),
2024
link: "https://www.alchemy.com/the-merge",
2125
},
2226
{
23-
title: t("page-upgrades-index:page-upgrade-article-title-state-of-the-merge"),
24-
description: t("page-upgrades-index:page-upgrade-article-author-consensys"),
27+
title: t(
28+
"page-upgrades-index:page-upgrade-article-title-state-of-the-merge"
29+
),
30+
description: t(
31+
"page-upgrades-index:page-upgrade-article-author-consensys"
32+
),
2533
link: "https://consensys.net/blog/news/the-state-of-the-merge-an-update-on-ethereums-merge-to-proof-of-stake-in-2022/",
2634
},
2735
{
28-
title: t("page-upgrades-index:page-upgrade-article-title-ropsten-merge-testnet"),
29-
description: t("page-upgrades-index:page-upgrade-article-author-ethereum-foundation"),
36+
title: t(
37+
"page-upgrades-index:page-upgrade-article-title-ropsten-merge-testnet"
38+
),
39+
description: t(
40+
"page-upgrades-index:page-upgrade-article-author-ethereum-foundation"
41+
),
3042
link: "https://blog.ethereum.org/2022/05/30/ropsten-merge-announcement/",
3143
},
3244
{
33-
title: t("page-upgrades-index:page-upgrade-article-title-execution-layer-specs"),
34-
description: t("page-upgrades-index:page-upgrade-article-author-ethereum-foundation"),
45+
title: t(
46+
"page-upgrades-index:page-upgrade-article-title-execution-layer-specs"
47+
),
48+
description: t(
49+
"page-upgrades-index:page-upgrade-article-author-ethereum-foundation"
50+
),
3551
link: "https://github.com/ethereum/execution-specs/",
3652
},
3753
{
38-
title: t("page-upgrades-index:page-upgrade-article-title-consensus-layer-specs"),
39-
description: t("page-upgrades-index:page-upgrade-article-author-ethereum-foundation"),
54+
title: t(
55+
"page-upgrades-index:page-upgrade-article-title-consensus-layer-specs"
56+
),
57+
description: t(
58+
"page-upgrades-index:page-upgrade-article-author-ethereum-foundation"
59+
),
4060
link: "https://github.com/ethereum/consensus-specs/tree/dev/specs/bellatrix",
4161
},
4262
{
43-
title: t("page-upgrades-index:page-upgrade-article-title-engine-api-specs"),
44-
description: t("page-upgrades-index:page-upgrade-article-author-ethereum-foundation"),
63+
title: t(
64+
"page-upgrades-index:page-upgrade-article-title-engine-api-specs"
65+
),
66+
description: t(
67+
"page-upgrades-index:page-upgrade-article-author-ethereum-foundation"
68+
),
4569
link: "https://github.com/ethereum/execution-apis/tree/main/src/engine",
4670
},
4771
{
48-
title: t("page-upgrades-index:page-upgrade-article-title-hitchhikers-guide-to-ethereum"),
49-
description: t("page-upgrades-index:page-upgrade-article-author-delphi-digital"),
72+
title: t(
73+
"page-upgrades-index:page-upgrade-article-title-hitchhikers-guide-to-ethereum"
74+
),
75+
description: t(
76+
"page-upgrades-index:page-upgrade-article-author-delphi-digital"
77+
),
5078
link: "https://members.delphidigital.io/reports/the-hitchhikers-guide-to-ethereum",
5179
},
5280
]

Diff for: src/components/MergeInfographic/index.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ const MergeInfographic: React.FC<IProps> = ({ className }) => {
6060
<AspectRatio
6161
className={className}
6262
role="img"
63-
aria-label={t("page-upgrades-index:page-upgrades-merge-infographic-alt-text")}
63+
aria-label={t(
64+
"page-upgrades-index:page-upgrades-merge-infographic-alt-text"
65+
)}
6466
position="relative"
6567
width="100%"
6668
ratio={25 / 11}

Diff for: src/components/Nav/Menu.tsx

+1-4
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,7 @@ const Menu: React.FC<IProps> = ({ path, sections, ...props }) => {
7979
const section = restSections[sectionKey]
8080

8181
return (
82-
<NavDropdown
83-
key={sectionKey}
84-
section={section}
85-
>
82+
<NavDropdown key={sectionKey} section={section}>
8683
{section.items.map((item, index) => (
8784
<NavDropdown.Item
8885
key={index}

Diff for: src/components/Quiz/QuizWidget/AnswerIcon.tsx

+1-3
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ interface AnswerIconProps {
1616
*
1717
* Defaults to the `TrophyIcon` prior to answering a question
1818
*/
19-
export const AnswerIcon = ({
20-
answerStatus
21-
}: AnswerIconProps) => {
19+
export const AnswerIcon = ({ answerStatus }: AnswerIconProps) => {
2220
const commonProps = {
2321
color: "neutral",
2422
}

Diff for: src/components/Quiz/QuizWidget/QuizConfetti.tsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@ export const QuizConfetti = () => {
1313
<>
1414
<StarConfettiIcon {...commonProps} insetInlineStart={0} />
1515

16-
<StarConfettiIcon {...commonProps} insetInlineEnd={0} transform="scaleX(-100%)" />
16+
<StarConfettiIcon
17+
{...commonProps}
18+
insetInlineEnd={0}
19+
transform="scaleX(-100%)"
20+
/>
1721
</>
1822
)
1923
}

Diff for: src/components/Quiz/QuizWidget/context.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ type QuizWidgetContextType = Quiz & {
1818
nextQuiz: string | undefined
1919
}
2020
| false
21-
numberOfCorrectAnswers: number
22-
quizScore: number
23-
ratioCorrect: number
24-
isPassingScore: boolean
21+
numberOfCorrectAnswers: number
22+
quizScore: number
23+
ratioCorrect: number
24+
isPassingScore: boolean
2525
initialize: () => void
2626
setUserQuizProgress: Dispatch<SetStateAction<AnswerChoice[]>>
2727
setShowAnswer: (prev: boolean) => void

Diff for: src/components/Quiz/useLocalQuizData.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,7 @@ export const INITIAL_USER_STATS: UserStats = {
2222
}
2323

2424
export const useLocalQuizData = () => {
25-
const data = useLocalStorage(
26-
USER_STATS_KEY,
27-
INITIAL_USER_STATS
28-
)
25+
const data = useLocalStorage(USER_STATS_KEY, INITIAL_USER_STATS)
2926

3027
return data
3128
}

Diff for: src/components/Roadmap/RoadmapActionCard.tsx

+1-5
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,7 @@ const RoadmapActionCard: React.FC<IProps> = ({
4848
borderColor="lightBorder"
4949
>
5050
<Center background="cardGradient" h="260px">
51-
<Image
52-
src={imgSrc}
53-
alt={alt}
54-
style={{ objectFit: "contain" }}
55-
/>
51+
<Image src={imgSrc} alt={alt} style={{ objectFit: "contain" }} />
5652
</Center>
5753
<Flex p={6} flex="1" flexDir="column" justify="space-between" gap={4}>
5854
<Heading as="h3" size="md">

Diff for: src/components/RollupProductDevDoc.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from "react"
22
import { Box, Flex, Heading, ListItem, UnorderedList } from "@chakra-ui/react"
33

4-
import { layer2Data, Rollups,RollupType } from "@/data/layer-2/layer-2"
4+
import { layer2Data, Rollups, RollupType } from "@/data/layer-2/layer-2"
55

66
import InlineLink from "./Link"
77
import Text from "./OldText"

Diff for: src/components/Search/utils.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@ export const getSearchModalStyles = (): SystemStyleObject => ({
102102
},
103103

104104
".DocSearch-Container--Stalled .DocSearch-MagnifierLabel, .DocSearch-Container--Stalled .DocSearch-LoadingIndicator":
105-
{
106-
color: "primary.highContrast",
107-
},
105+
{
106+
color: "primary.highContrast",
107+
},
108108

109109
".DocSearch-Dropdown": {
110110
ps: { base: 4, md: 8 },

Diff for: src/components/Simulator/Explanation.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from "react"
22
import { motion } from "framer-motion"
33
import { MdArrowBack } from "react-icons/md"
4-
import { Box, Flex, Grid, Heading,Text } from "@chakra-ui/react"
4+
import { Box, Flex, Grid, Heading, Text } from "@chakra-ui/react"
55

66
import { Button, ButtonLink } from "../Buttons"
77

0 commit comments

Comments
 (0)