1
1
mirror of https://github.com/theoludwig/theoludwig.git synced 2025-05-29 22:37:44 +02:00

chore: simplify TypeScript config

This commit is contained in:
2024-09-11 23:53:26 +02:00
parent 6853ac6884
commit 386f407f21
98 changed files with 2355 additions and 2682 deletions

View File

@ -1,6 +1,7 @@
import "@repo/config-tailwind/styles.css"
import { defaultTranslationValues, Locale } from "@repo/i18n/config"
import { defaultTranslationValues } from "@repo/i18n/config"
import i18nMessagesEnglish from "@repo/i18n/translations/en-US.json"
import type { Locale } from "@repo/utils/constants"
import type { Preview } from "@storybook/react"
import { NextIntlClientProvider } from "next-intl"
import { ThemeProvider as NextThemeProvider } from "next-themes"

View File

@ -5,7 +5,6 @@ import { checkA11y, configureAxe, injectAxe } from "axe-playwright"
/*
* See https://storybook.js.org/docs/writing-tests/test-runner#test-hook-api
* to learn more about the test-runner hooks API.
*/
const config: TestRunnerConfig = {
async preVisit(page) {

View File

@ -16,6 +16,7 @@
"@repo/config-tailwind": "workspace:*",
"@repo/i18n": "workspace:*",
"@repo/ui": "workspace:*",
"@repo/utils": "workspace:*",
"@repo/blog": "workspace:*",
"next": "catalog:",
"next-intl": "catalog:",

View File

@ -2,7 +2,7 @@ import sharedConfig from "@repo/config-tailwind"
/** @type {Pick<import('tailwindcss').Config, "presets" | "content">} */
const config = {
content: [".storybook/preview.tsx", "../../packages/**/*.tsx"],
content: [".storybook/preview.tsx", "../../packages/*/src/**/*.tsx"],
presets: [sharedConfig],
}

View File

@ -1,3 +1,4 @@
TZ=UTC
HOSTNAME=0.0.0.0
PORT=3000
NEXT_TELEMETRY_DISABLED=1

View File

@ -1,7 +1,6 @@
{
"root": true,
"extends": ["@repo/eslint-config/nextjs/.eslintrc.json"],
"ignorePatterns": ["public/"],
"overrides": [
{
"files": ["*.ts", "*.tsx"],

View File

@ -2,11 +2,13 @@ FROM node:22.4.1-slim AS node-pnpm
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable
ENV TURBO_TELEMETRY_DISABLED=1
ENV DO_NOT_TRACK=1
WORKDIR /usr/src/app
FROM node-pnpm AS builder
RUN pnpm install --global turbo@2.0.10
COPY ./ ./
RUN pnpm install --global turbo@2.1.1
RUN turbo prune @repo/website --docker
FROM node-pnpm AS installer

View File

@ -3,7 +3,7 @@ import { notFound } from "next/navigation"
import { getBlogPostBySlug, getBlogPosts } from "@repo/blog"
import { BlogPostUI } from "@repo/blog/BlogPostUI"
import type { Locale } from "@repo/i18n/config"
import type { Locale } from "@repo/utils/constants"
import { unstable_setRequestLocale } from "next-intl/server"
interface BlogPostPageProps {

View File

@ -1,12 +1,13 @@
import { getBlogPosts } from "@repo/blog"
import { BlogPosts } from "@repo/blog/BlogPosts"
import { LOCALE_DEFAULT, type LocaleProps } from "@repo/i18n/config"
import { type LocaleProps } from "@repo/i18n/config"
import { MainLayout } from "@repo/ui/Layout/MainLayout"
import {
Section,
SectionDescription,
SectionTitle,
} from "@repo/ui/Layout/Section"
import { LOCALE_DEFAULT } from "@repo/utils/constants"
import type { Metadata } from "next"
import { unstable_setRequestLocale } from "next-intl/server"

View File

@ -1,6 +1,7 @@
import "@repo/config-tailwind/styles.css"
import type { Locale, LocaleProps } from "@repo/i18n/config"
import { LOCALES } from "@repo/i18n/config"
import type { LocaleProps } from "@repo/i18n/config"
import type { Locale } from "@repo/utils/constants"
import { LOCALES } from "@repo/utils/constants"
import type { Metadata } from "next"
import { NextIntlClientProvider } from "next-intl"
import {

View File

@ -1,4 +1,4 @@
import { LOCALES, LOCALE_DEFAULT, LOCALE_PREFIX } from "@repo/i18n/config"
import { LOCALES, LOCALE_DEFAULT, LOCALE_PREFIX } from "@repo/utils/constants"
import createMiddleware from "next-intl/middleware"
export default createMiddleware({

View File

@ -2,7 +2,7 @@ import sharedConfig from "@repo/config-tailwind"
/** @type {Pick<import('tailwindcss').Config, "presets" | "content">} */
const config = {
content: ["./**/*.tsx", "../../packages/**/*.tsx"],
content: ["./app/**/*.tsx", "../../packages/*/src/**/*.tsx"],
presets: [sharedConfig],
}

View File

@ -1,16 +1,9 @@
{
"extends": "@repo/config-typescript/tsconfig.json",
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "Bundler",
"resolveJsonModule": true,
"lib": ["DOM", "DOM.Iterable", "ESNext"],
"types": ["@total-typescript/ts-reset", "@repo/i18n/messages.d.ts"],
"incremental": true,
"noEmit": true,
"allowJs": true,
"jsx": "preserve",
"paths": {
"#*": ["./*"]
},