♻️ Replace eslint and prettier with biome (#1697)

This commit is contained in:
Luke Vella 2025-04-28 19:47:47 +01:00 committed by GitHub
parent 1577a0c5df
commit a34da49486
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
158 changed files with 450 additions and 2718 deletions

View file

@ -1,2 +0,0 @@
/** @type {import("eslint").Linter.Config} */
module.exports = require("@rallly/eslint-config/preset")(__dirname);

View file

@ -4,7 +4,6 @@
"private": true,
"scripts": {
"test:unit": "vitest run",
"lint": "eslint ./src",
"type-check": "tsc --noEmit"
},
"exports": {

View file

@ -7,6 +7,7 @@ describe("absoluteUrl", () => {
});
afterAll(() => {
// biome-ignore lint/performance/noDelete: Setting to undefined doesn't work
delete process.env.NEXT_PUBLIC_BASE_URL;
});
@ -37,10 +38,6 @@ describe("absoluteUrl", () => {
process.env.NEXT_PUBLIC_VERCEL_URL = "example.vercel.com";
});
afterAll(() => {
delete process.env.NEXT_PUBLIC_VERCEL_URL;
});
it("should return the correct absolute URL with a subpath and query params", () => {
expect(absoluteUrl("/test", { test: "test" })).toBe(
"https://example.vercel.com/test?test=test",

View file

@ -23,6 +23,7 @@ export function absoluteUrl(subpath = "", query: Record<string, string> = {}) {
const url = new URL(subpath, baseUrl);
// biome-ignore lint/complexity/noForEach: Fix this later
Object.entries(query).forEach(([key, value]) => {
url.searchParams.set(key, value);
});

View file

@ -1,4 +1,4 @@
import path from "path";
import path from "node:path";
import { defineConfig } from "vitest/config";
export default defineConfig({