Skip to content

Commit

Permalink
chore: lint --fix (#17555)
Browse files Browse the repository at this point in the history
* lint --fix

* chore: nx format:write update dirty files

* Revert to main

* Re-push

* chore: nx format:write update dirty files

---------

Co-authored-by: andes-it <builders@andes.is>
  • Loading branch information
AndesKrrrrrrrrrrr and andes-it authored Jan 22, 2025
1 parent 305b983 commit bb52c30
Show file tree
Hide file tree
Showing 251 changed files with 788 additions and 507 deletions.
9 changes: 5 additions & 4 deletions apps/web/components/AnchorNavigation/AnchorNavigation.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { useEffect, useMemo, useRef, useState } from 'react'
import useScrollSpy from '@island.is/web/hooks/useScrollSpy'
import { Bullet } from '@island.is/web/components'
import { Text, Box, FocusableBox, Stack } from '@island.is/island-ui/core'
import slugify from '@sindresorhus/slugify'
import { useRouter } from 'next/router'
import slugify from '@sindresorhus/slugify'

import { Box, FocusableBox, Stack, Text } from '@island.is/island-ui/core'
import { Bullet } from '@island.is/web/components'
import useScrollSpy from '@island.is/web/hooks/useScrollSpy'

export interface AnchorNavigationProps {
title?: string
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import React from 'react'

import {
Filter,
FilterInput,
FilterMultiChoice,
FilterMultiChoiceProps,
FilterProps,
} from '@island.is/island-ui/core'
import React from 'react'

type FilterCategory = {
/** Id for the category. */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import dynamic from 'next/dynamic'

import { GetSingleArticleQuery } from '@island.is/web/graphql/schema'

const IcelandicNamesSearcher = dynamic(
Expand Down
7 changes: 4 additions & 3 deletions apps/web/components/BackgroundImage/BackgroundImage.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import React, { useState, useRef, useEffect } from 'react'
import React, { useEffect, useRef, useState } from 'react'
import { useIntersection } from 'react-use'
import cn from 'classnames'
import { BoxProps, Box } from '@island.is/island-ui/core'
import { theme, Colors } from '@island.is/island-ui/theme'

import { Box, BoxProps } from '@island.is/island-ui/core'
import { Colors, theme } from '@island.is/island-ui/theme'

import * as styles from './BackgroundImage.css'

Expand Down
1 change: 1 addition & 0 deletions apps/web/components/Bullet/Bullet.css.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { style, styleVariants } from '@vanilla-extract/css'

import { theme } from '@island.is/island-ui/theme'

export const bulletWrapper = style({
Expand Down
1 change: 1 addition & 0 deletions apps/web/components/Bullet/Bullet.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import cn from 'classnames'

import * as styles from './Bullet.css'

interface BulletProps {
Expand Down
1 change: 1 addition & 0 deletions apps/web/components/BulletList/BulletList.css.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { style } from '@vanilla-extract/css'

import { theme } from '@island.is/island-ui/theme'

export const leftCol = style({
Expand Down
7 changes: 4 additions & 3 deletions apps/web/components/BulletList/BulletList.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import React, { FC, useState, ReactNode } from 'react'
import cn from 'classnames'
import React, { FC, ReactNode, useState } from 'react'
import AnimateHeight from 'react-animate-height'
import cn from 'classnames'

import { Box, Button, Icon, Link, Stack, Text } from '@island.is/island-ui/core'
import { IconBullet } from '@island.is/web/components'
import { Stack, Box, Text, Icon, Button, Link } from '@island.is/island-ui/core'

import * as styles from './BulletList.css'

Expand Down
1 change: 1 addition & 0 deletions apps/web/components/Card/Card.css.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { style } from '@vanilla-extract/css'

import { theme } from '@island.is/island-ui/theme'

export const card = style({
Expand Down
15 changes: 8 additions & 7 deletions apps/web/components/Card/Card.tsx
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
import { Colors } from '@island.is/island-ui/theme'
import React, { ReactNode, useContext } from 'react'
import { useMeasure } from 'react-use'
import cn from 'classnames'
import { LinkProps } from 'next/link'

import {
Box,
FocusableBox,
Hyphen,
Inline,
Stack,
Text,
Tag,
Inline,
TagProps,
FocusableBox,
TagVariant,
Hyphen,
Text,
} from '@island.is/island-ui/core'
import { ColorSchemeContext } from '@island.is/web/context'
import { Colors } from '@island.is/island-ui/theme'
import { TestSupport } from '@island.is/island-ui/utils'
import { BackgroundImage } from '@island.is/web/components'
import { ColorSchemeContext } from '@island.is/web/context'
import { LinkResolverResponse } from '@island.is/web/hooks/useLinkResolver'

import * as styles from './Card.css'
import { TestSupport } from '@island.is/island-ui/utils'

export type CardTagsProps = {
tagProps?: Omit<TagProps, 'children'>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { style } from '@vanilla-extract/css'

import { themeUtils } from '@island.is/island-ui/theme'

export const container = style({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import React from 'react'

import { Box, Button, Hidden, Link, Tag, Text } from '@island.is/island-ui/core'
import * as styles from './CardWithFeaturedItems.css'
import { LinkType, useLinkResolver } from '@island.is/web/hooks'
import { Featured } from '@island.is/web/graphql/schema'
import { LinkType, useLinkResolver } from '@island.is/web/hooks'

import * as styles from './CardWithFeaturedItems.css'

type CardWithFeaturedItemsProps = {
heading: string
Expand Down
5 changes: 3 additions & 2 deletions apps/web/components/CategoryItems/CategoryItems.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import React from 'react'
import { Text, GridContainer, CategoryCard } from '@island.is/island-ui/core'

import { CategoryCard, GridContainer, Text } from '@island.is/island-ui/core'
import { GridItems } from '@island.is/web/components'
import { LinkType, useLinkResolver } from '@island.is/web/hooks/useLinkResolver'
import { GetArticleCategoriesQuery } from '@island.is/web/graphql/schema'
import { LinkType, useLinkResolver } from '@island.is/web/hooks/useLinkResolver'

interface CategoryItemsProps {
heading: string
Expand Down
7 changes: 4 additions & 3 deletions apps/web/components/Charts/ChartsCard/ChartsCard.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import React, { ReactNode } from 'react'
import { useMeasure } from 'react-use'
import cn from 'classnames'
import { Box, Text, Hyphen } from '@island.is/island-ui/core'

import { Box, Hyphen, Text } from '@island.is/island-ui/core'
import { ExportCSVButton } from '@island.is/web/components'

import {
MixedChart,
SimpleBarChart,
SimpleLineChart,
SimplePieChart,
} from '../'
import { ExportCSVButton } from '@island.is/web/components'

import * as styles from './ChartsCard.css'

interface ChartCardDataProps {
Expand Down
20 changes: 11 additions & 9 deletions apps/web/components/Charts/MixedChart/MixedChart.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
import React from 'react'
import {
ComposedChart,
Bar,
XAxis,
YAxis,
CartesianGrid,
Tooltip,
ComposedChart,
Legend,
ResponsiveContainer,
Line,
ResponsiveContainer,
Tooltip,
XAxis,
YAxis,
} from 'recharts'

import { Box } from '@island.is/island-ui/core'

import {
CustomizedAxisTick,
RenderLegend,
COLORS,
CustomTooltip,
CustomizedAxisTick,
CustomizedRightAxisTick,
CustomTooltip,
RenderLegend,
YAxisLabel,
} from '../sharedChartComponents'
import { Box } from '@island.is/island-ui/core'

interface GraphDataProps {
title?: string
Expand Down
16 changes: 9 additions & 7 deletions apps/web/components/Charts/SimpleBarChart/SimpleBarChart.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
import React from 'react'
import {
BarChart,
Bar,
XAxis,
YAxis,
BarChart,
CartesianGrid,
Tooltip,
Legend,
ResponsiveContainer,
Tooltip,
XAxis,
YAxis,
} from 'recharts'

import { Box } from '@island.is/island-ui/core'

import {
CustomizedAxisTick,
RenderLegend,
COLORS,
CustomizedAxisTick,
CustomTooltip,
RenderLegend,
YAxisLabel,
} from '../sharedChartComponents'
import { Box } from '@island.is/island-ui/core'

interface GraphDataProps {
title?: string
Expand Down
14 changes: 8 additions & 6 deletions apps/web/components/Charts/SimpleLineChart/SimpleLineChart.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
import React from 'react'
import {
LineChart,
XAxis,
YAxis,
CartesianGrid,
Tooltip,
Legend,
ResponsiveContainer,
Line,
LineChart,
ResponsiveContainer,
Tooltip,
XAxis,
YAxis,
} from 'recharts'

import { Box } from '@island.is/island-ui/core'

import {
COLORS,
CustomizedAxisTick,
RenderLegend,
COLORS,
YAxisLabel,
} from '../sharedChartComponents'

Expand Down
19 changes: 10 additions & 9 deletions apps/web/components/Charts/SimplePieChart/SimplePieChart.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
import cn from 'classnames'
import {
PieChart,
Pie,
Cell,
Tooltip,
Legend,
Pie,
PieChart,
ResponsiveContainer,
Tooltip,
TooltipProps,
Legend,
} from 'recharts'
import cn from 'classnames'

import { theme } from '@island.is/island-ui/theme'
import { useWindowSize } from '@island.is/web/hooks/useViewport'

import {
COLORS,
RenderLegend,
renderCustomizedLabel,
RenderLegend,
} from '../sharedChartComponents'
import { useWindowSize } from '@island.is/web/hooks/useViewport'
import { theme } from '@island.is/island-ui/theme'

import * as styles from './SimplePieChart.css'

interface CustomTooltipProps extends TooltipProps<string, number> {
Expand Down
4 changes: 3 additions & 1 deletion apps/web/components/Charts/sharedChartComponents.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import React from 'react'
import * as styles from './charts.css'
import cn from 'classnames'
import { LegendProps, TooltipProps } from 'recharts'

import { Box, Text } from '@island.is/island-ui/core'

import * as styles from './charts.css'

interface AxisTickProps {
x?: number
y?: number
Expand Down
1 change: 1 addition & 0 deletions apps/web/components/ChatPanel/ChatBubble/ChatBubble.css.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { style } from '@vanilla-extract/css'

import {
blue200,
blue400,
Expand Down
5 changes: 3 additions & 2 deletions apps/web/components/ContactUs/ContactUs.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import React from 'react'
import { MutationResult, useMutation } from '@apollo/client/react'

import {
ContactUs as ContactUsForm,
ContactUsProps as ContactUsFormProps,
} from '@island.is/island-ui/contentful'
import { CONTACT_US_ZENDESK_TICKET_MUTATION } from '@island.is/web/screens/queries'
import { MutationResult, useMutation } from '@apollo/client/react'
import {
ContactUsZendeskTicketMutation,
ContactUsZendeskTicketMutationVariables,
} from '@island.is/web/graphql/schema'
import { CONTACT_US_ZENDESK_TICKET_MUTATION } from '@island.is/web/screens/queries'

const getState = (
data: MutationResult<ContactUsZendeskTicketMutation>['data'],
Expand Down
1 change: 1 addition & 0 deletions apps/web/components/ContentLink/ContentLink.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { FC, ReactNode } from 'react'

import { Link } from '@island.is/island-ui/core'
import { useLinkResolver } from '@island.is/web/hooks/useLinkResolver'

Expand Down
1 change: 1 addition & 0 deletions apps/web/components/DataLinkCard/DataLinkCard.css.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { style } from '@vanilla-extract/css'

import { theme } from '@island.is/island-ui/theme'

export const card = style({
Expand Down
5 changes: 3 additions & 2 deletions apps/web/components/DataLinkCard/DataLinkCard.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import React, { ReactNode } from 'react'
import { useMeasure } from 'react-use'

import {
Box,
Stack,
Text,
FocusableBox,
Hyphen,
Stack,
Text,
} from '@island.is/island-ui/core'
import type { LinkCard } from '@island.is/web/graphql/schema'

Expand Down
7 changes: 4 additions & 3 deletions apps/web/components/DataLinkSection/DataLinkSection.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import React from 'react'

import {
Text,
GridRow,
Box,
GridColumn,
GridContainer,
Box,
GridRow,
Text,
} from '@island.is/island-ui/core'
import { BackgroundImage, DataLinkCard } from '@island.is/web/components'
import type { LinkCard } from '@island.is/web/graphql/schema'
Expand Down
3 changes: 2 additions & 1 deletion apps/web/components/ExportCSVButton/ExportCSVButton.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { FC } from 'react'
import { Button, Box } from '@island.is/island-ui/core'

import { Box, Button } from '@island.is/island-ui/core'

const isIterableObject = (val: object[]) => {
return typeof val === 'object' && val !== null && !Array.isArray(val)
Expand Down
1 change: 1 addition & 0 deletions apps/web/components/FixedNav/FixedNav.css.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { style } from '@vanilla-extract/css'

import { theme, themeUtils } from '@island.is/island-ui/theme'
import { STICKY_NAV_HEIGHT } from '@island.is/web/constants'

Expand Down
Loading

0 comments on commit bb52c30

Please sign in to comment.