Skip to content

Commit

Permalink
Linting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
majakomel committed Apr 15, 2024
1 parent 1fa3724 commit 1cf537c
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions components/ThirdPartyDataChart.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ const ThirdPartyDataChart = ({ since, until, country, asn, ...props }) => {
return [from, to]
}, [since, until])

// biome-ignore lint/correctness/useExhaustiveDependencies: <explanation>
const cloudflareData = useEffect(() => {
if (!since && !until) return

Expand Down
7 changes: 4 additions & 3 deletions components/country/Overview.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ const messages = defineMessages({
const getStatus = (count, formattedMessageId) => {
if (count === null) {
return messages[`${formattedMessageId}NoData`]
} else if (count > 0) {
}
if (count > 0) {
return messages[`${formattedMessageId}Blocked`]
} else {
return messages[`${formattedMessageId}Normal`]
}
return messages[`${formattedMessageId}Normal`]
}

const ooniBlogBaseURL = 'https://ooni.org'
Expand Down Expand Up @@ -172,6 +172,7 @@ const Overview = ({
) : (
<ul>
{featuredArticles.map((article, index) => (
// biome-ignore lint/suspicious/noArrayIndexKey: <explanation>
<li key={index}>
<FeaturedArticle link={article.href} title={article.title} />
</li>
Expand Down
3 changes: 2 additions & 1 deletion components/measurement/nettests/WebConnectivity.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import bufferFrom from 'buffer-from'
import NLink from 'next/link'
import url from 'node:url'
import { Box, Flex, Heading, Text } from 'ooni-components'
import PropTypes from 'prop-types'
import React from 'react'
// biome-ignore lint/style/useNodejsImportProtocol: <explanation>
import url from 'url'

import deepmerge from 'deepmerge'
import { Cross, Tick } from 'ooni-components/icons'
Expand Down
2 changes: 1 addition & 1 deletion pages/domain/[domain].js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ const BlockingCountries = ({ blockedCountries }) => {
{ since, until },
)}
</Heading>
{!!blockedCountries?.length ? (
{blockedCountries?.length ? (
<>
<BlockText mb={3}>
{intl.formatMessage({ id: 'Domain.CountriesBlocking.Subtitle' })}
Expand Down
2 changes: 1 addition & 1 deletion pages/measurement/[[...report_id]].js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export async function getServerSideProps({ query }) {
full: true,
}
if (query.input) {
params['input'] = query.input
params.input = query.input
}

let response
Expand Down

0 comments on commit 1cf537c

Please sign in to comment.