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,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,
|
||||
},
|
||||
},
|
||||
})
|
||||
@@ -10,7 +10,6 @@
|
||||
"./routing": "./src/routing.ts"
|
||||
},
|
||||
"scripts": {
|
||||
"lint:eslint": "eslint src --max-warnings 0",
|
||||
"lint:typescript": "tsc --noEmit"
|
||||
},
|
||||
"dependencies": {
|
||||
@@ -21,13 +20,10 @@
|
||||
"react-dom": "catalog:"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@repo/config-eslint": "workspace:*",
|
||||
"@repo/config-typescript": "workspace:*",
|
||||
"@total-typescript/ts-reset": "catalog:",
|
||||
"@types/react": "catalog:",
|
||||
"@types/react-dom": "catalog:",
|
||||
"@total-typescript/ts-reset": "catalog:",
|
||||
"eslint": "catalog:",
|
||||
"typescript-eslint": "catalog:",
|
||||
"typescript": "catalog:"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,18 +8,11 @@ import { deepMerge } from "@repo/utils/objects"
|
||||
|
||||
export default getRequestConfig(async ({ requestLocale }) => {
|
||||
const requested = await requestLocale
|
||||
const locale = hasLocale(routing.locales, requested)
|
||||
? requested
|
||||
: routing.defaultLocale
|
||||
const locale = hasLocale(routing.locales, requested) ? requested : routing.defaultLocale
|
||||
|
||||
const userMessages = (await import(`./translations/${locale}.json`)).default
|
||||
const defaultMessages = (
|
||||
await import(`./translations/${LOCALE_DEFAULT}.json`)
|
||||
).default
|
||||
const messages = deepMerge<AbstractIntlMessages>(
|
||||
defaultMessages,
|
||||
userMessages,
|
||||
)
|
||||
const defaultMessages = (await import(`./translations/${LOCALE_DEFAULT}.json`)).default
|
||||
const messages = deepMerge<AbstractIntlMessages>(defaultMessages, userMessages)
|
||||
|
||||
return {
|
||||
locale,
|
||||
|
||||
@@ -23,11 +23,5 @@ export const routing = defineRouting({
|
||||
localePrefix: LOCALE_PREFIX,
|
||||
})
|
||||
|
||||
export const {
|
||||
Link,
|
||||
redirect,
|
||||
usePathname,
|
||||
useRouter,
|
||||
getPathname,
|
||||
permanentRedirect,
|
||||
} = createNavigation(routing)
|
||||
export const { Link, redirect, usePathname, useRouter, getPathname, permanentRedirect } =
|
||||
createNavigation(routing)
|
||||
|
||||
@@ -164,13 +164,7 @@
|
||||
"name": "Backend",
|
||||
},
|
||||
{
|
||||
"keywords": [
|
||||
"GNU/Linux",
|
||||
"Arch Linux",
|
||||
"Visual Studio Code",
|
||||
"Git",
|
||||
"Docker",
|
||||
],
|
||||
"keywords": ["GNU/Linux", "Arch Linux", "Visual Studio Code", "Git", "Docker"],
|
||||
"name": "Logiciels et outils",
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user