mirror of
https://github.com/lukevella/rallly.git
synced 2025-07-08 20:17:28 +02:00
♻️ Replace eslint and prettier with biome (#1697)
This commit is contained in:
parent
1577a0c5df
commit
a34da49486
158 changed files with 450 additions and 2718 deletions
|
@ -1,2 +0,0 @@
|
|||
/** @type {import("eslint").Linter.Config} */
|
||||
module.exports = require("@rallly/eslint-config/preset")(__dirname);
|
|
@ -4,7 +4,6 @@
|
|||
"private": true,
|
||||
"scripts": {
|
||||
"test:unit": "vitest run",
|
||||
"lint": "eslint ./src",
|
||||
"type-check": "tsc --noEmit"
|
||||
},
|
||||
"exports": {
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import path from "path";
|
||||
import path from "node:path";
|
||||
import { defineConfig } from "vitest/config";
|
||||
|
||||
export default defineConfig({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue