Skip to content

Commit deb3139

Browse files
committed
Linting fixes
1 parent 8f0782d commit deb3139

11 files changed

Lines changed: 32 additions & 36 deletions

File tree

src/app/components/HighlightedText/text-trimming.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { MatchInfo, findTextMatch, NO_MATCH, NormalizerOptions, findTextMatches } from './text-matching'
2-
import { HighlightPattern } from "./index";
1+
import { MatchInfo, NO_MATCH, NormalizerOptions, findTextMatches } from './text-matching'
2+
import { HighlightPattern } from './index'
33

44
export interface TrimAroundOptions extends NormalizerOptions {
55
/**

src/app/components/Search/search-utils.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ export type ParsedSimpleSearchQuery = {
111111
export const textSearchMinimumLength = 3
112112

113113
// A basic search strategy that searches for the whole text as a single token
114+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
114115
const simpleTextSearch = (input: string = '', t?: TFunction): ParsedSimpleSearchQuery => {
115116
const term = input.length >= textSearchMinimumLength ? input.toLowerCase() : undefined
116117
const warning =

src/app/components/Tokens/TokenDetails.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ import { COLORS } from '../../../styles/theme/colors'
1414
import { TokenTypeTag } from './TokenList'
1515
import { RoundedBalance } from '../RoundedBalance'
1616
import { HighlightedText } from '../HighlightedText'
17-
import { HighlightPattern } from "../HighlightedText";
17+
import { HighlightPattern } from '../HighlightedText'
1818

1919
export const TokenDetails: FC<{
2020
isLoading?: boolean
2121
token: EvmToken | undefined
2222
showLayer?: boolean
2323
standalone?: boolean
2424
highlightPattern?: HighlightPattern
25-
}> = ({ isLoading, token, showLayer, standalone = false, highlightPattern}) => {
25+
}> = ({ isLoading, token, showLayer, standalone = false, highlightPattern }) => {
2626
const { t } = useTranslation()
2727
const { isMobile } = useScreenSize()
2828

src/app/data/oasis-account-names.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@ export const useSearchForOasisAccountsByName = (
123123

124124
const textMatcher =
125125
nameFragments.length && queryOptions.enabled
126-
? (account: AccountMetadata) => nameFragments.every(nameFragment => hasTextMatch(account.name, [nameFragment]))
126+
? (account: AccountMetadata) =>
127+
nameFragments.every(nameFragment => hasTextMatch(account.name, [nameFragment]))
127128
: () => false
128129

129130
const matches =

src/app/data/pontusx-account-names.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ export const useSearchForPontusXAccountsByName = (
8585

8686
const textMatcher =
8787
nameFragments.length && queryOptions.enabled
88-
? (account: AccountMetadata) => nameFragments.every(nameFragment => hasTextMatch(account.name, [nameFragment]))
88+
? (account: AccountMetadata) =>
89+
nameFragments.every(nameFragment => hasTextMatch(account.name, [nameFragment]))
8990
: () => false
9091

9192
const matches =

src/app/pages/ConsensusAccountDetailsPage/ConsensusAccountDetailsCard.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ import { useTranslation } from 'react-i18next'
33
import { Account } from '../../../oasis-nexus/api'
44
import { SubPageCard } from '../../components/SubPageCard'
55
import { ConsensusAccountDetailsView } from '../../components/Account/ConsensusAccountDetailsView'
6-
import { HighlightPattern } from "../.../../../components/HighlightedText"
6+
import { HighlightPattern } from '../.../../../components/HighlightedText'
77

88
type ConsensusAccountDetailsCardProps = {
99
account: Account | undefined
1010
isError: boolean
1111
isLoading: boolean
12-
highlightPattern: HighlightPattern,
12+
highlightPattern: HighlightPattern
1313
}
1414

1515
export const ConsensusAccountDetailsCard: FC<ConsensusAccountDetailsCardProps> = ({

src/app/pages/ConsensusAccountDetailsPage/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { Staking } from './Staking'
1414
import { ConsensusAccountDetailsContext } from './hooks'
1515
import { useConsensusTxMethodParam } from '../../hooks/useCommonParams'
1616
import { eventsContainerId } from '../../utils/tabAnchors'
17-
import { getHighlightPattern, textSearch } from "../../components/Search/search-utils";
17+
import { getHighlightPattern, textSearch } from '../../components/Search/search-utils'
1818

1919
export const ConsensusAccountDetailsPage: FC = () => {
2020
const { t } = useTranslation()

src/app/pages/TokenDashboardPage/TokenDetailsCard.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ import { holdersContainerId, tokenTransfersContainerId } from '../../utils/tabAn
2525
import { TokenLinkWithIcon } from '../../components/Tokens/TokenLinkWithIcon'
2626
import { HighlightPattern } from '../../components/HighlightedText'
2727

28-
export const TokenDetailsCard: FC<{ scope: RuntimeScope; address: string; highlighPattern?: HighlightPattern }> = ({
29-
scope,
30-
address,
31-
highlighPattern,
32-
}) => {
28+
export const TokenDetailsCard: FC<{
29+
scope: RuntimeScope
30+
address: string
31+
highlightPattern?: HighlightPattern
32+
}> = ({ scope, address, highlightPattern }) => {
3333
const { t } = useTranslation()
3434
const { isMobile } = useScreenSize()
3535

@@ -49,7 +49,7 @@ export const TokenDetailsCard: FC<{ scope: RuntimeScope; address: string; highli
4949
scope={account}
5050
address={token.eth_contract_addr || token.contract_addr}
5151
name={token.name}
52-
highlightPattern={highlighPattern}
52+
highlightPattern={highlightPattern}
5353
/>
5454
</dd>
5555

src/app/pages/TokenDashboardPage/TokenTitleCard.tsx

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ import { useTranslation } from 'react-i18next'
99
import { RuntimeScope } from '../../../types/searchScope'
1010
import { HighlightedText } from '../../components/HighlightedText'
1111
import { TitleCard } from '../../components/PageLayout/TitleCard'
12-
import { HighlightPattern } from "../../components/HighlightedText";
12+
import { HighlightPattern } from '../../components/HighlightedText'
1313

14-
export const TokenTitleCard: FC<{ scope: RuntimeScope; address: string; highlightPattern?: HighlightPattern }> = ({
15-
scope,
16-
address,
17-
highlightPattern,
18-
}) => {
14+
export const TokenTitleCard: FC<{
15+
scope: RuntimeScope
16+
address: string
17+
highlightPattern?: HighlightPattern
18+
}> = ({ scope, address, highlightPattern }) => {
1919
const { t } = useTranslation()
2020
const { isLoading, token } = useTokenInfo(scope, address)
2121

@@ -45,7 +45,11 @@ export const TokenTitleCard: FC<{ scope: RuntimeScope; address: string; highligh
4545
isLoading={isLoading}
4646
title={
4747
<>
48-
{token?.name ? <HighlightedText text={token.name} pattern={highlightPattern} /> : t('common.missing')}
48+
{token?.name ? (
49+
<HighlightedText text={token.name} pattern={highlightPattern} />
50+
) : (
51+
t('common.missing')
52+
)}
4953
&nbsp;
5054
<Typography
5155
component="span"

src/app/pages/TokenDashboardPage/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export const TokenDashboardPage: FC = () => {
5252
<DappBanner scope={scope} ethOrOasisAddress={address} />
5353
<TokenSnapshot scope={scope} address={address} />
5454
<Divider variant="layout" sx={{ mt: isMobile ? 4 : 0 }} />
55-
<TokenDetailsCard scope={scope} address={address} highlighPattern={highlightPattern} />
55+
<TokenDetailsCard scope={scope} address={address} highlightPattern={highlightPattern} />
5656
<RouterTabs
5757
tabs={[
5858
{ label: t('common.transfers'), to: tokenTransfersLink },

0 commit comments

Comments
 (0)