mirror of
https://github.com/theoludwig/theoludwig.git
synced 2026-02-20 03:09:20 +01:00
chore: migrate from ESLint/Prettier to Oxc
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
FROM node:24.11.1-slim@sha256:0afb7822fac7bf9d7c1bf3b6e6c496dee6b2b64d8dfa365501a3c68e8eba94b2 AS node-pnpm
|
||||
FROM node:24.13.1-slim@sha256:a81a03dd965b4052269a57fac857004022b522a4bf06e7a739e25e18bce45af2 AS node-pnpm
|
||||
ENV PNPM_HOME="/pnpm"
|
||||
ENV PATH="$PNPM_HOME:$PATH"
|
||||
RUN npm install --global corepack@0.34.5 && corepack enable
|
||||
RUN npm install --global corepack@0.34.6 && corepack enable
|
||||
ENV TURBO_TELEMETRY_DISABLED=1
|
||||
ENV NEXT_TELEMETRY_DISABLED=1
|
||||
ENV DO_NOT_TRACK=1
|
||||
@@ -9,7 +9,7 @@ WORKDIR /usr/src/app
|
||||
|
||||
FROM node-pnpm AS builder
|
||||
COPY ./ ./
|
||||
RUN pnpm install --global turbo@2.6.3
|
||||
RUN pnpm install --global turbo@2.8.9
|
||||
RUN turbo prune @repo/website --docker
|
||||
|
||||
FROM node-pnpm AS installer
|
||||
|
||||
@@ -13,9 +13,7 @@ interface BlogPostPageProps {
|
||||
}>
|
||||
}
|
||||
|
||||
export const generateMetadata = async (
|
||||
props: BlogPostPageProps,
|
||||
): Promise<Metadata> => {
|
||||
export const generateMetadata = async (props: BlogPostPageProps): Promise<Metadata> => {
|
||||
const { slug } = await props.params
|
||||
const blogPost = await getBlogPostBySlug(slug)
|
||||
if (blogPost == null) {
|
||||
@@ -37,9 +35,7 @@ export const generateMetadata = async (
|
||||
}
|
||||
}
|
||||
|
||||
export const generateStaticParams = async (): Promise<
|
||||
Array<{ slug: string }>
|
||||
> => {
|
||||
export const generateStaticParams = async (): Promise<Array<{ slug: string }>> => {
|
||||
const posts = await getBlogPosts()
|
||||
return posts.map((post) => {
|
||||
return {
|
||||
|
||||
@@ -2,18 +2,13 @@ import { getBlogPosts } from "@repo/blog"
|
||||
import { BlogPosts } from "@repo/blog/BlogPosts"
|
||||
import type { LocaleProps } from "@repo/i18n/routing"
|
||||
import { MainLayout } from "@repo/ui/Layout/MainLayout"
|
||||
import {
|
||||
Section,
|
||||
SectionDescription,
|
||||
SectionTitle,
|
||||
} from "@repo/ui/Layout/Section"
|
||||
import { Section, SectionDescription, SectionTitle } from "@repo/ui/Layout/Section"
|
||||
import { LOCALE_DEFAULT } from "@repo/utils/constants"
|
||||
import type { Metadata } from "next"
|
||||
import { setRequestLocale } from "next-intl/server"
|
||||
|
||||
const title = "Blog | Théo LUDWIG"
|
||||
const description =
|
||||
"The latest news about my journey of learning computer science."
|
||||
const description = "The latest news about my journey of learning computer science."
|
||||
|
||||
export const generateMetadata = async (): Promise<Metadata> => {
|
||||
return {
|
||||
|
||||
@@ -9,9 +9,7 @@ interface CurriculumVitaeLayoutProps extends React.PropsWithChildren {
|
||||
}>
|
||||
}
|
||||
|
||||
const CurriculumVitaeLayout: React.FC<CurriculumVitaeLayoutProps> = async (
|
||||
props,
|
||||
) => {
|
||||
const CurriculumVitaeLayout: React.FC<CurriculumVitaeLayoutProps> = async (props) => {
|
||||
const { children, params } = props
|
||||
|
||||
const { locale } = await params
|
||||
|
||||
@@ -3,11 +3,7 @@ import type { Locale } from "@repo/utils/constants"
|
||||
import { LOCALES } from "@repo/utils/constants"
|
||||
import type { Metadata, Viewport } from "next"
|
||||
import { NextIntlClientProvider } from "next-intl"
|
||||
import {
|
||||
getMessages,
|
||||
getTranslations,
|
||||
setRequestLocale,
|
||||
} from "next-intl/server"
|
||||
import { getMessages, getTranslations, setRequestLocale } from "next-intl/server"
|
||||
import Script from "next/script"
|
||||
|
||||
const DOMAIN = "theoludwig.fr"
|
||||
@@ -85,14 +81,9 @@ const LocaleLayout: React.FC<LocaleLayoutProps> = async (props) => {
|
||||
return (
|
||||
<html lang={locale} suppressHydrationWarning>
|
||||
<body>
|
||||
<NextIntlClientProvider messages={messages}>
|
||||
{children}
|
||||
</NextIntlClientProvider>
|
||||
<NextIntlClientProvider messages={messages}>{children}</NextIntlClientProvider>
|
||||
|
||||
<Script
|
||||
async
|
||||
src="https://analytics.theoludwig.fr/js/pa-MToGPBn2iXgorPLkh6f_s.js"
|
||||
/>
|
||||
<Script async src="https://analytics.theoludwig.fr/js/pa-MToGPBn2iXgorPLkh6f_s.js" />
|
||||
<Script id="analytics-init">
|
||||
{`
|
||||
window.plausible=window.plausible||function(){(plausible.q=plausible.q||[]).push(arguments)},plausible.init=plausible.init||function(i){plausible.o=i||{}};
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
import typescriptESLint from "typescript-eslint"
|
||||
import { defineConfig } from "eslint/config"
|
||||
import config from "@repo/config-eslint"
|
||||
|
||||
export default defineConfig(...config, {
|
||||
files: ["**/*.ts", "**/*.tsx"],
|
||||
languageOptions: {
|
||||
parser: typescriptESLint.parser,
|
||||
parserOptions: {
|
||||
projectService: true,
|
||||
tsconfigRootDir: import.meta.dirname,
|
||||
},
|
||||
},
|
||||
})
|
||||
@@ -14,9 +14,6 @@ const nextConfig: NextConfig = {
|
||||
typescript: {
|
||||
ignoreBuildErrors: true,
|
||||
},
|
||||
experimental: {
|
||||
turbopackFileSystemCacheForDev: true,
|
||||
},
|
||||
}
|
||||
|
||||
const withNextIntl = createNextIntlPlugin({
|
||||
|
||||
@@ -11,35 +11,31 @@
|
||||
"build": "next build",
|
||||
"start": "next start --port 3000",
|
||||
"typegen": "next typegen",
|
||||
"lint:eslint": "eslint app --max-warnings 0",
|
||||
"lint:typescript": "next typegen && tsc --noEmit"
|
||||
},
|
||||
"dependencies": {
|
||||
"@mdx-js/mdx": "catalog:",
|
||||
"@repo/blog": "workspace:*",
|
||||
"@repo/config-tailwind": "workspace:*",
|
||||
"@repo/utils": "workspace:*",
|
||||
"@repo/i18n": "workspace:*",
|
||||
"@repo/ui": "workspace:*",
|
||||
"@mdx-js/mdx": "catalog:",
|
||||
"next-mdx-remote": "catalog:",
|
||||
"shiki": "catalog:",
|
||||
"@repo/utils": "workspace:*",
|
||||
"next": "catalog:",
|
||||
"next-intl": "catalog:",
|
||||
"next-mdx-remote": "catalog:",
|
||||
"react": "catalog:",
|
||||
"react-dom": "catalog:"
|
||||
"react-dom": "catalog:",
|
||||
"shiki": "catalog:"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@repo/config-eslint": "workspace:*",
|
||||
"@repo/config-typescript": "workspace:*",
|
||||
"@tailwindcss/postcss": "catalog:",
|
||||
"@total-typescript/ts-reset": "catalog:",
|
||||
"@types/node": "catalog:",
|
||||
"@types/react": "catalog:",
|
||||
"@types/react-dom": "catalog:",
|
||||
"@total-typescript/ts-reset": "catalog:",
|
||||
"eslint": "catalog:",
|
||||
"postcss": "catalog:",
|
||||
"tailwindcss": "catalog:",
|
||||
"@tailwindcss/postcss": "catalog:",
|
||||
"typescript-eslint": "catalog:",
|
||||
"typescript": "catalog:"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user