diff --git a/app/src/adapter/nextjs/nextjs.adapter.ts b/app/src/adapter/nextjs/nextjs.adapter.ts index 50a82a8..c6de63f 100644 --- a/app/src/adapter/nextjs/nextjs.adapter.ts +++ b/app/src/adapter/nextjs/nextjs.adapter.ts @@ -19,7 +19,9 @@ function getCleanRequest(req: Request, cleanRequest: NextjsBkndConfig["cleanRequ if (!cleanRequest) return req; const url = new URL(req.url); - cleanRequest?.searchParams?.forEach((k) => url.searchParams.delete(k)); + cleanRequest?.searchParams?.forEach((k) => { + url.searchParams.delete(k); + }); if (isNode()) { return new Request(url.toString(), { diff --git a/app/src/core/utils/strings.ts b/app/src/core/utils/strings.ts index c052331..6d0d4ed 100644 --- a/app/src/core/utils/strings.ts +++ b/app/src/core/utils/strings.ts @@ -120,17 +120,14 @@ export function patternMatch(target: string, pattern: RegExp | string): boolean } export function slugify(str: string): string { - return ( - String(str) - .normalize("NFKD") // split accented characters into their base characters and diacritical marks - // biome-ignore lint/suspicious/noMisleadingCharacterClass: - .replace(/[\u0300-\u036f]/g, "") // remove all the accents, which happen to be all in the \u03xx UNICODE block. - .trim() // trim leading or trailing whitespace - .toLowerCase() // convert to lowercase - .replace(/[^a-z0-9 -]/g, "") // remove non-alphanumeric characters - .replace(/\s+/g, "-") // replace spaces with hyphens - .replace(/-+/g, "-") // remove consecutive hyphens - ); + return String(str) + .normalize("NFKD") // split accented characters into their base characters and diacritical marks + .replace(/[\u0300-\u036f]/g, "") // remove all the accents, which happen to be all in the \u03xx UNICODE block. + .trim() // trim leading or trailing whitespace + .toLowerCase() // convert to lowercase + .replace(/[^a-z0-9 -]/g, "") // remove non-alphanumeric characters + .replace(/\s+/g, "-") // replace spaces with hyphens + .replace(/-+/g, "-"); // remove consecutive hyphens } export function truncate(str: string, length = 50, end = "..."): string { diff --git a/app/src/modules/db/DbModuleManager.ts b/app/src/modules/db/DbModuleManager.ts index 8af95e8..f705949 100644 --- a/app/src/modules/db/DbModuleManager.ts +++ b/app/src/modules/db/DbModuleManager.ts @@ -1,4 +1,4 @@ -import { mark, stripMark, $console, s, SecretSchema, setPath } from "bknd/utils"; +import { mark, stripMark, $console, s, setPath } from "bknd/utils"; import { BkndError } from "core/errors"; import * as $diff from "core/object/diff"; import type { Connection } from "data/connection"; diff --git a/biome.json b/biome.json index dfaa243..111aa31 100644 --- a/biome.json +++ b/biome.json @@ -1,6 +1,6 @@ { "$schema": "https://biomejs.dev/schemas/2.3.3/schema.json", - "assist": { "actions": { "source": { "organizeImports": "on" } } }, + "assist": { "actions": { "source": { "organizeImports": "off" } } }, "vcs": { "defaultBranch": "main" }, @@ -31,16 +31,15 @@ "files": { "includes": [ "**", - "!**/node_modules", - "!**/node_modules", - "!**/.cache", - "!**/.wrangler", - "!**/build", - "!**/dist", - "!**/data.sqld", - "!**/data.sqld", - "!**/public", - "!**/.history" + "!!**/node_modules", + "!!**/.cache", + "!!**/.wrangler", + "!!**/build", + "!!**/dist", + "!!**/data.sqld", + "!!**/data.sqld", + "!!**/public", + "!!**/.history" ] }, "linter": { @@ -53,7 +52,13 @@ "useExhaustiveDependencies": "off", "noUnreachable": "warn", "noChildrenProp": "off", - "noSwitchDeclarations": "warn" + "noSwitchDeclarations": "warn", + "noUnusedVariables": { + "options": { + "ignoreRestSiblings": true + }, + "level": "warn" + } }, "complexity": { "noUselessFragments": "warn", @@ -68,7 +73,11 @@ "noArrayIndexKey": "off", "noImplicitAnyLet": "warn", "noConfusingVoidType": "off", - "noConsole": { "level": "warn", "options": { "allow": ["error"] } } + "noConsole": { + "level": "warn", + "options": { "allow": ["error", "info"] } + }, + "noTsIgnore": "off" }, "security": { "noDangerouslySetInnerHtml": "off"