upgrade Nodemailer to v10

fix dead code with knip

upgrade TS to v6 and fix linting errors

auto apply oxfmt rules

fix linting errors - unused deps etc

ignore file

remove all ignored files in knip

add knip - dead code analysis tool

swap prettier and eslint of oxfmt and oxlint

fix: fix map rendering in react strict mode

fix: headlessUI float replace

fix: disable Matomo if not URL and SITE ID exist

upgrade: 1st pass upgrade to Next.js v16

deps: upgrade react to v19
This commit is contained in:
2026-10-05 16:15:25 +02:00
committed by owenrees
parent df3a73df88
commit feadb465eb
122 changed files with 39491 additions and 32785 deletions
+3 -11
View File
@@ -3,11 +3,7 @@ import { clamp, last } from "lodash";
// Fide uses the following table to establish the chance of winning based on the difference in elo.
// https://handbook.fide.com/chapter/B022017
const differenceToProbability: [
start: number,
end: number,
winChance: number,
][] = [
const differenceToProbability: [start: number, end: number, winChance: number][] = [
[0, 3, 0.5],
[4, 10, 0.51],
[11, 17, 0.52],
@@ -69,15 +65,11 @@ export const getNewRating = (
) => {
const differenceInElo = clamp(opponentRating - rating, -400, Infinity);
const tableRow = (differenceToProbability.find(
([start, end]) =>
Math.abs(differenceInElo) >= start && Math.abs(differenceInElo) <= end,
([start, end]) => Math.abs(differenceInElo) >= start && Math.abs(differenceInElo) <= end,
) ?? last(differenceToProbability)!)[2];
const probabilityOfWinning = differenceInElo < 0 ? tableRow : 1 - tableRow;
const delta =
Math.round(
kFactor * (result - probabilityOfWinning + Number.EPSILON) * 100,
) / 100;
const delta = Math.round(kFactor * (result - probabilityOfWinning + Number.EPSILON) * 100) / 100;
return {
delta,