mirror of
https://github.com/jakejarvis/sofa.git
synced 2026-08-29 06:15:39 -04:00
refactor: replace Biome with oxlint + oxfmt
Migrate the entire monorepo from Biome 2.4.7 to oxlint 1.56.0 (linter) and oxfmt 0.41.0 (formatter) for faster lint/format and broader rule coverage. - Add `.oxlintrc.json` with React, TypeScript, unicorn, import plugins and correctness/suspicious categories - Add `.oxfmtrc.json` with 2-space indent, import sorting, and Tailwind class sorting (all 30+ custom className attributes migrated) - Add `docs/.oxlintrc.json` and `docs/.oxfmtrc.json` with Next.js plugin - Update all 12 workspace package.json scripts: `oxlint`, `oxfmt`, `oxfmt --check` - Add `format:check` turbo task and CI step - Update VS Code settings/extensions to use `oxc.oxc-vscode` - Update CI path triggers from `biome.json` to new config files - Remove all `biome-ignore` comments and fix shadowed variables - Delete `biome.json` and `docs/biome.json` - Reformat entire codebase with oxfmt Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -9,14 +9,10 @@ function toDate(date: Date | string): Date {
|
||||
return typeof date === "string" ? new Date(date) : date;
|
||||
}
|
||||
|
||||
export function formatDate(
|
||||
date: Date | string,
|
||||
options?: Intl.DateTimeFormatOptions,
|
||||
): string {
|
||||
export function formatDate(date: Date | string, options?: Intl.DateTimeFormatOptions): string {
|
||||
// Date-only ISO strings (e.g. "1990-05-15") are parsed as UTC midnight.
|
||||
// Format in UTC so users west of UTC don't see the previous day.
|
||||
const useUTC =
|
||||
typeof date === "string" && isDateOnly(date) && !options?.timeZone;
|
||||
const useUTC = typeof date === "string" && isDateOnly(date) && !options?.timeZone;
|
||||
return new Intl.DateTimeFormat(i18n.locale, {
|
||||
year: "numeric",
|
||||
month: "long",
|
||||
@@ -53,10 +49,7 @@ export function formatRelativeTime(date: Date | string): string {
|
||||
return rtf.format(sign * Math.round(absDay / 365), "year");
|
||||
}
|
||||
|
||||
export function formatNumber(
|
||||
n: number,
|
||||
options?: Intl.NumberFormatOptions,
|
||||
): string {
|
||||
export function formatNumber(n: number, options?: Intl.NumberFormatOptions): string {
|
||||
return new Intl.NumberFormat(i18n.locale, options).format(n);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { i18n, type Messages } from "@lingui/core";
|
||||
|
||||
import { messages as enMessages } from "./po/en";
|
||||
|
||||
export const SUPPORTED_LOCALES = ["en", "fr", "de", "es", "it", "pt"] as const;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { i18n } from "@lingui/core";
|
||||
import { I18nProvider } from "@lingui/react";
|
||||
import type { ReactNode } from "react";
|
||||
|
||||
import { messages } from "./po/en";
|
||||
|
||||
i18n.load("en", messages);
|
||||
|
||||
Reference in New Issue
Block a user