mirror of https://github.com/buster-so/buster.git
updgrade vitest to use biome 2
This commit is contained in:
parent
08e9a096af
commit
ae27b13b81
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"$schema": "https://biomejs.dev/schemas/2.2.5/schema.json",
|
||||
"extends": ["../../biome2.json"],
|
||||
"files": {
|
||||
"includes": ["src/**/*", "scripts/**/*", "configs/**/*"]
|
||||
},
|
||||
"linter": {
|
||||
"rules": {
|
||||
"suspicious": {
|
||||
"noConsole": "off"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
import { loadEnv } from 'vite';
|
||||
import { defineConfig } from 'vitest/config';
|
||||
import type { Plugin, ViteUserConfig } from 'vitest/config';
|
||||
import { defineConfig } from 'vitest/config';
|
||||
|
||||
export const baseConfig = defineConfig(async () => {
|
||||
const { default: tsconfigPaths } = await import('vite-tsconfig-paths');
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { loadEnv } from 'vite';
|
||||
import { defineConfig } from 'vitest/config';
|
||||
import type { Plugin, ViteUserConfig } from 'vitest/config';
|
||||
import { defineConfig } from 'vitest/config';
|
||||
|
||||
export const uiConfig = defineConfig(async () => {
|
||||
const { default: tsconfigPaths } = await import('vite-tsconfig-paths');
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
},
|
||||
"scripts": {
|
||||
"build": "tsc --build",
|
||||
"lint": "biome check --write",
|
||||
"collect-json-reports": "node dist/scripts/collect-json-outputs.js",
|
||||
"merge-json-reports": "nyc merge coverage/raw coverage/merged/merged-coverage.json",
|
||||
"report": "nyc report -t coverage/merged --report-dir coverage/report --reporter=html --exclude-after-remap false",
|
||||
|
@ -35,6 +36,7 @@
|
|||
"@buster/typescript-config": "workspace:*",
|
||||
"@vitest/coverage-v8": "^3.2.4",
|
||||
"@vitest/ui": "^3.2.4",
|
||||
"@biomejs/biome": "2.2.5",
|
||||
"glob": "^11.0.3",
|
||||
"jsdom": "^26.1.0",
|
||||
"nyc": "^17.1.0",
|
||||
|
|
|
@ -44,7 +44,6 @@ async function collectCoverageFiles() {
|
|||
await fs.copyFile(coverageFilePath, destinationFile);
|
||||
} catch (_err) {
|
||||
// File doesn't exist in this directory, skip
|
||||
// biome-ignore lint/suspicious/noConsoleLog: <explanation>
|
||||
console.log(`No coverage.json found in ${match}`);
|
||||
}
|
||||
}
|
||||
|
@ -55,13 +54,11 @@ async function collectCoverageFiles() {
|
|||
const replaceDotPatterns = (str: string) => str.replace(/\.\.\//g, '');
|
||||
|
||||
if (directoriesWithCoverage.length > 0) {
|
||||
// biome-ignore lint/suspicious/noConsoleLog: This is a log
|
||||
console.log(
|
||||
`Found coverage.json in: ${directoriesWithCoverage.map(replaceDotPatterns).join(', ')}`
|
||||
);
|
||||
}
|
||||
|
||||
// biome-ignore lint/suspicious/noConsoleLog: This is a log
|
||||
console.log(`Coverage collected into: ${path.join(process.cwd())}`);
|
||||
} catch (error) {
|
||||
console.error('Error collecting coverage files:', error);
|
||||
|
|
|
@ -1406,6 +1406,9 @@ importers:
|
|||
|
||||
packages/vitest-config:
|
||||
dependencies:
|
||||
'@biomejs/biome':
|
||||
specifier: 2.2.5
|
||||
version: 2.2.5
|
||||
'@buster/typescript-config':
|
||||
specifier: workspace:*
|
||||
version: link:../typescript-config
|
||||
|
|
Loading…
Reference in New Issue