Skip to content

Commit

Permalink
upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
AugustinMauroy committed Nov 22, 2024
1 parent 6ee4843 commit 5705798
Show file tree
Hide file tree
Showing 67 changed files with 128 additions and 125 deletions.
4 changes: 2 additions & 2 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
npx lint-staged

# Verify typescript staged files
npm run type-check
node --run type-check

# Run tests
npm run test
node --run test

# Build the app
npx turbo build
Expand Down
2 changes: 1 addition & 1 deletion .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"**/*.{js,jsx,ts,tsx,json,css,md}": ["npm run format"]
"**/*.{js,jsx,ts,tsx,json,css,md}": ["node --run format"]
}
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20
22
4 changes: 2 additions & 2 deletions app/[locale]/404/page.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { ArrowRightIcon } from '@heroicons/react/24/outline';
import { getTranslations, unstable_setRequestLocale } from 'next-intl/server';
import ButtonLink from '~/components/Common/Button/Link';
import ButtonLink from '~/components/Common/Button/Link/index.tsx';
import styles from './page.module.css';
import type { FC } from 'react';
import type { Metadata } from 'next';
import type { BaseParams } from '~/types/params';
import type { BaseParams } from '~/types/params.ts';

type NotFoundProps = {
params: BaseParams;
Expand Down
10 changes: 5 additions & 5 deletions app/[locale]/about/page.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { notFound } from 'next/navigation';
import compileMDX from '~/lib/mdx';
import { getContent } from '~/lib/content';
import { aboutMdxComponents } from '~/lib/mdxComponents';
import ArticleLayout from '~/components/Layout/Article';
import { getContent } from '~/lib/content.ts';
import { aboutMdxComponents } from '~/lib/mdxComponents.ts';
import ArticleLayout from '~/components/Layout/Article/index.tsx';
import type { FC } from 'react';
import type { Metadata } from 'next';
import type { AboutFrontmatter } from '~/types/frontmatter';
import type { BaseParams } from '~/types/params';
import type { AboutFrontmatter } from '~/types/frontmatter.ts';
import type { BaseParams } from '~/types/params.ts';

type PageProps = {
params: BaseParams;
Expand Down
14 changes: 7 additions & 7 deletions app/[locale]/blog/[[...page]]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import { RssIcon } from '@heroicons/react/24/solid';
import { notFound } from 'next/navigation';
import { getTranslations } from 'next-intl/server';
import BaseLayout from '~/components/Layout/Base';
import ButtonLink from '~/components/Common/Button/Link';
import PostCard from '~/components/Common/PostCard';
import Pagination from '~/components/Common/Pagination';
import { getSlugs, getFrontmatter } from '~/lib/content';
import BaseLayout from '~/components/Layout/Base/index.tsx';
import ButtonLink from '~/components/Common/Button/Link/index.tsx';
import PostCard from '~/components/Common/PostCard/index.tsx';
import Pagination from '~/components/Common/Pagination/index.tsx';
import { getSlugs, getFrontmatter } from '~/lib/content.ts';
import styles from './page.module.css';
import type { FC } from 'react';
import type { Metadata } from 'next';
import type { BlogFrontmatter } from '~/types/frontmatter';
import type { BaseParams } from '~/types/params';
import type { BlogFrontmatter } from '~/types/frontmatter.ts';
import type { BaseParams } from '~/types/params.ts';

const MAX_POSTS_PER_PAGE = 6;

Expand Down
12 changes: 6 additions & 6 deletions app/[locale]/blog/post/[post]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { notFound } from 'next/navigation';
import compileMDX from '~/lib/mdx';
import { getContent, getSlugs } from '~/lib/content';
import PostLayout from '~/components/Layout/Post';
import compileMDX from '~/lib/mdx.ts';
import { getContent, getSlugs } from '~/lib/content.ts';
import PostLayout from '~/components/Layout/Post/index.tsx';
import { blogMdxComponents } from '~/lib/mdxComponents';
import { getGithubProfileUrl } from '~/utils/gitHubUtils';
import { getGithubProfileUrl } from '~/utils/gitHubUtils.ts';
import type { FC } from 'react';
import type { Metadata } from 'next';
import type { BlogFrontmatter } from '~/types/frontmatter';
import type { BaseParams } from '~/types/params';
import type { BlogFrontmatter } from '~/types/frontmatter.ts';
import type { BaseParams } from '~/types/params.ts';

type PageProps = {
params: {
Expand Down
6 changes: 3 additions & 3 deletions app/[locale]/feed/blog/rss.xml/route.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { generateRssFeed } from '~/lib/rss';
import { availableLocales } from '~/utils/i18n';
import type { BaseParams } from '~/types/params';
import { generateRssFeed } from '~/lib/rss.ts';
import { availableLocales } from '~/utils/i18n/index.ts';
import type { BaseParams } from '~/types/params.ts';

export const generateStaticParams = () => {
return availableLocales.map(lang => ({
Expand Down
6 changes: 3 additions & 3 deletions app/[locale]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import { getTranslations, unstable_setRequestLocale } from 'next-intl/server';
import classNames from 'classnames';
import { GeistSans } from 'geist/font/sans';
import { GeistMono } from 'geist/font/mono';
import { LocaleProvider } from '~/providers/localeProvider';
import { availableLocales } from '~/utils/i18n';
import { LocaleProvider } from '~/providers/localeProvider.tsx';
import { availableLocales } from '~/utils/i18n/index.ts';
import type { FC, PropsWithChildren } from 'react';
import type { Metadata } from 'next';
import type { BaseParams } from '~/types/params';
import type { BaseParams } from '~/types/params.ts';
import '~/styles/globals.css';

type RootLayoutProps = PropsWithChildren<{
Expand Down
4 changes: 2 additions & 2 deletions app/[locale]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { getTranslations } from 'next-intl/server';
import BaseLayout from '~/components/Layout/Base';
import LandingPage from '~/components/Home';
import BaseLayout from '~/components/Layout/Base/index.tsx';
import LandingPage from '~/components/Home/index.tsx';
import type { FC } from 'react';
import type { Metadata } from 'next';

Expand Down
10 changes: 5 additions & 5 deletions app/[locale]/projects/page.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { notFound } from 'next/navigation';
import compileMDX from '~/lib/mdx';
import { getContent } from '~/lib/content';
import { projectsMdxComponents } from '~/lib/mdxComponents';
import ArticleLayout from '~/components/Layout/Article';
import { getContent } from '~/lib/content.ts';
import { projectsMdxComponents } from '~/lib/mdxComponents.ts';
import ArticleLayout from '~/components/Layout/Article/index.tsx';
import type { FC } from 'react';
import type { Metadata } from 'next';
import type { ProjectsFrontmatter } from '~/types/frontmatter';
import type { BaseParams } from '~/types/params';
import type { ProjectsFrontmatter } from '~/types/frontmatter.ts';
import type { BaseParams } from '~/types/params.ts';

type PageProps = {
params: BaseParams;
Expand Down
2 changes: 1 addition & 1 deletion app/sitemap.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { generateSitemap } from '~/lib/sitemap';
import { availableLocaleCodes } from '~/utils/i18n';
import { availableLocaleCodes } from '~/utils/i18n/index.ts';
import type { MetadataRoute } from 'next';

export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
Expand Down
6 changes: 4 additions & 2 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,16 @@
"noUnusedVariables": "error",
"useArrayLiterals": "off",
"noUnknownFunction": "error",
"noUnknownUnit": "error"
"noUnknownUnit": "error",
"useImportExtensions": "error"
},
"style": {
"noNamespace": "error",
"useAsConstAssertion": "error",
"useBlockStatements": "off",
"useNodeAssertStrict": "warn",
"useNodejsImportProtocol": "error"
"useNodejsImportProtocol": "error",
"useImportType": "error"
},
"suspicious": {
"noExplicitAny": "error",
Expand Down
2 changes: 1 addition & 1 deletion components/Common/ActiveLink.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client';
import classNames from 'classnames';
import { usePathname } from 'next/navigation';
import LocalizedLink from './LocalizedLink';
import LocalizedLink from './LocalizedLink.tsx';
import type { FC, PropsWithChildren } from 'react';

type ActiveLinkProps = PropsWithChildren<{
Expand Down
2 changes: 1 addition & 1 deletion components/Common/AuthorsList/index.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import AuthorsList from '.';
import AuthorsList from './index.tsx';
import type { Meta as MetaObj, StoryObj } from '@storybook/react';

type Story = StoryObj<typeof AuthorsList>;
Expand Down
4 changes: 2 additions & 2 deletions components/Common/AuthorsList/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { getGitHubAvatarUrl } from '~/utils/gitHubUtils';
import { getAcronymFromString } from '~/utils/stringUtils';
import { Avatar, AvatarImage, AvatarFallback } from '../Avatar';
import { getAcronymFromString } from '~/utils/stringUtils.ts';
import { Avatar, AvatarImage, AvatarFallback } from '../Avatar/index.tsx';
import styles from './index.module.css';
import type { FC } from 'react';

Expand Down
2 changes: 1 addition & 1 deletion components/Common/Avatar/index.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { getGitHubAvatarUrl } from '~/utils/gitHubUtils';
import { getAcronymFromString } from '~/utils/stringUtils';
import { Avatar, AvatarImage, AvatarFallback } from '.';
import { Avatar, AvatarImage, AvatarFallback } from './index.tsx';
import type { Meta as MetaObj, StoryObj } from '@storybook/react';

type Story = StoryObj<typeof Avatar>;
Expand Down
2 changes: 1 addition & 1 deletion components/Common/Blockquote/index.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Blockquote from './';
import Blockquote from './index.tsx';
import type { Meta as MetaObj, StoryObj } from '@storybook/react';

type Story = StoryObj<typeof Blockquote>;
Expand Down
2 changes: 1 addition & 1 deletion components/Common/Button/Link/index.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ArrowDownIcon } from '@heroicons/react/20/solid';
import ButtonLink from '.';
import ButtonLink from './index.tsx';
import type { Meta as MetaObj, StoryObj } from '@storybook/react';

type Story = StoryObj<typeof ButtonLink>;
Expand Down
2 changes: 1 addition & 1 deletion components/Common/Button/index.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ArrowDownIcon } from '@heroicons/react/20/solid';
import Button from '.';
import Button from './index.tsx';
import type { Meta as MetaObj, StoryObj } from '@storybook/react';

type Story = StoryObj<typeof Button>;
Expand Down
2 changes: 1 addition & 1 deletion components/Common/Codebox/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { DocumentIcon } from '@heroicons/react/24/outline';
import { isValidElement } from 'react';
import { codeToHtml } from 'shiki/bundle/web';
import CopyButton from '../CopyButton';
import CopyButton from '../CopyButton/index.tsx';
import styles from './index.module.css';
import type { FC, ReactNode } from 'react';

Expand Down
4 changes: 2 additions & 2 deletions components/Common/CopyButton/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client';
import { useTranslations } from 'next-intl';
import useCopyToClipboard from '~/hooks/useCopyToClipboard';
import Button from '../Button';
import useCopyToClipboard from '~/hooks/useCopyToClipboard.ts';
import Button from '../Button/index.tsx';
import type { FC } from 'react';

type CopyButtonProps = {
Expand Down
2 changes: 1 addition & 1 deletion components/Common/DotsIllustration/index.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import DotsIllustration from '.';
import DotsIllustration from './index.tsx';
import type { Meta as MetaObj, StoryObj } from '@storybook/react';

type Story = StoryObj<typeof DotsIllustration>;
Expand Down
2 changes: 1 addition & 1 deletion components/Common/Dropdown/index.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { LanguageIcon } from '@heroicons/react/24/outline';
import Dropdown from '.';
import Dropdown from './index.tsx';
import type { Meta as MetaObj, StoryObj } from '@storybook/react';

type Story = StoryObj<typeof Dropdown>;
Expand Down
2 changes: 1 addition & 1 deletion components/Common/Dropdown/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as RadixDropdownMenu from '@radix-ui/react-dropdown-menu';
import classNames from 'classnames';
import Button from '../Button';
import Button from '../Button/index.tsx';
import styles from './index.module.css';
import type { FC, ReactNode } from 'react';

Expand Down
2 changes: 1 addition & 1 deletion components/Common/EnventsCard/index.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import EventsCard from '.';
import EventsCard from './index.tsx';
import type { Meta as MetaObj, StoryObj } from '@storybook/react';

type Story = StoryObj<typeof EventsCard>;
Expand Down
2 changes: 1 addition & 1 deletion components/Common/Pagination/index.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Pagination from './';
import Pagination from './index.tsx';
import type { Meta as MetaObj, StoryObj } from '@storybook/react';

type Story = StoryObj<typeof Pagination>;
Expand Down
2 changes: 1 addition & 1 deletion components/Common/Pagination/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import classNames from 'classnames';
import { ArrowRightIcon, ArrowLeftIcon } from '@heroicons/react/24/outline';
import Link from 'next/link';
import { useTranslations } from 'next-intl';
import ButtonLink from '../Button/Link';
import ButtonLink from '../Button/Link/index.tsx';
import styles from './index.module.css';
import type { FC } from 'react';

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

type Story = StoryObj<typeof PostCard>;
Expand Down
2 changes: 1 addition & 1 deletion components/Common/PostCard/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getFormatter, getTranslations } from 'next-intl/server';
import ButtonLink from '../Button/Link';
import ButtonLink from '../Button/Link/index.tsx';
import styles from './index.module.css';
import type { FC } from 'react';

Expand Down
2 changes: 1 addition & 1 deletion components/Common/ProjectCard/index.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import ProjectCardProps from '.';
import ProjectCardProps from './index.tsx';
import type { Meta as MetaObj, StoryObj } from '@storybook/react';

type Story = StoryObj<typeof ProjectCardProps>;
Expand Down
4 changes: 2 additions & 2 deletions components/Common/ProjectCard/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Image from 'next/image';
import ButtonLink from '../Button/Link';
import DotsIllustration from '../DotsIllustration';
import ButtonLink from '../Button/Link/index.tsx';
import DotsIllustration from '../DotsIllustration/index.tsx';
import styles from './index.module.css';
import type { FC } from 'react';

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

type Story = StoryObj<typeof TextWithImages>;
Expand Down
2 changes: 1 addition & 1 deletion components/Common/TextWithImages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Images from './Images';
import Images from './Images/index.tsx';
import styles from './index.module.css';
import type { FC, ReactNode } from 'react';

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

type Story = StoryObj<typeof TimeLine>;
Expand Down
2 changes: 1 addition & 1 deletion components/Home/Hero/Images/index.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Images from '.';
import Images from './index.tsx';
import type { Meta as MetaObj, StoryObj } from '@storybook/react';

type Story = StoryObj<typeof Images>;
Expand Down
2 changes: 1 addition & 1 deletion components/Home/Hero/index.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Hero from '.';
import Hero from './index.tsx';
import type { Meta as MetaObj, StoryObj } from '@storybook/react';

type Story = StoryObj<typeof Hero>;
Expand Down
6 changes: 3 additions & 3 deletions components/Home/Hero/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
'use client';
import { useTranslations } from 'next-intl';
import { getAge, isBirthday } from '~/utils/date';
import ButtonLink from '~/components/Common/Button/Link';
import Images from './Images';
import { getAge, isBirthday } from '~/utils/date.ts';
import ButtonLink from '~/components/Common/Button/Link/index.tsx';
import Images from './Images/index.tsx';
import styles from './index.module.css';
import type { FC } from 'react';

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

type Story = StoryObj<typeof SocialMediaList>;
Expand Down
12 changes: 6 additions & 6 deletions components/Home/SocialMediaList/index.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import Link from 'next/link';
import Github from '~/components/Icons/Github';
import Instagram from '~/components/Icons/Instagram';
import LinkedIn from '~/components/Icons/Linkedin';
import Mastodon from '~/components/Icons/Mastodon';
import Twitch from '~/components/Icons/Twitch';
import Twitter from '~/components/Icons/Twitter';
import Github from '~/components/Icons/Github.tsx';
import Instagram from '~/components/Icons/Instagram.tsx';
import LinkedIn from '~/components/Icons/Linkedin.tsx';
import Mastodon from '~/components/Icons/Mastodon.tsx';
import Twitch from '~/components/Icons/Twitch.tsx';
import Twitter from '~/components/Icons/Twitter.tsx';
import styles from './index.module.css';
import type { FC } from 'react';

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

type Story = StoryObj<typeof LandingPage>;
Expand Down
6 changes: 3 additions & 3 deletions components/Home/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Hero from '~/components/Home/Hero';
import SocialMediaList from '~/components/Home/SocialMediaList';
import WithEventsCard from '~/components/Logic/WithEnventsCard';
import Hero from '~/components/Home/Hero/index.tsx';
import SocialMediaList from '~/components/Home/SocialMediaList/index.tsx';
import WithEventsCard from '~/components/Logic/WithEnventsCard.tsx';
import type { FC } from 'react';

const LandingPage: FC = () => (
Expand Down
Loading

0 comments on commit 5705798

Please sign in to comment.