Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
14 changes: 7 additions & 7 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ else
echo "🦖 Automated CI run detected - skipping test prompt"
fi

if pnpm run format:check; then
echo "✅ Code format checked!"
else
echo "⚠️ WARNING: Incorrect code format, fix it before committing, please!"
echo "💡 Use the command pnpm format"
exit 1
fi
# if pnpm run format:check; then
# echo "✅ Code format checked!"
# else
# echo "⚠️ WARNING: Incorrect code format, fix it before committing, please!"
# echo "💡 Use the command pnpm format"
# exit 1
# fi

# TODO: There are several linter warnings
# Can't auto-fix, have to be revised manually
Expand Down
5 changes: 4 additions & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
"linter": {
"enabled": true,
"rules": {
"recommended": true
"recommended": true,
"a11y": {
"useSemanticElements": "off"
}
}
},
"javascript": {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"format:e2e": "pnpm exec biome format --write ./tests/e2e",
"format:unsafe": "pnpm exec biome check --write --unsafe ./src",
"generate:sitemap": "pnpm exec bun run .scripts/generate_sitemap.ts",
"lint": "pnpm exec biome lint --write --changed --no-errors-on-unmatched ./src",
"lint": "pnpm exec biome lint --write --no-errors-on-unmatched ./src",
"lint:check": "pnpm exec biome lint ./src",
"lint:unsafe": "pnpm exec biome lint --write --unsafe --changed --no-errors-on-unmatched ./src",
"start": "next start",
Expand Down
4 changes: 2 additions & 2 deletions src/components/ActionBox/ActionBox.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { forwardStyledRef } from '@/theme';
import { DisabledProps } from '@/types/Props';
import { Box, IconName, Text } from '@/ui';
import type { DisabledProps } from '@/types/Props';
import { Box, type IconName, Text } from '@/ui';

import { ActionBoxStyles as S } from './ActionBox.styles';

Expand Down
4 changes: 2 additions & 2 deletions src/components/AlertBox/AlertBox.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Meta, StoryObj } from '@storybook/react';
import type { Meta, StoryObj } from '@storybook/react';

import { AlertBox, AlertBoxProps } from './AlertBox';
import { AlertBox, type AlertBoxProps } from './AlertBox';

const meta: Meta = {
title: 'Library/Components/Alert Box',
Expand Down
4 changes: 2 additions & 2 deletions src/components/AlertBox/AlertBox.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { MouseEventHandler } from 'react';
import type { MouseEventHandler } from 'react';

import { forwardStyledRef } from '@/theme';
import { Icon, IconName } from '@/ui';
import { Icon, type IconName } from '@/ui';

import { AlertBoxStyles as S } from './AlertBox.styles';

Expand Down
4 changes: 2 additions & 2 deletions src/components/BadgeText/BadgeText.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Meta, StoryObj } from '@storybook/react';
import type { Meta, StoryObj } from '@storybook/react';

import { Icon } from '@/ui';

import { BadgeText } from './BadgeText';
import { BadgeTextStyles } from './BadgeText.styles';
import type { BadgeTextStyles } from './BadgeText.styles';

const meta: Meta = {
title: 'Library/Components/Badge Text',
Expand Down
34 changes: 17 additions & 17 deletions src/components/BadgeText/BadgeText.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const colorSchemes = {
red: {},
};

const buildColorScheme = (color: ColorScheme, hoverable: boolean): any => {
const buildColorScheme = (color: ColorScheme, hoverable: boolean) => {
if (color === 'slate') {
return {
backgroundColor: '$surface-tertiary',
Expand All @@ -20,29 +20,29 @@ const buildColorScheme = (color: ColorScheme, hoverable: boolean): any => {
? {
cursor: 'pointer',
'&:hover': {
backgroundColor: `$surface-actionable`,
},
}
: {
cursor: 'default',
}),
};
} else {
return {
backgroundColor: `$surface-${color}-light`,
color: `$text-${color}`,
...(hoverable
? {
cursor: 'pointer',
'&:hover': {
backgroundColor: `$surface-${color}-actionable`,
backgroundColor: '$surface-actionable',
},
}
: {
cursor: 'default',
}),
};
}

return {
backgroundColor: `$surface-${color}-light`,
color: `$text-${color}`,
...(hoverable
? {
cursor: 'pointer',
'&:hover': {
backgroundColor: `$surface-${color}-actionable`,
},
}
: {
cursor: 'default',
}),
};
};

const compoundVariants = (() => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/BannerField/BannerField.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { HandleLogoUploadProps } from '@/types/Logo';
import type { HandleLogoUploadProps } from '@/types/Logo';
import { FormField } from '@/ui';

import { Form } from '../Form/Form';
Expand Down
16 changes: 8 additions & 8 deletions src/components/BaseDirectoryField/BaseDirectoryField.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { MouseEventHandler, useMemo, useRef, useState } from 'react';
import { type MouseEventHandler, useMemo, useRef, useState } from 'react';

import { BadgeText, Form, SettingsModal } from '@/components';
import { useGitRepositoryTree } from '@/hooks/useGitRepositoryTree';
import { GitProvider } from '@/integrations/git';
import { LoadingProps } from '@/types/Props';
import type { GitProvider } from '@/integrations/git';
import type { LoadingProps } from '@/types/Props';
import {
Box,
Button,
Expand All @@ -18,7 +18,7 @@ import {
import { BaseDirectoryFieldStyles as S } from './BaseDirectoryField.styles';
import {
BaseDirectoryRadioGroup as RadioGroupV2,
BaseDirectoryRadioGroupProps as RadioGroupV2Props,
type BaseDirectoryRadioGroupProps as RadioGroupV2Props,
} from './BaseDirectoryRadioGroup';

const PATH = Symbol('path');
Expand Down Expand Up @@ -96,10 +96,10 @@ export const BaseDirectoryField: React.FC<BaseDirectoryFieldProps> = (
const RadioGroup = props.deprecated ? (
<BaseDirectoryRadioGroup
fieldName={props.fieldName}
sourceProvider={props.sourceProvider!}
slug={props.slug!}
repository={props.repository!}
branch={props.branch!}
sourceProvider={props.sourceProvider}
slug={props.slug}
repository={props.repository}
branch={props.branch}
accessToken={props.accessToken as string}
/>
) : (
Expand Down
14 changes: 7 additions & 7 deletions src/components/BaseDirectoryField/BaseDirectoryRadioGroup.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { MouseEventHandler, useMemo, useState } from 'react';
import { type MouseEventHandler, useMemo, useState } from 'react';

import { BadgeText, Form } from '@/components';
import { useGitTreeQuery } from '@/generated/graphqlClient';
import { LoadingProps } from '@/types/Props';
import type { LoadingProps } from '@/types/Props';
import { Box, Icon, RadioGroup, Scrollable, Text } from '@/ui';

import { BaseDirectoryFieldStyles as S } from './BaseDirectoryField.styles';
Expand All @@ -28,10 +28,10 @@ export const BaseDirectoryRadioGroup: React.FC<
const [gitTreeQuery] = useGitTreeQuery({
variables: {
where: {
gitProviderId: gitProviderId!,
sourceRepositoryOwner: sourceRepositoryOwner!,
sourceRepositoryName: sourceRepositoryName!,
sourceBranch: sourceBranch!,
gitProviderId: gitProviderId,
sourceRepositoryOwner: sourceRepositoryOwner,
sourceRepositoryName: sourceRepositoryName,
sourceBranch: sourceBranch,
},
},
pause:
Expand All @@ -57,7 +57,7 @@ export const BaseDirectoryRadioGroup: React.FC<
}

if (i === segments.length - 1) {
inner[segments[i]] = { [PATH]: cur.path! };
inner[segments[i]] = { [PATH]: cur.path };
}

inner = inner[segments[i]];
Expand Down
4 changes: 2 additions & 2 deletions src/components/Billing/BenefitsList.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Meta, StoryObj } from '@storybook/react';
import type { Meta, StoryObj } from '@storybook/react';

import { BenefitsList, BenefitsListProps } from './BenefitsList';
import { BenefitsList, type BenefitsListProps } from './BenefitsList';

const meta: Meta = {
title: 'Library/Components/Billing/Benefits List',
Expand Down
4 changes: 2 additions & 2 deletions src/components/Billing/HorizontalPlanCard.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Meta, StoryObj } from '@storybook/react';
import type { Meta, StoryObj } from '@storybook/react';

import {
HorizontalPlanCard,
HorizontalPlanCardProps,
type HorizontalPlanCardProps,
} from './HorizontalPlanCard';

const meta: Meta = {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Billing/HorizontalPlanCard.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { BadgeText } from '@/components';
import { ChildrenProps, LoadingProps } from '@/types/Props';
import type { ChildrenProps, LoadingProps } from '@/types/Props';
import { Box, Text } from '@/ui';

import { BillingStyles as S } from './Billing.styles';
Expand Down
4 changes: 2 additions & 2 deletions src/components/Billing/PriceTag.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Meta, StoryObj } from '@storybook/react';
import type { Meta, StoryObj } from '@storybook/react';

import { PriceTag, PriceTagProps } from './PriceTag';
import { PriceTag, type PriceTagProps } from './PriceTag';

const meta: Meta = {
title: 'Library/Components/Billing/Price Tag',
Expand Down
2 changes: 1 addition & 1 deletion src/components/Billing/PriceTag.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ChildrenProps } from '@/types/Props';
import type { ChildrenProps } from '@/types/Props';

import { BillingStyles as S } from './Billing.styles';

Expand Down
4 changes: 2 additions & 2 deletions src/components/Billing/VerticalPlanCard.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Meta, StoryObj } from '@storybook/react';
import type { Meta, StoryObj } from '@storybook/react';

import { Box } from '@/ui';

import { VerticalPlanCard, VerticalPlanCardProps } from './VerticalPlanCard';
import { VerticalPlanCard, type VerticalPlanCardProps } from './VerticalPlanCard';

const meta: Meta = {
title: 'Library/Components/Billing/Vertical Plan Card',
Expand Down
4 changes: 2 additions & 2 deletions src/components/Billing/VerticalPlanCard.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { BadgeText } from '@/components';
import { Button, ButtonProps, Icon } from '@/ui';
import { Button, type ButtonProps, Icon } from '@/ui';

import { BenefitsList, BenefitsListProps } from './BenefitsList';
import { BenefitsList, type BenefitsListProps } from './BenefitsList';
import { BillingStyles as S } from './Billing.styles';
import { PriceTag } from './PriceTag';

Expand Down
4 changes: 2 additions & 2 deletions src/components/BoxWithFooter/BoxWithFooter.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Meta, StoryObj } from '@storybook/react';
import type { Meta, StoryObj } from '@storybook/react';

import { BoxWithFooter, BoxWithFooterProps } from './BoxWithFooter';
import { BoxWithFooter, type BoxWithFooterProps } from './BoxWithFooter';

const meta: Meta = {
title: 'Library/Components/Box with Footer',
Expand Down
4 changes: 2 additions & 2 deletions src/components/BoxWithFooter/BoxWithFooter.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ChildrenProps, LoadingProps } from '@/types/Props';
import { Box, Icon, IconName, Skeleton, Text } from '@/ui';
import type { ChildrenProps, LoadingProps } from '@/types/Props';
import { Box, Icon, type IconName, Skeleton, Text } from '@/ui';

import { BoxWithFooterStyles as S } from './BoxWithFooter.styles';

Expand Down
4 changes: 2 additions & 2 deletions src/components/CodeSnippet/CodeSnippet.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Meta, StoryObj } from '@storybook/react';
import type { Meta, StoryObj } from '@storybook/react';

import { CodeSnippet, CodeSnippetProps } from './CodeSnippet';
import { CodeSnippet, type CodeSnippetProps } from './CodeSnippet';

const meta: Meta = {
title: 'Library/Components/Code Snippet',
Expand Down
2 changes: 1 addition & 1 deletion src/components/CodeSnippet/CodeSnippet.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useToast } from '@/hooks/useToast';
import { forwardStyledRef } from '@/theme';
import { LoadingProps } from '@/types/Props';
import type { LoadingProps } from '@/types/Props';
import { Box, Button, Skeleton, Text } from '@/ui';
import { copyToClipboard } from '@/utils/copyClipboard';

Expand Down
4 changes: 2 additions & 2 deletions src/components/ComingSoon/ComingSoon.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ComingSoonStyles as S } from './ComingSoon.styles';
import { ComingSoonModal, ComingSoonModalNamespace } from './ComingSoonModal';
import { ComingSoonOverlay, ComingSoonOverlayProps } from './ComingSoonOverlay';
import { ComingSoonModal, type ComingSoonModalNamespace } from './ComingSoonModal';
import { ComingSoonOverlay, type ComingSoonOverlayProps } from './ComingSoonOverlay';

export const ComingSoon = {
Overlay: ComingSoonOverlay,
Expand Down
2 changes: 1 addition & 1 deletion src/components/ComingSoon/ComingSoonModal.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Meta, StoryObj } from '@storybook/react';
import type { Meta, StoryObj } from '@storybook/react';

import { Box, Button, Text } from '@/ui';

Expand Down
2 changes: 1 addition & 1 deletion src/components/ComingSoon/ComingSoonModal.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ExternalLink } from '@/components';
import { ChildrenProps } from '@/types/Props';
import type { ChildrenProps } from '@/types/Props';
import { Button, Text } from '@/ui';

import { LearnMoreMessage } from '../LearnMoreMessage/LearnMoreMessage';
Expand Down
2 changes: 1 addition & 1 deletion src/components/ComingSoon/ComingSoonOverlay.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Meta, StoryObj } from '@storybook/react';
import type { Meta, StoryObj } from '@storybook/react';

import { Box, Button, Text } from '@/ui';

Expand Down
2 changes: 1 addition & 1 deletion src/components/ComingSoon/ComingSoonOverlay.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ChildrenProps, LoadingProps } from '@/types/Props';
import type { ChildrenProps, LoadingProps } from '@/types/Props';
import { Text } from '@/ui';

import { ComingSoonStyles as S } from './ComingSoon.styles';
Expand Down
4 changes: 2 additions & 2 deletions src/components/CustomDomainBox/CustomDomainBox.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Meta, StoryObj } from '@storybook/react';
import type { Meta, StoryObj } from '@storybook/react';

import { DomainStatus } from '@/generated/graphqlClient';

import { CustomDomainBox, CustomDomainBoxProps } from './CustomDomainBox';
import { CustomDomainBox, type CustomDomainBoxProps } from './CustomDomainBox';

const meta: Meta = {
title: 'Library/Components/Custom Domain Box',
Expand Down
8 changes: 4 additions & 4 deletions src/components/CustomDomainBox/CustomDomainBox.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { Domain } from '@/types/Domain';
import { LoadingProps } from '@/types/Props';
import { SiteENSRecord } from '@/types/Site';
import type { Domain } from '@/types/Domain';
import type { LoadingProps } from '@/types/Props';
import type { SiteENSRecord } from '@/types/Site';
import { Button, Skeleton, Text } from '@/ui';

import { BadgeText, Link, PermissionsTooltip } from '..';
import {
BoxWithFooter,
BoxWithFooterProps,
type BoxWithFooterProps,
} from '../BoxWithFooter/BoxWithFooter';
import { CustomDomainBoxStyles as S } from './CustomDomainBox.styles';

Expand Down
4 changes: 2 additions & 2 deletions src/components/CustomTooltip/CustomTooltip.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { TooltipTriggerProps } from '@radix-ui/react-tooltip';
import type { TooltipTriggerProps } from '@radix-ui/react-tooltip';

import { forwardStyledRef } from '@/theme';
import { ChildrenProps } from '@/types/Props';
import type { ChildrenProps } from '@/types/Props';
import { Tooltip } from '@/ui';

import { CustomTooltipStyles as S } from './CustomTooltip.styles';
Expand Down
2 changes: 1 addition & 1 deletion src/components/DeleteDomainModal/DeleteDomainModal.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useState } from 'react';

import { useSettingsItemContext } from '@/fragments/Site/Settings/Elements/SettingsItem.context';
import { ChildrenProps } from '@/types/Props';
import type { ChildrenProps } from '@/types/Props';
import { Button, Dialog } from '@/ui';

import { Modal } from '../Modal/Modal';
Expand Down
Loading