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

@ -7,6 +7,15 @@ export const VERSION =
export const GIT_REPO_LINK = "https://github.com/theoludwig/theoludwig"
export const LOCALES = ["en-US", "fr-FR"] as const
export type Locale = (typeof LOCALES)[number]
export const LOCALE_DEFAULT = "en-US" satisfies Locale
export const LOCALE_PREFIX = "never"
export const THEMES = ["light", "dark"] as const
export type Theme = (typeof THEMES)[number]
export const THEME_DEFAULT = "light" as Theme
export const BIRTH_DATE_DAY = "31"
export const BIRTH_DATE_MONTH = "03"
export const BIRTH_DATE_YEAR = "2003"

View File

@ -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"

View File

@ -1,6 +1,6 @@
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"
import { getAge, getISODate } from "../dates.js"
import { getAge, getISODate } from "../dates.ts"
describe("getISODate", () => {
it("should return the correct date in ISO format (e.g: 2012-05-23)", () => {

View File

@ -1,6 +1,6 @@
import { describe, expect, it } from "vitest"
import { capitalize } from "../strings.js"
import { capitalize } from "../strings.ts"
describe("capitalize", () => {
it("should capitalize the first letter of a string", () => {

View File

@ -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"]
}
}