chore(root): migrate to biome

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-09-16 12:20:40 +02:00
parent 1f6e198336
commit 32e91959f6
383 changed files with 1943 additions and 3085 deletions

View File

@@ -3,8 +3,6 @@
"version": "0.0.1",
"main": "index.ts",
"scripts": {
"lint": "eslint .",
"format": "prettier --check \"**/*.{mjs,ts,md,json}\"",
"typecheck": "tsc --noEmit"
},
"dependencies": {
@@ -14,19 +12,8 @@
},
"devDependencies": {
"@openpanel/sdk": "workspace:*",
"@openpanel/eslint-config": "workspace:*",
"@openpanel/prettier-config": "workspace:*",
"@openpanel/tsconfig": "workspace:*",
"@types/node": "^18.16.0",
"eslint": "^8.48.0",
"prettier": "^3.0.3",
"typescript": "^5.2.2"
},
"eslintConfig": {
"root": true,
"extends": [
"@openpanel/eslint-config/base"
]
},
"prettier": "@openpanel/prettier-config"
}
}
}

View File

@@ -3,12 +3,12 @@ import type { Queue } from 'bullmq';
export async function findJobByPrefix<T>(
queue: Queue<T, any, string>,
keys: string[],
matcher: string
matcher: string,
) {
const getTime = (val?: string) => {
if (!val) return null;
const match = val.match(/:(\d+)$/);
return match?.[1] ? parseInt(match[1], 10) : null;
return match?.[1] ? Number.parseInt(match[1], 10) : null;
};
const filtered = keys
.filter((key) => key.includes(matcher))