chore: simplify TypeScript config
This commit is contained in:
parent
63862b19c0
commit
791551a4e8
2
.vscode/react.code-snippets
vendored
2
.vscode/react.code-snippets
vendored
@ -22,7 +22,7 @@
|
||||
"body": [
|
||||
"import type { Meta, StoryObj } from \"@storybook/react\"",
|
||||
"",
|
||||
"import { ${1:ComponentName} as ${1:ComponentName}Component } from \"./${1:ComponentName}\"",
|
||||
"import { ${1:ComponentName} as ${1:ComponentName}Component } from \"./${1:ComponentName}.tsx\"",
|
||||
"",
|
||||
"const meta = {",
|
||||
" title: \"${1:ComponentName}\",",
|
||||
|
@ -5,7 +5,7 @@ RUN corepack enable
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
FROM node-pnpm AS builder
|
||||
RUN pnpm install --global turbo@2.0.12
|
||||
RUN pnpm install --global turbo@2.0.13
|
||||
COPY ./ ./
|
||||
RUN turbo prune @repo/api --docker
|
||||
|
||||
|
@ -40,13 +40,13 @@ export default defineConfig({
|
||||
],
|
||||
preloads: [
|
||||
async () => {
|
||||
return await import("#start/database.js")
|
||||
return await import("#start/database.ts")
|
||||
},
|
||||
async () => {
|
||||
return await import("#start/routes.js")
|
||||
return await import("#start/routes.ts")
|
||||
},
|
||||
async () => {
|
||||
return await import("#start/kernel.js")
|
||||
return await import("#start/kernel.ts")
|
||||
},
|
||||
],
|
||||
tests: {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { APP_KEY, APP_KEY_HEADER_NAME } from "#config/app.js"
|
||||
import { APP_KEY, APP_KEY_HEADER_NAME } from "#config/app.ts"
|
||||
import type { HttpContext } from "@adonisjs/core/http"
|
||||
import type { NextFn } from "@adonisjs/core/types/http"
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { APP_KEY, APP_KEY_HEADER_NAME } from "#config/app.js"
|
||||
import { APP_KEY, APP_KEY_HEADER_NAME } from "#config/app.ts"
|
||||
import { test } from "@japa/runner"
|
||||
|
||||
test.group("GET /health", () => {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { healthChecks } from "#start/health.js"
|
||||
import { middleware } from "#start/kernel.js"
|
||||
import { healthChecks } from "#start/health.ts"
|
||||
import { middleware } from "#start/kernel.ts"
|
||||
import type { HttpContext } from "@adonisjs/core/http"
|
||||
import router from "@adonisjs/core/services/router"
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import "#app/routes/get.js"
|
||||
import "#app/routes/health/get.js"
|
||||
import "#app/routes/wikipedia/pages/[id]/get.js"
|
||||
import "#app/routes/wikipedia/pages/get.js"
|
||||
import "#app/routes/get.ts"
|
||||
import "#app/routes/health/get.ts"
|
||||
import "#app/routes/wikipedia/pages/[id]/get.ts"
|
||||
import "#app/routes/wikipedia/pages/get.ts"
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { PageFactory } from "#database/factories/page_factory.js"
|
||||
import { PageFactory } from "#database/factories/page_factory.ts"
|
||||
import testUtils from "@adonisjs/core/services/test_utils"
|
||||
import db from "@adonisjs/lucid/services/db"
|
||||
import { test } from "@japa/runner"
|
||||
|
@ -1,5 +1,5 @@
|
||||
import Page from "#app/models/page.js"
|
||||
import { throttle } from "#start/limiter.js"
|
||||
import Page from "#app/models/page.ts"
|
||||
import { throttle } from "#start/limiter.ts"
|
||||
import type { HttpContext } from "@adonisjs/core/http"
|
||||
import router from "@adonisjs/core/services/router"
|
||||
import vine from "@vinejs/vine"
|
||||
|
@ -1,5 +1,5 @@
|
||||
import Page from "#app/models/page.js"
|
||||
import { PageFactory } from "#database/factories/page_factory.js"
|
||||
import Page from "#app/models/page.ts"
|
||||
import { PageFactory } from "#database/factories/page_factory.ts"
|
||||
import testUtils from "@adonisjs/core/services/test_utils"
|
||||
import { test } from "@japa/runner"
|
||||
|
||||
@ -34,7 +34,7 @@ test.group("GET /wikipedia/pages", (group) => {
|
||||
const limit = 4
|
||||
const title = "No"
|
||||
const pagesMatching = await Page.createMany([
|
||||
{ title: "Node.js" },
|
||||
{ title: "Node.ts" },
|
||||
{ title: "North_America" },
|
||||
{ title: "NoSQL" },
|
||||
{ title: "No" },
|
||||
|
@ -1,5 +1,5 @@
|
||||
import Page from "#app/models/page.js"
|
||||
import { throttle } from "#start/limiter.js"
|
||||
import Page from "#app/models/page.ts"
|
||||
import { throttle } from "#start/limiter.ts"
|
||||
import type { HttpContext } from "@adonisjs/core/http"
|
||||
import router from "@adonisjs/core/services/router"
|
||||
import { sanitizePageTitle } from "@repo/wikipedia-game-solver/wikipedia-utils"
|
||||
|
@ -31,7 +31,7 @@ try {
|
||||
await ignitor
|
||||
.tap((app) => {
|
||||
app.booting(async () => {
|
||||
await import("#start/env.js")
|
||||
await import("#start/env.ts")
|
||||
})
|
||||
app.listen("SIGTERM", async () => {
|
||||
return await app.terminate()
|
||||
|
@ -30,7 +30,7 @@ try {
|
||||
await ignitor
|
||||
.tap((app) => {
|
||||
app.booting(async () => {
|
||||
await import("#start/env.js")
|
||||
await import("#start/env.ts")
|
||||
})
|
||||
app.listen("SIGTERM", async () => {
|
||||
return await app.terminate()
|
||||
|
@ -9,6 +9,7 @@
|
||||
process.env["NODE_ENV"] = "test"
|
||||
process.env["PORT"] = "3333"
|
||||
process.env["LIMITER_STORE"] = "memory"
|
||||
process.env["LOG_LEVEL"] = "error"
|
||||
|
||||
import { Ignitor, prettyPrintError } from "@adonisjs/core"
|
||||
import { configure, processCLIArgs, run } from "@japa/runner"
|
||||
@ -35,7 +36,7 @@ try {
|
||||
await ignitor
|
||||
.tap((app) => {
|
||||
app.booting(async () => {
|
||||
await import("#start/env.js")
|
||||
await import("#start/env.ts")
|
||||
})
|
||||
app.listen("SIGTERM", async () => {
|
||||
return await app.terminate()
|
||||
@ -46,7 +47,7 @@ try {
|
||||
})
|
||||
.testRunner()
|
||||
.configure(async (app) => {
|
||||
const { runnerHooks, ...config } = await import("#tests/bootstrap.js")
|
||||
const { runnerHooks, ...config } = await import("#tests/bootstrap.ts")
|
||||
|
||||
processCLIArgs(process.argv.splice(2))
|
||||
configure({
|
||||
|
@ -1,4 +1,4 @@
|
||||
import env from "#start/env.js"
|
||||
import env from "#start/env.ts"
|
||||
import { Secret } from "@adonisjs/core/helpers"
|
||||
import { defineConfig } from "@adonisjs/core/http"
|
||||
import app from "@adonisjs/core/services/app"
|
||||
|
@ -9,7 +9,7 @@ const authConfig = defineConfig({
|
||||
provider: tokensUserProvider({
|
||||
tokens: "accessTokens",
|
||||
model: async () => {
|
||||
return await import("#app/models/user.js")
|
||||
return await import("#app/models/user.ts")
|
||||
},
|
||||
}),
|
||||
}),
|
||||
|
@ -1,4 +1,4 @@
|
||||
import env from "#start/env.js"
|
||||
import env from "#start/env.ts"
|
||||
import app from "@adonisjs/core/services/app"
|
||||
import { defineConfig } from "@adonisjs/lucid"
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import env from "#start/env.js"
|
||||
import env from "#start/env.ts"
|
||||
import { defineConfig, stores } from "@adonisjs/limiter"
|
||||
|
||||
const limiterConfig = defineConfig({
|
||||
|
@ -1,4 +1,4 @@
|
||||
import env from "#start/env.js"
|
||||
import env from "#start/env.ts"
|
||||
import { defineConfig, targets } from "@adonisjs/core/logger"
|
||||
import app from "@adonisjs/core/services/app"
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Page from "#app/models/page.js"
|
||||
import Page from "#app/models/page.ts"
|
||||
import factory from "@adonisjs/lucid/factories"
|
||||
import { sanitizePageTitle } from "@repo/wikipedia-game-solver/wikipedia-utils"
|
||||
|
||||
|
@ -11,7 +11,7 @@ import server from "@adonisjs/core/services/server"
|
||||
* The error handler is used to convert an exception to a HTTP response.
|
||||
*/
|
||||
server.errorHandler(async () => {
|
||||
return await import("#app/exceptions/handler.js")
|
||||
return await import("#app/exceptions/handler.ts")
|
||||
})
|
||||
|
||||
/**
|
||||
@ -19,10 +19,10 @@ server.errorHandler(async () => {
|
||||
*/
|
||||
server.use([
|
||||
async () => {
|
||||
return await import("#app/middleware/container_bindings_middleware.js")
|
||||
return await import("#app/middleware/container_bindings_middleware.ts")
|
||||
},
|
||||
async () => {
|
||||
return await import("#app/middleware/force_json_response_middleware.js")
|
||||
return await import("#app/middleware/force_json_response_middleware.ts")
|
||||
},
|
||||
async () => {
|
||||
return await import("@adonisjs/cors/cors_middleware")
|
||||
@ -46,9 +46,9 @@ router.use([
|
||||
*/
|
||||
export const middleware = router.named({
|
||||
appKeySecurity: async () => {
|
||||
return await import("#app/middleware/app_key_security_middleware.js")
|
||||
return await import("#app/middleware/app_key_security_middleware.ts")
|
||||
},
|
||||
auth: async () => {
|
||||
return await import("#app/middleware/auth_middleware.js")
|
||||
return await import("#app/middleware/auth_middleware.ts")
|
||||
},
|
||||
})
|
||||
|
@ -4,7 +4,7 @@
|
||||
* The "limiter.define" method creates an HTTP middleware to apply rate limits on a route or a group of routes. Feel free to define as many throttle middleware as needed.
|
||||
*/
|
||||
|
||||
import { APP_KEY, APP_KEY_HEADER_NAME } from "#config/app.js"
|
||||
import { APP_KEY, APP_KEY_HEADER_NAME } from "#config/app.ts"
|
||||
import app from "@adonisjs/core/services/app"
|
||||
import limiter from "@adonisjs/limiter/services/main"
|
||||
|
||||
|
@ -4,4 +4,4 @@
|
||||
* The routes file is used for defining the HTTP routes.
|
||||
*/
|
||||
|
||||
import "#app/routes/index.js"
|
||||
import "#app/routes/index.ts"
|
||||
|
@ -1,15 +1,9 @@
|
||||
{
|
||||
"extends": "@repo/config-typescript/tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"target": "ESNext",
|
||||
"module": "NodeNext",
|
||||
"moduleResolution": "NodeNext",
|
||||
"resolveJsonModule": true,
|
||||
"lib": ["ESNext"],
|
||||
"types": ["@total-typescript/ts-reset", "@types/node"],
|
||||
"experimentalDecorators": true,
|
||||
"emitDecoratorMetadata": true,
|
||||
|
||||
"noEmit": true
|
||||
"emitDecoratorMetadata": true
|
||||
}
|
||||
}
|
||||
|
@ -1,11 +1,9 @@
|
||||
#!/usr/bin/env -S node --import=tsx
|
||||
|
||||
import { add } from "#abc/def/add.js"
|
||||
import { add } from "#abc/def/add.ts"
|
||||
|
||||
import { VERSION } from "@repo/utils/constants"
|
||||
import { sum } from "@repo/wikipedia-game-solver/wikipedia-api"
|
||||
|
||||
console.log("Hello, world!")
|
||||
console.log(sum(1, 2))
|
||||
console.log(add(2, 3))
|
||||
console.log(`v${VERSION}`)
|
||||
|
@ -1,13 +1,7 @@
|
||||
{
|
||||
"extends": "@repo/config-typescript/tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"target": "ESNext",
|
||||
"module": "NodeNext",
|
||||
"moduleResolution": "NodeNext",
|
||||
"resolveJsonModule": true,
|
||||
"lib": ["ESNext"],
|
||||
"types": ["@total-typescript/ts-reset", "@types/node"],
|
||||
|
||||
"noEmit": true
|
||||
"types": ["@total-typescript/ts-reset", "@types/node"]
|
||||
}
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ RUN corepack enable
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
FROM node-pnpm AS builder
|
||||
RUN pnpm install --global turbo@2.0.12
|
||||
RUN pnpm install --global turbo@2.0.13
|
||||
COPY ./ ./
|
||||
RUN turbo prune @repo/website --docker
|
||||
|
||||
|
@ -5,7 +5,7 @@ import { MainLayout } from "@repo/ui/Layout/MainLayout"
|
||||
import {
|
||||
fromLocaleToWikipediaLocale,
|
||||
getWikipediaLink,
|
||||
} from "@repo/wikipedia-game-solver/wikipedia-api"
|
||||
} from "@repo/wikipedia-game-solver/wikipedia-utils"
|
||||
import { WikipediaClient } from "@repo/wikipedia-game-solver/WikipediaClient"
|
||||
import { useTranslations } from "next-intl"
|
||||
import { unstable_setRequestLocale } from "next-intl/server"
|
||||
|
@ -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": {
|
||||
"#*": ["./*"]
|
||||
},
|
||||
|
@ -29,7 +29,7 @@
|
||||
"prettier-plugin-tailwindcss": "0.6.6",
|
||||
"replace-in-files-cli": "3.0.0",
|
||||
"semantic-release": "23.1.1",
|
||||
"turbo": "2.0.12",
|
||||
"turbo": "2.0.13",
|
||||
"typescript": "catalog:"
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,23 @@
|
||||
{
|
||||
"extends": ["conventions"]
|
||||
"extends": ["conventions"],
|
||||
"plugins": ["import-x"],
|
||||
"rules": {
|
||||
"import-x/no-absolute-path": "error",
|
||||
"import-x/no-webpack-loader-syntax": "error",
|
||||
"import-x/no-self-import": "error",
|
||||
"import-x/no-useless-path-segments": "error",
|
||||
"import-x/export": "error",
|
||||
"import-x/no-duplicates": "error",
|
||||
"import-x/no-named-default": "error",
|
||||
"import-x/no-empty-named-blocks": "error",
|
||||
"import-x/no-anonymous-default-export": "error",
|
||||
"import-x/extensions": [
|
||||
"error",
|
||||
"ignorePackages",
|
||||
{
|
||||
"ts": "always",
|
||||
"tsx": "always"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"extends": [
|
||||
"conventions",
|
||||
"../.eslintrc.json",
|
||||
"next/core-web-vitals",
|
||||
"plugin:tailwindcss/recommended",
|
||||
"plugin:storybook/recommended"
|
||||
|
@ -17,6 +17,7 @@
|
||||
"eslint-config-next": "catalog:",
|
||||
"eslint-plugin-storybook": "catalog:",
|
||||
"eslint-plugin-tailwindcss": "catalog:",
|
||||
"eslint-plugin-import-x": "catalog:",
|
||||
"typescript": "catalog:"
|
||||
}
|
||||
}
|
||||
|
@ -1,10 +1,6 @@
|
||||
{
|
||||
"extends": "@repo/config-typescript/tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"target": "ESNext",
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "Bundler",
|
||||
|
||||
"noEmit": true
|
||||
"lib": ["ESNext"]
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,6 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"strict": true,
|
||||
"strictBindCallApply": true,
|
||||
"strictFunctionTypes": true,
|
||||
"allowUnusedLabels": false,
|
||||
"allowUnreachableCode": false,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
@ -18,8 +16,15 @@
|
||||
"verbatimModuleSyntax": true,
|
||||
"isolatedModules": true,
|
||||
"esModuleInterop": true,
|
||||
"allowImportingTsExtensions": true,
|
||||
"skipLibCheck": true,
|
||||
"jsx": "preserve",
|
||||
"incremental": true
|
||||
"incremental": true,
|
||||
"noEmit": true,
|
||||
|
||||
"target": "ESNext",
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "Bundler",
|
||||
"resolveJsonModule": true
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ import { getRequestConfig } from "next-intl/server"
|
||||
import { notFound } from "next/navigation"
|
||||
|
||||
import type { Locale } from "./config"
|
||||
import { defaultTranslationValues, LOCALE_DEFAULT, LOCALES } from "./config"
|
||||
import { defaultTranslationValues, LOCALE_DEFAULT, LOCALES } from "./config.tsx"
|
||||
|
||||
export default getRequestConfig(async ({ locale }) => {
|
||||
if (!LOCALES.includes(locale as Locale)) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { createSharedPathnamesNavigation } from "next-intl/navigation"
|
||||
|
||||
import { LOCALES, LOCALE_PREFIX } from "./config"
|
||||
import { LOCALES, LOCALE_PREFIX } from "./config.tsx"
|
||||
|
||||
export const { Link, redirect, usePathname, useRouter, permanentRedirect } =
|
||||
createSharedPathnamesNavigation({
|
||||
|
@ -1,14 +1,7 @@
|
||||
{
|
||||
"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"],
|
||||
"jsx": "preserve",
|
||||
|
||||
"noEmit": true
|
||||
"types": ["@total-typescript/ts-reset"]
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { act, renderHook } from "@testing-library/react"
|
||||
|
||||
import { describe, expect, it } from "vitest"
|
||||
import { useBoolean } from "../useBoolean"
|
||||
import { useBoolean } from "../useBoolean.ts"
|
||||
|
||||
describe("useBoolean", () => {
|
||||
const initialValues = [true, false]
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { renderHook } from "@testing-library/react"
|
||||
|
||||
import { describe, expect, it } from "vitest"
|
||||
import { useIsMounted } from "../useIsMounted"
|
||||
import { useIsMounted } from "../useIsMounted.ts"
|
||||
|
||||
describe("useIsMounted", () => {
|
||||
it("should return true", () => {
|
||||
|
@ -1,14 +1,7 @@
|
||||
{
|
||||
"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"],
|
||||
"jsx": "preserve",
|
||||
|
||||
"noEmit": true
|
||||
"types": ["@total-typescript/ts-reset"]
|
||||
}
|
||||
}
|
||||
|
@ -2,8 +2,7 @@ import type { Meta, StoryObj } from "@storybook/react"
|
||||
import { expect, fn, userEvent, within } from "@storybook/test"
|
||||
import { FaCheck } from "react-icons/fa6"
|
||||
|
||||
import type { ButtonLinkProps } from "./Button"
|
||||
import { Button } from "./Button"
|
||||
import { Button, type ButtonLinkProps } from "./Button.tsx"
|
||||
|
||||
const meta = {
|
||||
title: "Design System/Button",
|
||||
|
@ -3,8 +3,8 @@ import { Link as NextLink } from "@repo/i18n/navigation"
|
||||
import type { VariantProps } from "cva"
|
||||
import { cva } from "cva"
|
||||
|
||||
import { Spinner } from "../Spinner/Spinner"
|
||||
import { Ripple } from "./Ripple"
|
||||
import { Spinner } from "../Spinner/Spinner.tsx"
|
||||
import { Ripple } from "./Ripple.tsx"
|
||||
|
||||
const buttonVariants = cva({
|
||||
base: "relative inline-flex items-center justify-center overflow-hidden rounded-md text-base font-semibold transition duration-150 ease-in-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
||||
|
@ -1,6 +1,6 @@
|
||||
import type { Meta, StoryObj } from "@storybook/react"
|
||||
|
||||
import { Link } from "./Link"
|
||||
import { Link } from "./Link.tsx"
|
||||
|
||||
const meta = {
|
||||
title: "Design System/Link",
|
||||
|
@ -1,6 +1,5 @@
|
||||
import type { Meta, StoryObj } from "@storybook/react"
|
||||
|
||||
import { Spinner } from "./Spinner"
|
||||
import { Spinner } from "./Spinner.tsx"
|
||||
|
||||
const meta = {
|
||||
title: "Design System/Spinner",
|
||||
|
@ -1,7 +1,7 @@
|
||||
import type { Meta, StoryObj } from "@storybook/react"
|
||||
|
||||
import type { TypographyProps } from "./Typography"
|
||||
import { Typography } from "./Typography"
|
||||
import { Typography } from "./Typography.tsx"
|
||||
|
||||
const meta = {
|
||||
title: "Design System/Typography",
|
||||
|
@ -1,6 +1,6 @@
|
||||
import type { Meta, StoryObj } from "@storybook/react"
|
||||
|
||||
import { ErrorNotFound as ErrorNotFoundComponent } from "./ErrorNotFound"
|
||||
import { ErrorNotFound as ErrorNotFoundComponent } from "./ErrorNotFound.tsx"
|
||||
|
||||
const meta = {
|
||||
title: "Errors/ErrorNotFound",
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { useTranslations } from "next-intl"
|
||||
import { Link } from "../../Design/Link/Link"
|
||||
import { Typography } from "../../Design/Typography/Typography"
|
||||
import { MainLayout } from "../../Layout/MainLayout/MainLayout"
|
||||
import { Section } from "../../Layout/Section/Section"
|
||||
import { Link } from "../../Design/Link/Link.tsx"
|
||||
import { Typography } from "../../Design/Typography/Typography.tsx"
|
||||
import { MainLayout } from "../../Layout/MainLayout/MainLayout.tsx"
|
||||
import { Section } from "../../Layout/Section/Section.tsx"
|
||||
|
||||
export interface ErrorNotFoundProps {}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
import type { Meta, StoryObj } from "@storybook/react"
|
||||
import { expect, fn, userEvent, within } from "@storybook/test"
|
||||
|
||||
import { ErrorServer as ErrorServerComponent } from "./ErrorServer"
|
||||
import { ErrorServer as ErrorServerComponent } from "./ErrorServer.tsx"
|
||||
|
||||
const meta = {
|
||||
title: "Errors/ErrorServer",
|
||||
|
@ -2,10 +2,10 @@
|
||||
|
||||
import { useTranslations } from "next-intl"
|
||||
import { useEffect } from "react"
|
||||
import { Button } from "../../Design/Button/Button"
|
||||
import { Typography } from "../../Design/Typography/Typography"
|
||||
import { MainLayout } from "../../Layout/MainLayout/MainLayout"
|
||||
import { Section } from "../../Layout/Section/Section"
|
||||
import { Button } from "../../Design/Button/Button.tsx"
|
||||
import { Typography } from "../../Design/Typography/Typography.tsx"
|
||||
import { MainLayout } from "../../Layout/MainLayout/MainLayout.tsx"
|
||||
import { Section } from "../../Layout/Section/Section.tsx"
|
||||
|
||||
export interface ErrorServerProps {
|
||||
error: Error & { digest?: string }
|
||||
|
@ -1,6 +1,6 @@
|
||||
import type { Meta, StoryObj } from "@storybook/react"
|
||||
|
||||
import { Footer as FooterComponent } from "./Footer"
|
||||
import { Footer as FooterComponent } from "./Footer.tsx"
|
||||
|
||||
const meta = {
|
||||
title: "Layout/Footer",
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { useTranslations } from "next-intl"
|
||||
|
||||
import { GIT_REPO_LINK } from "@repo/utils/constants"
|
||||
import { Link } from "../../Design/Link/Link"
|
||||
import { Link } from "../../Design/Link/Link.tsx"
|
||||
|
||||
export interface FooterProps {
|
||||
version: string
|
||||
|
@ -1,6 +1,6 @@
|
||||
import type { Meta, StoryObj } from "@storybook/react"
|
||||
|
||||
import { Header as HeaderComponent } from "./Header"
|
||||
import { Header as HeaderComponent } from "./Header.tsx"
|
||||
|
||||
const meta = {
|
||||
title: "Layout/Header",
|
||||
|
@ -1,7 +1,7 @@
|
||||
"use client"
|
||||
|
||||
import { Locales } from "./Locales"
|
||||
import { SwitchTheme } from "./SwitchTheme"
|
||||
import { Locales } from "./Locales.tsx"
|
||||
import { SwitchTheme } from "./SwitchTheme.tsx"
|
||||
|
||||
export const Header: React.FC = () => {
|
||||
return (
|
||||
|
@ -1,14 +1,7 @@
|
||||
{
|
||||
"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"],
|
||||
"jsx": "preserve",
|
||||
|
||||
"noEmit": true
|
||||
"types": ["@total-typescript/ts-reset", "@repo/i18n/messages.d.ts"]
|
||||
}
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ describe("VERSION", () => {
|
||||
vi.stubEnv("NODE_ENV", "development")
|
||||
|
||||
// Act - When
|
||||
const { VERSION } = await import("../constants.js")
|
||||
const { VERSION } = await import("../constants.ts")
|
||||
|
||||
// Assert - Then
|
||||
const expected = "0.0.0-development"
|
||||
@ -27,7 +27,7 @@ describe("VERSION", () => {
|
||||
})
|
||||
|
||||
// Act - When
|
||||
const { VERSION } = await import("../constants.js")
|
||||
const { VERSION } = await import("../constants.ts")
|
||||
|
||||
// Assert - Then
|
||||
const expected = "1.0.0"
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { describe, expect, it } from "vitest"
|
||||
|
||||
import { getISODate } from "../dates.js"
|
||||
import { getISODate } from "../dates.ts"
|
||||
|
||||
describe("getISODate", () => {
|
||||
it("should return the correct date in ISO format (e.g: 2012-05-23)", () => {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { describe, expect, it } from "vitest"
|
||||
|
||||
import { capitalize, reduceConsecutiveCharacters, trimAny } from "../strings.js"
|
||||
import { capitalize, reduceConsecutiveCharacters, trimAny } from "../strings.ts"
|
||||
|
||||
describe("capitalize", () => {
|
||||
it("should capitalize the first letter of a string", () => {
|
||||
|
@ -1,13 +1,7 @@
|
||||
{
|
||||
"extends": "@repo/config-typescript/tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"target": "ESNext",
|
||||
"module": "NodeNext",
|
||||
"moduleResolution": "NodeNext",
|
||||
"resolveJsonModule": true,
|
||||
"lib": ["ESNext"],
|
||||
"types": ["@types/node", "@total-typescript/ts-reset"],
|
||||
|
||||
"noEmit": true
|
||||
"types": ["@types/node", "@total-typescript/ts-reset"]
|
||||
}
|
||||
}
|
||||
|
@ -4,11 +4,11 @@ import { Button } from "@repo/ui/Design/Button"
|
||||
import { Link } from "@repo/ui/Design/Link"
|
||||
import { Typography } from "@repo/ui/Design/Typography"
|
||||
import { useState } from "react"
|
||||
import { getWikipediaPageInternalLinks } from "./wikipedia-api"
|
||||
import { getWikipediaPageInternalLinks } from "./wikipedia-api.ts"
|
||||
import {
|
||||
fromLocaleToWikipediaLocale,
|
||||
getWikipediaLink,
|
||||
} from "./wikipedia-utils"
|
||||
} from "./wikipedia-utils.ts"
|
||||
|
||||
export const WikipediaClient: React.FC = () => {
|
||||
const [isLoading, setIsLoading] = useState(false)
|
||||
|
@ -1,6 +1,6 @@
|
||||
import type { Meta, StoryObj } from "@storybook/react"
|
||||
|
||||
import { WikipediaClient as WikipediaGameSolverComponent } from "./WikipediaClient"
|
||||
import { WikipediaClient as WikipediaGameSolverComponent } from "./WikipediaClient.tsx"
|
||||
|
||||
const meta = {
|
||||
title: "Feature/WikipediaGameSolver",
|
||||
|
@ -4,7 +4,7 @@ import {
|
||||
fromSanitizedPageTitleToPageTitle,
|
||||
getWikipediaLink,
|
||||
sanitizePageTitle,
|
||||
} from "../wikipedia-utils"
|
||||
} from "../wikipedia-utils.ts"
|
||||
|
||||
describe("fromLocaleToWikipediaLocale", () => {
|
||||
it("should return the correct Wikipedia locale", () => {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import ky from "ky"
|
||||
import { getWikipediaLink, type WikipediaLocale } from "./wikipedia-utils"
|
||||
import { getWikipediaLink, type WikipediaLocale } from "./wikipedia-utils.ts"
|
||||
|
||||
/**
|
||||
* @see https://www.mediawiki.org/wiki/Wikimedia_REST_API#Terms_and_conditions
|
||||
|
@ -1,14 +1,7 @@
|
||||
{
|
||||
"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"],
|
||||
"jsx": "preserve",
|
||||
|
||||
"noEmit": true
|
||||
"types": ["@total-typescript/ts-reset", "@repo/i18n/messages.d.ts"]
|
||||
}
|
||||
}
|
||||
|
1259
pnpm-lock.yaml
1259
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
@ -5,15 +5,15 @@ packages:
|
||||
catalog:
|
||||
# Utils
|
||||
"deepmerge": "4.3.1"
|
||||
"ky": "1.5.0"
|
||||
"ky": "1.6.0"
|
||||
|
||||
# React.js/Next.js
|
||||
"next": "14.2.5"
|
||||
"next-intl": "3.17.2"
|
||||
"next-intl": "3.17.3"
|
||||
"next-themes": "0.3.0"
|
||||
"react": "18.3.1"
|
||||
"react-dom": "18.3.1"
|
||||
"react-icons": "5.2.1"
|
||||
"react-icons": "5.3.0"
|
||||
"@types/react": "18.3.3"
|
||||
"@types/react-dom": "18.3.0"
|
||||
"sharp": "0.33.4"
|
||||
@ -21,7 +21,7 @@ catalog:
|
||||
# TypeScript
|
||||
"typescript": "5.5.4"
|
||||
"@total-typescript/ts-reset": "0.5.1"
|
||||
"@types/node": "22.2.0"
|
||||
"@types/node": "22.3.0"
|
||||
"tsx": "4.17.0"
|
||||
|
||||
# AdonisJS
|
||||
@ -56,23 +56,24 @@ catalog:
|
||||
"eslint-config-next": "14.2.5"
|
||||
"eslint-plugin-storybook": "0.8.0"
|
||||
"eslint-plugin-tailwindcss": "3.17.4"
|
||||
"eslint-plugin-import-x": "3.1.0"
|
||||
|
||||
# Storybook
|
||||
"@chromatic-com/storybook": "1.6.1"
|
||||
"@storybook/addon-a11y": "8.2.8"
|
||||
"@storybook/addon-essentials": "8.2.8"
|
||||
"@storybook/addon-interactions": "8.2.8"
|
||||
"@storybook/addon-links": "8.2.8"
|
||||
"@storybook/addon-storysource": "8.2.8"
|
||||
"@storybook/addon-themes": "8.2.8"
|
||||
"@storybook/blocks": "8.2.8"
|
||||
"@storybook/nextjs": "8.2.8"
|
||||
"@storybook/react": "8.2.8"
|
||||
"@storybook/test": "8.2.8"
|
||||
"@storybook/addon-a11y": "8.2.9"
|
||||
"@storybook/addon-essentials": "8.2.9"
|
||||
"@storybook/addon-interactions": "8.2.9"
|
||||
"@storybook/addon-links": "8.2.9"
|
||||
"@storybook/addon-storysource": "8.2.9"
|
||||
"@storybook/addon-themes": "8.2.9"
|
||||
"@storybook/blocks": "8.2.9"
|
||||
"@storybook/nextjs": "8.2.9"
|
||||
"@storybook/react": "8.2.9"
|
||||
"@storybook/test": "8.2.9"
|
||||
"@storybook/test-runner": "0.19.1"
|
||||
"chromatic": "11.7.0"
|
||||
"chromatic": "11.7.1"
|
||||
"http-server": "14.1.1"
|
||||
"storybook": "8.2.8"
|
||||
"storybook": "8.2.9"
|
||||
"storybook-dark-mode": "4.0.2"
|
||||
|
||||
# Testing
|
||||
@ -89,8 +90,8 @@ catalog:
|
||||
|
||||
# CSS
|
||||
"postcss": "8.4.41"
|
||||
"tailwindcss": "3.4.9"
|
||||
"tailwindcss": "3.4.10"
|
||||
"@fontsource/montserrat": "5.0.18"
|
||||
"clsx": "2.1.0"
|
||||
"cva": "1.0.0-beta.1"
|
||||
"tailwind-merge": "2.4.0"
|
||||
"tailwind-merge": "2.5.2"
|
||||
|
Reference in New Issue
Block a user