From 14099c3cef90d7b1e44cb7686593a7b80c2a9f88 Mon Sep 17 00:00:00 2001 From: Timeless0911 <1604889533@qq.com> Date: Wed, 18 Jun 2025 14:20:56 +0800 Subject: [PATCH] chore(deps): update Biome to v2 --- biome.json | 59 +++++++++------ examples/express-plugin/src/index.ts | 4 +- .../mf-react-component/.storybook/main.ts | 1 + .../mf-react-component/src/index.tsx | 2 +- .../.storybook/main.ts | 1 + package.json | 2 +- packages/core/src/cli/build.ts | 2 +- packages/core/src/cli/inspect.ts | 2 +- packages/core/src/cli/mf.ts | 2 +- packages/core/src/config.ts | 20 ++--- packages/core/src/css/cssConfig.ts | 1 + packages/core/src/css/libCssExtractLoader.ts | 1 + packages/core/src/index.ts | 10 +-- packages/core/src/plugins/EntryChunkPlugin.ts | 1 + packages/core/src/utils/helper.ts | 2 +- .../fixtures/config/cjs/rslib.config.cjs | 2 +- .../fixtures/config/esm/rslib.config.mjs | 2 +- packages/create-rslib/rslib.config.ts | 1 + packages/create-rslib/src/genTemplates.ts | 2 +- packages/create-rslib/src/helpers.ts | 12 ++- packages/create-rslib/src/index.ts | 4 +- packages/create-rslib/test/index.test.ts | 2 +- packages/plugin-dts/src/apiExtractor.ts | 2 +- packages/plugin-dts/src/dts.ts | 2 +- packages/plugin-dts/src/index.ts | 2 +- packages/plugin-dts/src/utils.ts | 4 +- pnpm-lock.yaml | 74 +++++++++---------- tests/e2e/react-component/index.pw.test.ts | 2 +- .../integration/banner-footer/rslib.config.ts | 2 +- .../bundle-false/basic/src/index.ts | 2 +- tests/integration/bundle-false/index.test.ts | 2 +- .../dts/__snapshots__/index.test.ts.snap | 4 +- .../bundle-false/__fixtures__/src/index.ts | 2 +- .../dts/bundle/__fixtures__/src/index.ts | 2 +- .../dts/composite/__fixtures__/src/index.ts | 2 +- tests/integration/dts/index.test.ts | 2 +- .../externals/browser/src/index.ts | 2 +- tests/integration/externals/node/src/index.ts | 2 +- .../format/cjs-static-export/src/index.js | 2 +- .../format/import-meta-url/src/index.js | 2 +- .../outBase/custom-entry/src/utils/index.ts | 2 +- .../outBase/nested-dir/src/utils/index.ts | 2 +- tests/integration/redirect/dts.test.ts | 36 ++++----- tests/integration/redirect/dts/src/index.ts | 7 +- tests/integration/require/index.test.ts | 3 +- .../require/require-as-expression/index.js | 2 +- tests/integration/shims/cjs/src/index.ts | 2 + .../transform-import/index.test.ts | 2 +- tests/integration/vue/src/Button/Button.vue | 1 + tests/integration/vue/src/Card.vue | 1 + tests/scripts/helper.ts | 4 +- tests/scripts/rsbuild.ts | 2 +- .../en/guide/migration/modernjs-module.mdx | 2 +- .../zh/guide/migration/modernjs-module.mdx | 2 +- website/rspress.config.ts | 2 +- 55 files changed, 175 insertions(+), 142 deletions(-) diff --git a/biome.json b/biome.json index 3a4c88b44..536244d18 100644 --- a/biome.json +++ b/biome.json @@ -1,21 +1,11 @@ { - "$schema": "https://biomejs.dev/schemas/1.9.4/schema.json", - "organizeImports": { - "enabled": true, - "include": [ - "./**/*.js", - "./**/*.jsx", - "./**/*.ts", - "./**/*.tsx", - "./**/*.mjs", - "./**/*.mjsx", - "./**/*.cjs", - "./**/*.cjsx", - "./**/*.mts", - "./**/*.mtsx", - "./**/*.cts", - "./**/*.ctsx" - ] + "$schema": "https://biomejs.dev/schemas/2.0.0/schema.json", + "assist": { + "actions": { + "source": { + "organizeImports": "on" + } + } }, "vcs": { "enabled": true, @@ -27,7 +17,12 @@ "ignoreUnknown": true }, "formatter": { - "ignore": ["**/.rslib/*", "./tests/e2e/react-component/public/umd/*"], + "includes": [ + "**", + "!**/*.vue", + "!**/.rslib/**/*", + "!tests/e2e/react-component/public/umd/**/*" + ], "indentStyle": "space" }, "javascript": { @@ -48,10 +43,12 @@ }, "linter": { "enabled": true, - "ignore": [ - "**/.rslib/*", - "./tests/integration/**/*/src/*", - "./tests/e2e/react-component/public/umd/*" + "includes": [ + "**", + "!**/*.vue", + "!**/.rslib/**/*", + "!tests/integration/**/*/src/**/*", + "!tests/e2e/react-component/public/umd/**/*" ], "rules": { "recommended": true, @@ -62,7 +59,17 @@ "options": { "filenameCases": ["camelCase", "PascalCase", "export"] } - } + }, + "noParameterAssign": "error", + "useAsConstAssertion": "error", + "useDefaultParameterLast": "error", + "useEnumInitializers": "error", + "useSelfClosingElements": "error", + "useSingleVarDeclarator": "error", + "noUnusedTemplateLiteral": "error", + "useNumberNamespace": "error", + "noInferrableTypes": "error", + "noUselessElse": "error" }, "suspicious": { "noExplicitAny": "off", @@ -70,6 +77,12 @@ }, "performance": { "noDelete": "off" + }, + "correctness": { + "useHookAtTopLevel": "off" + }, + "nursery": { + "useUniqueElementIds": "off" } } } diff --git a/examples/express-plugin/src/index.ts b/examples/express-plugin/src/index.ts index c50df4cec..e56a96ba4 100644 --- a/examples/express-plugin/src/index.ts +++ b/examples/express-plugin/src/index.ts @@ -1,12 +1,12 @@ import type { RequestHandler } from 'express'; import { logRequest } from './logger'; -import { type LoggerOptions, defaultOptions } from './types'; +import { defaultOptions, type LoggerOptions } from './types'; export function expressLogger( options: Partial = {}, ): RequestHandler { const mergedOptions = { ...defaultOptions, ...options }; - return (req, res, next) => { + return (req, _res, next) => { logRequest(req, mergedOptions); next(); }; diff --git a/examples/module-federation/mf-react-component/.storybook/main.ts b/examples/module-federation/mf-react-component/.storybook/main.ts index 9d44f3c6e..9707ebd47 100644 --- a/examples/module-federation/mf-react-component/.storybook/main.ts +++ b/examples/module-federation/mf-react-component/.storybook/main.ts @@ -1,6 +1,7 @@ import { createRequire } from 'node:module'; import { dirname, join } from 'node:path'; import type { StorybookConfig } from 'storybook-react-rsbuild'; + const require = createRequire(import.meta.url); /** diff --git a/examples/module-federation/mf-react-component/src/index.tsx b/examples/module-federation/mf-react-component/src/index.tsx index 0262fe4c8..5fcc19f32 100644 --- a/examples/module-federation/mf-react-component/src/index.tsx +++ b/examples/module-federation/mf-react-component/src/index.tsx @@ -1,5 +1,5 @@ import { init, loadRemote } from '@module-federation/enhanced/runtime'; -import { Suspense, createElement, lazy } from 'react'; +import { createElement, lazy, Suspense } from 'react'; import { CounterButton } from './CounterButton'; import { useCounter } from './useCounter'; diff --git a/examples/vue-component-bundleless/.storybook/main.ts b/examples/vue-component-bundleless/.storybook/main.ts index 1f2e1376e..8e019792a 100644 --- a/examples/vue-component-bundleless/.storybook/main.ts +++ b/examples/vue-component-bundleless/.storybook/main.ts @@ -1,6 +1,7 @@ import { createRequire } from 'node:module'; import { dirname, join } from 'node:path'; import type { StorybookConfig } from 'storybook-vue3-rsbuild'; + const require = createRequire(import.meta.url); /** diff --git a/package.json b/package.json index 623eab4ad..c9bb1e892 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "pnpm-lock.yaml": "pnpm dedupe --check" }, "devDependencies": { - "@biomejs/biome": "^1.9.4", + "@biomejs/biome": "^2.0.0", "@changesets/cli": "^2.29.4", "@types/fs-extra": "^11.0.4", "@types/node": "^22.15.31", diff --git a/packages/core/src/cli/build.ts b/packages/core/src/cli/build.ts index c8be5d158..3dc4a64ea 100644 --- a/packages/core/src/cli/build.ts +++ b/packages/core/src/cli/build.ts @@ -1,4 +1,4 @@ -import { type RsbuildInstance, createRsbuild } from '@rsbuild/core'; +import { createRsbuild, type RsbuildInstance } from '@rsbuild/core'; import { composeRsbuildEnvironments, pruneEnvironments } from '../config'; import type { RslibConfig } from '../types/config'; import type { BuildOptions } from './commands'; diff --git a/packages/core/src/cli/inspect.ts b/packages/core/src/cli/inspect.ts index 257285e6d..789c26925 100644 --- a/packages/core/src/cli/inspect.ts +++ b/packages/core/src/cli/inspect.ts @@ -1,4 +1,4 @@ -import { type RsbuildInstance, createRsbuild } from '@rsbuild/core'; +import { createRsbuild, type RsbuildInstance } from '@rsbuild/core'; import { composeRsbuildEnvironments, pruneEnvironments } from '../config'; import type { RslibConfig } from '../types/config'; import type { InspectOptions } from './commands'; diff --git a/packages/core/src/cli/mf.ts b/packages/core/src/cli/mf.ts index 832ea5e69..2caaae57e 100644 --- a/packages/core/src/cli/mf.ts +++ b/packages/core/src/cli/mf.ts @@ -1,5 +1,5 @@ -import { createRsbuild } from '@rsbuild/core'; import type { RsbuildInstance } from '@rsbuild/core'; +import { createRsbuild } from '@rsbuild/core'; import { composeRsbuildEnvironments, pruneEnvironments } from '../config'; import type { RslibConfig } from '../types'; import type { CommonOptions } from './commands'; diff --git a/packages/core/src/config.ts b/packages/core/src/config.ts index d41542ca2..d1b5fa2e1 100644 --- a/packages/core/src/config.ts +++ b/packages/core/src/config.ts @@ -1,17 +1,17 @@ import fs from 'node:fs'; import path, { dirname, extname, isAbsolute, join } from 'node:path'; import { + defineConfig as defineRsbuildConfig, type EnvironmentConfig, + loadConfig as loadRsbuildConfig, + mergeRsbuildConfig, type RsbuildConfig, type RsbuildEntry, type RsbuildPlugin, type RsbuildPlugins, type Rspack, - type ToolsConfig, - defineConfig as defineRsbuildConfig, - loadConfig as loadRsbuildConfig, - mergeRsbuildConfig, rspack, + type ToolsConfig, } from '@rsbuild/core'; import { glob } from 'tinyglobby'; import { composeAssetConfig } from './asset/assetConfig'; @@ -23,9 +23,9 @@ import { SWC_HELPERS, } from './constant'; import { - RSLIB_CSS_ENTRY_FLAG, composeCssConfig, cssExternalHandler, + RSLIB_CSS_ENTRY_FLAG, } from './css/cssConfig'; import { type CssLoaderOptionsAuto, isCssGlobalFile } from './css/utils'; import { composeEntryChunkConfig } from './plugins/EntryChunkPlugin'; @@ -254,7 +254,7 @@ const composeExternalsWarnConfig = ( } // object else if (typeof externals === 'object') { - if (Object.prototype.hasOwnProperty.call(externals, request)) { + if (Object.hasOwn(externals, request)) { if (handleMatchedExternal(externals[request]!, request)) { callback(true, true); } else { @@ -1277,7 +1277,7 @@ const composeBundlelessExternalConfig = ( // NOTE: If request is a phantom dependency, which means it can be resolved but not specified in dependencies or peerDependencies in package.json, the output will be incorrect to use when the package is published // return the original request instead of the resolved request return undefined; - } catch (e) { + } catch (_e) { // catch error when request can not be resolved by resolver // e.g. A react component library importing and using 'react' but while not defining // it in devDependencies and peerDependencies. Preserve 'react' as-is if so. @@ -1637,11 +1637,11 @@ export async function composeCreateRsbuildConfig( const constantRsbuildConfig = await createConstantRsbuildConfig(); const { lib: libConfigsArray, - mode, + mode: _mode, root, plugins: sharedPlugins, - dev, - server, + dev: _dev, + server: _server, ...sharedRsbuildConfig } = rslibConfig; diff --git a/packages/core/src/css/cssConfig.ts b/packages/core/src/css/cssConfig.ts index f6ad10382..fb0c8ffbc 100644 --- a/packages/core/src/css/cssConfig.ts +++ b/packages/core/src/css/cssConfig.ts @@ -6,6 +6,7 @@ import { isCssFile, isCssModulesFile, } from './utils'; + const require = createRequire(import.meta.url); export const RSLIB_CSS_ENTRY_FLAG = '__rslib_css__'; diff --git a/packages/core/src/css/libCssExtractLoader.ts b/packages/core/src/css/libCssExtractLoader.ts index 2f542a206..67b804fe2 100644 --- a/packages/core/src/css/libCssExtractLoader.ts +++ b/packages/core/src/css/libCssExtractLoader.ts @@ -15,6 +15,7 @@ import { } from './const'; import { type CssLoaderOptionsAuto, isCssModulesFile } from './utils'; + interface DependencyDescription { identifier: string; content: string; diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index 0d0a502fe..1d341554d 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -1,17 +1,17 @@ -export { prepareCli } from './cli/prepare'; -export { runCli } from './cli/commands'; export { build } from './cli/build'; +export { runCli } from './cli/commands'; export { inspect } from './cli/inspect'; export { startMFDevServer } from './cli/mf'; +export { prepareCli } from './cli/prepare'; export { + composeCreateRsbuildConfig as unstable_composeCreateRsbuildConfig, defineConfig, loadConfig, - composeCreateRsbuildConfig as unstable_composeCreateRsbuildConfig, } from './config'; -export { logger } from './utils/logger'; export type * from './types'; +export { logger } from './utils/logger'; export const version: string = RSLIB_VERSION; -export { rspack, type Rspack } from '@rsbuild/core'; export * as rsbuild from '@rsbuild/core'; +export { type Rspack, rspack } from '@rsbuild/core'; diff --git a/packages/core/src/plugins/EntryChunkPlugin.ts b/packages/core/src/plugins/EntryChunkPlugin.ts index 517274d9c..5b8c153f6 100644 --- a/packages/core/src/plugins/EntryChunkPlugin.ts +++ b/packages/core/src/plugins/EntryChunkPlugin.ts @@ -12,6 +12,7 @@ import { SHEBANG_PREFIX, SHEBANG_REGEX, } from '../constant'; + const require = createRequire(import.meta.url); const PLUGIN_NAME = 'rsbuild:lib-entry-chunk'; diff --git a/packages/core/src/utils/helper.ts b/packages/core/src/utils/helper.ts index 472f15d3c..92e88370a 100644 --- a/packages/core/src/utils/helper.ts +++ b/packages/core/src/utils/helper.ts @@ -125,7 +125,7 @@ export const readPackageJson = (rootPath: string): undefined | PkgJson => { try { return JSON.parse(fs.readFileSync(pkgJsonPath, 'utf8')); - } catch (err) { + } catch (_err) { logger.warn(`Failed to parse ${pkgJsonPath}, it might not be valid JSON`); return; } diff --git a/packages/core/tests/fixtures/config/cjs/rslib.config.cjs b/packages/core/tests/fixtures/config/cjs/rslib.config.cjs index c6670737d..73396182b 100644 --- a/packages/core/tests/fixtures/config/cjs/rslib.config.cjs +++ b/packages/core/tests/fixtures/config/cjs/rslib.config.cjs @@ -1,6 +1,6 @@ const { defineConfig } = require('../../../../../core/src/config'); -module.exports = defineConfig((args) => ({ +module.exports = defineConfig((_args) => ({ lib: [], source: { entry: { diff --git a/packages/core/tests/fixtures/config/esm/rslib.config.mjs b/packages/core/tests/fixtures/config/esm/rslib.config.mjs index 604ca0d76..cb516051d 100644 --- a/packages/core/tests/fixtures/config/esm/rslib.config.mjs +++ b/packages/core/tests/fixtures/config/esm/rslib.config.mjs @@ -1,6 +1,6 @@ import { defineConfig } from '../../../../../core/src/config'; -export default defineConfig((args) => ({ +export default defineConfig((_args) => ({ lib: [], source: { entry: { diff --git a/packages/create-rslib/rslib.config.ts b/packages/create-rslib/rslib.config.ts index 1b2400d7d..8d7ad36e7 100644 --- a/packages/create-rslib/rslib.config.ts +++ b/packages/create-rslib/rslib.config.ts @@ -1,5 +1,6 @@ import { pluginPublint } from 'rsbuild-plugin-publint'; import { defineConfig } from 'rslib'; + const { execSync } = require('node:child_process'); export default defineConfig({ diff --git a/packages/create-rslib/src/genTemplates.ts b/packages/create-rslib/src/genTemplates.ts index b26974a66..8e4be83a9 100644 --- a/packages/create-rslib/src/genTemplates.ts +++ b/packages/create-rslib/src/genTemplates.ts @@ -1,4 +1,4 @@ -import { TEMPLATES, genTemplate } from './helpers'; +import { genTemplate, TEMPLATES } from './helpers'; function main() { for (const template of TEMPLATES) { diff --git a/packages/create-rslib/src/helpers.ts b/packages/create-rslib/src/helpers.ts index 5004268d8..b3ffa3443 100644 --- a/packages/create-rslib/src/helpers.ts +++ b/packages/create-rslib/src/helpers.ts @@ -23,7 +23,11 @@ export const composeTemplateName = ({ template, tools, lang, -}: { template: string; tools?: Record; lang: Lang }) => { +}: { + template: string; + tools?: Record; + lang: Lang; +}) => { return `[${template}]-[${(tools ? Object.keys(tools) : []).sort()}]-${lang}`; }; @@ -31,7 +35,11 @@ export function genTemplate({ template, lang, tools, -}: { template: string; lang: Lang; tools?: Record }): void { +}: { + template: string; + lang: Lang; + tools?: Record; +}): void { const toolKeys = tools ? Object.keys(tools) : []; const target = path.resolve( __dirname, diff --git a/packages/create-rslib/src/index.ts b/packages/create-rslib/src/index.ts index 7ce759c69..491ff0568 100644 --- a/packages/create-rslib/src/index.ts +++ b/packages/create-rslib/src/index.ts @@ -4,13 +4,13 @@ import path from 'node:path'; import { fileURLToPath } from 'node:url'; import { type Argv, - type ESLintTemplateName, checkCancel, create, + type ESLintTemplateName, multiselect, select, } from 'create-rstack'; -import { type Lang, TEMPLATES, composeTemplateName } from './helpers'; +import { composeTemplateName, type Lang, TEMPLATES } from './helpers'; const __dirname = path.dirname(fileURLToPath(import.meta.url)); diff --git a/packages/create-rslib/test/index.test.ts b/packages/create-rslib/test/index.test.ts index d04702b2d..610d89fa5 100644 --- a/packages/create-rslib/test/index.test.ts +++ b/packages/create-rslib/test/index.test.ts @@ -1,7 +1,7 @@ import { existsSync } from 'node:fs'; import { join } from 'node:path'; import { describe, expect, test } from 'vitest'; -import { TEMPLATES, composeTemplateName } from '../src/helpers'; +import { composeTemplateName, TEMPLATES } from '../src/helpers'; import { createAndValidate } from './helper'; const CASES_NODE_DUAL = [ diff --git a/packages/plugin-dts/src/apiExtractor.ts b/packages/plugin-dts/src/apiExtractor.ts index 7d08b548c..743211dc2 100644 --- a/packages/plugin-dts/src/apiExtractor.ts +++ b/packages/plugin-dts/src/apiExtractor.ts @@ -20,7 +20,7 @@ export type BundleOptions = { }; export async function bundleDts(options: BundleOptions): Promise { - let apiExtractor: typeof ApiExtractor | undefined = undefined; + let apiExtractor: typeof ApiExtractor | undefined; try { apiExtractor = await import('@microsoft/api-extractor'); } catch { diff --git a/packages/plugin-dts/src/dts.ts b/packages/plugin-dts/src/dts.ts index edd4221a7..b95e8986c 100644 --- a/packages/plugin-dts/src/dts.ts +++ b/packages/plugin-dts/src/dts.ts @@ -40,7 +40,7 @@ export const calcBundledPackages = (options: { try { const content = fs.readFileSync(join(cwd, 'package.json'), 'utf-8'); pkgJson = JSON.parse(content); - } catch (err) { + } catch (_err) { logger.warn( 'The type of third-party packages will not be bundled due to read package.json failed', ); diff --git a/packages/plugin-dts/src/index.ts b/packages/plugin-dts/src/index.ts index 57a4402e1..602fcc918 100644 --- a/packages/plugin-dts/src/index.ts +++ b/packages/plugin-dts/src/index.ts @@ -1,7 +1,7 @@ import { type ChildProcess, fork } from 'node:child_process'; import { dirname, extname, join } from 'node:path'; import { fileURLToPath } from 'node:url'; -import { type RsbuildConfig, type RsbuildPlugin, logger } from '@rsbuild/core'; +import { logger, type RsbuildConfig, type RsbuildPlugin } from '@rsbuild/core'; import color from 'picocolors'; import ts from 'typescript'; import { diff --git a/packages/plugin-dts/src/utils.ts b/packages/plugin-dts/src/utils.ts index a9982be36..f3dbd0ec9 100644 --- a/packages/plugin-dts/src/utils.ts +++ b/packages/plugin-dts/src/utils.ts @@ -12,11 +12,11 @@ import path, { resolve, } from 'node:path'; import { type NapiConfig, parseAsync } from '@ast-grep/napi'; -import { type RsbuildConfig, logger } from '@rsbuild/core'; +import { logger, type RsbuildConfig } from '@rsbuild/core'; import MagicString from 'magic-string'; import color from 'picocolors'; import { convertPathToPattern, glob } from 'tinyglobby'; -import { type MatchPath, createMatchPath, loadConfig } from 'tsconfig-paths'; +import { createMatchPath, loadConfig, type MatchPath } from 'tsconfig-paths'; import ts from 'typescript'; import type { DtsEntry, DtsRedirect } from './index'; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 87686b5a9..94e8e8aa4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,8 +12,8 @@ importers: .: devDependencies: '@biomejs/biome': - specifier: ^1.9.4 - version: 1.9.4 + specifier: ^2.0.0 + version: 2.0.0 '@changesets/cli': specifier: ^2.29.4 version: 2.29.4 @@ -1522,55 +1522,55 @@ packages: resolution: {integrity: sha512-+EzkxvLNfiUeKMgy/3luqfsCWFRXLb7U6wNQTk60tovuckwB15B191tJWvpp4HjiQWdJkCxO3Wbvc6jlk3Xb2Q==} engines: {node: '>=6.9.0'} - '@biomejs/biome@1.9.4': - resolution: {integrity: sha512-1rkd7G70+o9KkTn5KLmDYXihGoTaIGO9PIIN2ZB7UJxFrWw04CZHPYiMRjYsaDvVV7hP1dYNRLxSANLaBFGpog==} + '@biomejs/biome@2.0.0': + resolution: {integrity: sha512-BlUoXEOI/UQTDEj/pVfnkMo8SrZw3oOWBDrXYFT43V7HTkIUDkBRY53IC5Jx1QkZbaB+0ai1wJIfYwp9+qaJTQ==} engines: {node: '>=14.21.3'} hasBin: true - '@biomejs/cli-darwin-arm64@1.9.4': - resolution: {integrity: sha512-bFBsPWrNvkdKrNCYeAp+xo2HecOGPAy9WyNyB/jKnnedgzl4W4Hb9ZMzYNbf8dMCGmUdSavlYHiR01QaYR58cw==} + '@biomejs/cli-darwin-arm64@2.0.0': + resolution: {integrity: sha512-QvqWYtFFhhxdf8jMAdJzXW+Frc7X8XsnHQLY+TBM1fnT1TfeV/v9vsFI5L2J7GH6qN1+QEEJ19jHibCY2Ypplw==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [darwin] - '@biomejs/cli-darwin-x64@1.9.4': - resolution: {integrity: sha512-ngYBh/+bEedqkSevPVhLP4QfVPCpb+4BBe2p7Xs32dBgs7rh9nY2AIYUL6BgLw1JVXV8GlpKmb/hNiuIxfPfZg==} + '@biomejs/cli-darwin-x64@2.0.0': + resolution: {integrity: sha512-5JFhls1EfmuIH4QGFPlNpxJQFC6ic3X1ltcoLN+eSRRIPr6H/lUS1ttuD0Fj7rPgPhZqopK/jfH8UVj/1hIsQw==} engines: {node: '>=14.21.3'} cpu: [x64] os: [darwin] - '@biomejs/cli-linux-arm64-musl@1.9.4': - resolution: {integrity: sha512-v665Ct9WCRjGa8+kTr0CzApU0+XXtRgwmzIf1SeKSGAv+2scAlW6JR5PMFo6FzqqZ64Po79cKODKf3/AAmECqA==} + '@biomejs/cli-linux-arm64-musl@2.0.0': + resolution: {integrity: sha512-Bxsz8ki8+b3PytMnS5SgrGV+mbAWwIxI3ydChb/d1rURlJTMdxTTq5LTebUnlsUWAX6OvJuFeiVq9Gjn1YbCyA==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [linux] - '@biomejs/cli-linux-arm64@1.9.4': - resolution: {integrity: sha512-fJIW0+LYujdjUgJJuwesP4EjIBl/N/TcOX3IvIHJQNsAqvV2CHIogsmA94BPG6jZATS4Hi+xv4SkBBQSt1N4/g==} + '@biomejs/cli-linux-arm64@2.0.0': + resolution: {integrity: sha512-BAH4QVi06TzAbVchXdJPsL0Z/P87jOfes15rI+p3EX9/EGTfIjaQ9lBVlHunxcmoptaA5y1Hdb9UYojIhmnjIw==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [linux] - '@biomejs/cli-linux-x64-musl@1.9.4': - resolution: {integrity: sha512-gEhi/jSBhZ2m6wjV530Yy8+fNqG8PAinM3oV7CyO+6c3CEh16Eizm21uHVsyVBEB6RIM8JHIl6AGYCv6Q6Q9Tg==} + '@biomejs/cli-linux-x64-musl@2.0.0': + resolution: {integrity: sha512-tiQ0ABxMJb9I6GlfNp0ulrTiQSFacJRJO8245FFwE3ty3bfsfxlU/miblzDIi+qNrgGsLq5wIZcVYGp4c+HXZA==} engines: {node: '>=14.21.3'} cpu: [x64] os: [linux] - '@biomejs/cli-linux-x64@1.9.4': - resolution: {integrity: sha512-lRCJv/Vi3Vlwmbd6K+oQ0KhLHMAysN8lXoCI7XeHlxaajk06u7G+UsFSO01NAs5iYuWKmVZjmiOzJ0OJmGsMwg==} + '@biomejs/cli-linux-x64@2.0.0': + resolution: {integrity: sha512-09PcOGYTtkopWRm6mZ/B6Mr6UHdkniUgIG/jLBv+2J8Z61ezRE+xQmpi3yNgUrFIAU4lPA9atg7mhvE/5Bo7Wg==} engines: {node: '>=14.21.3'} cpu: [x64] os: [linux] - '@biomejs/cli-win32-arm64@1.9.4': - resolution: {integrity: sha512-tlbhLk+WXZmgwoIKwHIHEBZUwxml7bRJgk0X2sPyNR3S93cdRq6XulAZRQJ17FYGGzWne0fgrXBKpl7l4M87Hg==} + '@biomejs/cli-win32-arm64@2.0.0': + resolution: {integrity: sha512-vrTtuGu91xNTEQ5ZcMJBZuDlqr32DWU1r14UfePIGndF//s2WUAmer4FmgoPgruo76rprk37e8S2A2c0psXdxw==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [win32] - '@biomejs/cli-win32-x64@1.9.4': - resolution: {integrity: sha512-8Y5wMhVIPaWe6jw2H+KlEm4wP/f7EW3810ZLmDlrEEy5KvBsb9ECEfu/kMWD484ijfQ8+nIi0giMgu9g1UAuuA==} + '@biomejs/cli-win32-x64@2.0.0': + resolution: {integrity: sha512-2USVQ0hklNsph/KIR72ZdeptyXNnQ3JdzPn3NbjI4Sna34CnxeiYAaZcZzXPDl5PYNFBivV4xmvT3Z3rTmyDBg==} engines: {node: '>=14.21.3'} cpu: [x64] os: [win32] @@ -8211,39 +8211,39 @@ snapshots: '@babel/helper-string-parser': 7.27.1 '@babel/helper-validator-identifier': 7.27.1 - '@biomejs/biome@1.9.4': + '@biomejs/biome@2.0.0': optionalDependencies: - '@biomejs/cli-darwin-arm64': 1.9.4 - '@biomejs/cli-darwin-x64': 1.9.4 - '@biomejs/cli-linux-arm64': 1.9.4 - '@biomejs/cli-linux-arm64-musl': 1.9.4 - '@biomejs/cli-linux-x64': 1.9.4 - '@biomejs/cli-linux-x64-musl': 1.9.4 - '@biomejs/cli-win32-arm64': 1.9.4 - '@biomejs/cli-win32-x64': 1.9.4 + '@biomejs/cli-darwin-arm64': 2.0.0 + '@biomejs/cli-darwin-x64': 2.0.0 + '@biomejs/cli-linux-arm64': 2.0.0 + '@biomejs/cli-linux-arm64-musl': 2.0.0 + '@biomejs/cli-linux-x64': 2.0.0 + '@biomejs/cli-linux-x64-musl': 2.0.0 + '@biomejs/cli-win32-arm64': 2.0.0 + '@biomejs/cli-win32-x64': 2.0.0 - '@biomejs/cli-darwin-arm64@1.9.4': + '@biomejs/cli-darwin-arm64@2.0.0': optional: true - '@biomejs/cli-darwin-x64@1.9.4': + '@biomejs/cli-darwin-x64@2.0.0': optional: true - '@biomejs/cli-linux-arm64-musl@1.9.4': + '@biomejs/cli-linux-arm64-musl@2.0.0': optional: true - '@biomejs/cli-linux-arm64@1.9.4': + '@biomejs/cli-linux-arm64@2.0.0': optional: true - '@biomejs/cli-linux-x64-musl@1.9.4': + '@biomejs/cli-linux-x64-musl@2.0.0': optional: true - '@biomejs/cli-linux-x64@1.9.4': + '@biomejs/cli-linux-x64@2.0.0': optional: true - '@biomejs/cli-win32-arm64@1.9.4': + '@biomejs/cli-win32-arm64@2.0.0': optional: true - '@biomejs/cli-win32-x64@1.9.4': + '@biomejs/cli-win32-x64@2.0.0': optional: true '@bufbuild/protobuf@2.1.0': {} diff --git a/tests/e2e/react-component/index.pw.test.ts b/tests/e2e/react-component/index.pw.test.ts index 7538a5899..b93dffecd 100644 --- a/tests/e2e/react-component/index.pw.test.ts +++ b/tests/e2e/react-component/index.pw.test.ts @@ -1,5 +1,5 @@ import assert from 'node:assert'; -import { type Page, expect, test } from '@playwright/test'; +import { expect, type Page, test } from '@playwright/test'; import { dev } from 'test-helper/rsbuild'; async function counterCompShouldWork(page: Page) { diff --git a/tests/integration/banner-footer/rslib.config.ts b/tests/integration/banner-footer/rslib.config.ts index daa4b5dc5..42899acde 100644 --- a/tests/integration/banner-footer/rslib.config.ts +++ b/tests/integration/banner-footer/rslib.config.ts @@ -1,4 +1,4 @@ -import { type LibConfig, defineConfig } from '@rslib/core'; +import { defineConfig, type LibConfig } from '@rslib/core'; import { generateBundleCjsConfig, generateBundleEsmConfig } from 'test-helper'; const bannerFooterConfig: LibConfig = { diff --git a/tests/integration/bundle-false/basic/src/index.ts b/tests/integration/bundle-false/basic/src/index.ts index 145be8667..f31f3e1f9 100644 --- a/tests/integration/bundle-false/basic/src/index.ts +++ b/tests/integration/bundle-false/basic/src/index.ts @@ -3,6 +3,6 @@ export { mainFiles1 }; export { added } from './dep'; export * from './mainFiles2'; +export * from './sum'; export * from './utils/numbers'; export * from './utils/strings'; -export * from './sum'; diff --git a/tests/integration/bundle-false/index.test.ts b/tests/integration/bundle-false/index.test.ts index d8070bc4e..eb302881a 100644 --- a/tests/integration/bundle-false/index.test.ts +++ b/tests/integration/bundle-false/index.test.ts @@ -52,9 +52,9 @@ test('basic', async () => { "import { mainFiles1 } from "./mainFiles1/index.js"; import { added } from "./dep.js"; export * from "./mainFiles2/index.js"; + export * from "./sum.js"; export * from "./utils/numbers.js"; export * from "./utils/strings.js"; - export * from "./sum.js"; export { added, mainFiles1 }; " `); diff --git a/tests/integration/dts/__snapshots__/index.test.ts.snap b/tests/integration/dts/__snapshots__/index.test.ts.snap index f932b63c3..24fe65583 100644 --- a/tests/integration/dts/__snapshots__/index.test.ts.snap +++ b/tests/integration/dts/__snapshots__/index.test.ts.snap @@ -2,9 +2,9 @@ exports[`dts when bundle: false > basic 3`] = ` { - "/tests/integration/dts/bundle-false/basic/dist/esm/index.d.ts": "export * from './utils/numbers'; + "/tests/integration/dts/bundle-false/basic/dist/esm/index.d.ts": "export * from './sum'; +export * from './utils/numbers'; export * from './utils/strings'; -export * from './sum'; ", "/tests/integration/dts/bundle-false/basic/dist/esm/sum.d.ts": "export declare const numSum: number; export declare const strSum: string; diff --git a/tests/integration/dts/bundle-false/__fixtures__/src/index.ts b/tests/integration/dts/bundle-false/__fixtures__/src/index.ts index 6eb6b6fb1..fb828f24f 100644 --- a/tests/integration/dts/bundle-false/__fixtures__/src/index.ts +++ b/tests/integration/dts/bundle-false/__fixtures__/src/index.ts @@ -1,3 +1,3 @@ +export * from './sum'; export * from './utils/numbers'; export * from './utils/strings'; -export * from './sum'; diff --git a/tests/integration/dts/bundle/__fixtures__/src/index.ts b/tests/integration/dts/bundle/__fixtures__/src/index.ts index 6eb6b6fb1..fb828f24f 100644 --- a/tests/integration/dts/bundle/__fixtures__/src/index.ts +++ b/tests/integration/dts/bundle/__fixtures__/src/index.ts @@ -1,3 +1,3 @@ +export * from './sum'; export * from './utils/numbers'; export * from './utils/strings'; -export * from './sum'; diff --git a/tests/integration/dts/composite/__fixtures__/src/index.ts b/tests/integration/dts/composite/__fixtures__/src/index.ts index 6eb6b6fb1..fb828f24f 100644 --- a/tests/integration/dts/composite/__fixtures__/src/index.ts +++ b/tests/integration/dts/composite/__fixtures__/src/index.ts @@ -1,3 +1,3 @@ +export * from './sum'; export * from './utils/numbers'; export * from './utils/strings'; -export * from './sum'; diff --git a/tests/integration/dts/index.test.ts b/tests/integration/dts/index.test.ts index 1cc6126f1..669b57152 100644 --- a/tests/integration/dts/index.test.ts +++ b/tests/integration/dts/index.test.ts @@ -660,9 +660,9 @@ describe('dts when composite: true', () => { expect(contents.esm).toMatchInlineSnapshot(` { "/tests/integration/dts/composite/process-files/dist/esm/index.d.mts": "/*! hello banner dts composite*/ + export * from './sum'; export * from './utils/numbers'; export * from './utils/strings'; - export * from './sum'; /*! hello banner dts composite*/ ", diff --git a/tests/integration/externals/browser/src/index.ts b/tests/integration/externals/browser/src/index.ts index 48dc2ae51..91862bf68 100644 --- a/tests/integration/externals/browser/src/index.ts +++ b/tests/integration/externals/browser/src/index.ts @@ -1,5 +1,5 @@ -import fs from 'fs'; // Should not be resolved when target is not "node" import assert from 'node:assert'; // Should not be resolved when target is not "node" +import fs from 'fs'; // Should not be resolved when target is not "node" export const foo = () => { assert(fs, 'fs exists'); diff --git a/tests/integration/externals/node/src/index.ts b/tests/integration/externals/node/src/index.ts index 0620a9a7d..abf0dacc9 100644 --- a/tests/integration/externals/node/src/index.ts +++ b/tests/integration/externals/node/src/index.ts @@ -1,5 +1,5 @@ -import fs from 'fs'; // handle bare node built-in modules import assert from 'node:assert'; // handle node built-in modules with node: protocol +import fs from 'fs'; // handle bare node built-in modules import React from 'react'; // works with the externals option in rslib.config.ts export const foo = async () => { diff --git a/tests/integration/format/cjs-static-export/src/index.js b/tests/integration/format/cjs-static-export/src/index.js index 3ad5f24f9..26f62168e 100644 --- a/tests/integration/format/cjs-static-export/src/index.js +++ b/tests/integration/format/cjs-static-export/src/index.js @@ -1 +1 @@ -export { foo, bar } from './value.js'; +export { bar, foo } from './value.js'; diff --git a/tests/integration/format/import-meta-url/src/index.js b/tests/integration/format/import-meta-url/src/index.js index 83c2eb677..523539bd6 100644 --- a/tests/integration/format/import-meta-url/src/index.js +++ b/tests/integration/format/import-meta-url/src/index.js @@ -1 +1 @@ -export { packageDirectory, foo } from './value.js'; +export { foo, packageDirectory } from './value.js'; diff --git a/tests/integration/outBase/custom-entry/src/utils/index.ts b/tests/integration/outBase/custom-entry/src/utils/index.ts index d2ef07f8a..1ef6548ff 100644 --- a/tests/integration/outBase/custom-entry/src/utils/index.ts +++ b/tests/integration/outBase/custom-entry/src/utils/index.ts @@ -1,2 +1,2 @@ -export { foo } from './foo'; export { bar } from './bar'; +export { foo } from './foo'; diff --git a/tests/integration/outBase/nested-dir/src/utils/index.ts b/tests/integration/outBase/nested-dir/src/utils/index.ts index d2ef07f8a..1ef6548ff 100644 --- a/tests/integration/outBase/nested-dir/src/utils/index.ts +++ b/tests/integration/outBase/nested-dir/src/utils/index.ts @@ -1,2 +1,2 @@ -export { foo } from './foo'; export { bar } from './bar'; +export { foo } from './foo'; diff --git a/tests/integration/redirect/dts.test.ts b/tests/integration/redirect/dts.test.ts index b1a30adc7..c4cf7f72f 100644 --- a/tests/integration/redirect/dts.test.ts +++ b/tests/integration/redirect/dts.test.ts @@ -26,13 +26,13 @@ test('redirect.dts.path: true with redirect.dts.extension: false - default', asy import { defaultOptions } from './types.js'; import sources = require('./logger'); export { sources, type Baz as self, logRequest, logger, type LoggerOptions, defaultOptions, }; + export * from './foo'; + export * from './logger'; export type { Foo } from './types'; + export * from '../../../compile/rslog'; export type { Bar } from './types'; export * from './foo'; - export * from './foo'; export * from './types'; - export * from '../../../compile/rslog'; - export * from './logger'; ", "/tests/integration/redirect/dts/dist/default/esm/logger.d.ts": "import type { Request } from 'express'; import type { LoggerOptions } from './types'; @@ -74,13 +74,13 @@ test('redirect.dts.path: false with redirect.dts.extension: false', async () => import { defaultOptions } from './types.js'; import sources = require('@src/logger'); export { sources, type Baz as self, logRequest, logger, type LoggerOptions, defaultOptions, }; + export * from '@src/foo'; + export * from '@src/logger'; export type { Foo } from '@src/types'; + export * from 'rslog'; export type { Bar } from 'types'; export * from './foo'; - export * from '@src/foo'; export * from './types'; - export * from 'rslog'; - export * from '@src/logger'; ", "/tests/integration/redirect/dts/dist/path-false/esm/logger.d.ts": "import type { Request } from 'express'; import type { LoggerOptions } from './types'; @@ -122,13 +122,13 @@ test('redirect.dts.path: true with redirect.dts.extension: true', async () => { import { defaultOptions } from './types.js'; import sources = require('./logger.js'); export { sources, type Baz as self, logRequest, logger, type LoggerOptions, defaultOptions, }; + export * from './foo/index.js'; + export * from './logger.js'; export type { Foo } from './types.js'; + export * from '../../../compile/rslog'; export type { Bar } from './types.js'; export * from './foo/index.js'; - export * from './foo/index.js'; export * from './types.js'; - export * from '../../../compile/rslog'; - export * from './logger.js'; ", "/tests/integration/redirect/dts/dist/extension-true/esm/logger.d.ts": "import type { Request } from 'express'; import type { LoggerOptions } from './types.js'; @@ -170,13 +170,13 @@ test('redirect.dts.path: false with dts.redirect.extension: true', async () => { import { defaultOptions } from './types.js'; import sources = require('@src/logger'); export { sources, type Baz as self, logRequest, logger, type LoggerOptions, defaultOptions, }; + export * from '@src/foo'; + export * from '@src/logger'; export type { Foo } from '@src/types'; + export * from 'rslog'; export type { Bar } from 'types'; export * from './foo/index.js'; - export * from '@src/foo'; export * from './types.js'; - export * from 'rslog'; - export * from '@src/logger'; ", "/tests/integration/redirect/dts/dist/path-false-extension-true/esm/logger.d.ts": "import type { Request } from 'express'; import type { LoggerOptions } from './types.js'; @@ -225,13 +225,13 @@ test('redirect.dts.extension: true with dts.autoExtension: true', async () => { import { defaultOptions } from './types.mjs'; import sources = require('./logger.mjs'); export { sources, type Baz as self, logRequest, logger, type LoggerOptions, defaultOptions, }; + export * from './foo/index.mjs'; + export * from './logger.mjs'; export type { Foo } from './types.mjs'; + export * from '../../compile/rslog'; export type { Bar } from './types.mjs'; export * from './foo/index.mjs'; - export * from './foo/index.mjs'; export * from './types.mjs'; - export * from '../../compile/rslog'; - export * from './logger.mjs'; ", "/tests/integration/redirect/dts/dist/auto-extension-true/index.d.ts": "import { logRequest } from './logger.js'; import { logger } from '../../compile/rslog'; @@ -240,13 +240,13 @@ test('redirect.dts.extension: true with dts.autoExtension: true', async () => { import { defaultOptions } from './types.js'; import sources = require('./logger.js'); export { sources, type Baz as self, logRequest, logger, type LoggerOptions, defaultOptions, }; + export * from './foo/index.js'; + export * from './logger.js'; export type { Foo } from './types.js'; + export * from '../../compile/rslog'; export type { Bar } from './types.js'; export * from './foo/index.js'; - export * from './foo/index.js'; export * from './types.js'; - export * from '../../compile/rslog'; - export * from './logger.js'; ", "/tests/integration/redirect/dts/dist/auto-extension-true/logger.d.mts": "import type { Request } from 'express'; import type { LoggerOptions } from './types.mjs'; diff --git a/tests/integration/redirect/dts/src/index.ts b/tests/integration/redirect/dts/src/index.ts index 6445f8562..093d5b036 100644 --- a/tests/integration/redirect/dts/src/index.ts +++ b/tests/integration/redirect/dts/src/index.ts @@ -3,6 +3,7 @@ import { logger } from 'rslog'; import type { Baz } from 'self-entry'; import type { LoggerOptions } from './types'; import { defaultOptions } from './types.js'; + import sources = require('@src/logger'); export { @@ -14,10 +15,10 @@ export { defaultOptions, }; +export * from '@src/foo'; +export * from '@src/logger'; export type { Foo } from '@src/types'; +export * from 'rslog'; export type { Bar } from 'types'; export * from './foo'; -export * from '@src/foo'; export * from './types'; -export * from 'rslog'; -export * from '@src/logger'; diff --git a/tests/integration/require/index.test.ts b/tests/integration/require/index.test.ts index 87505548a..2349548a0 100644 --- a/tests/integration/require/index.test.ts +++ b/tests/integration/require/index.test.ts @@ -1,3 +1,4 @@ +/** biome-ignore-all lint/suspicious/noTemplateCurlyInString: test statements */ import { join } from 'node:path'; import { buildAndGetResults } from 'test-helper'; import { expect, test } from 'vitest'; @@ -88,7 +89,7 @@ test('require as expression', async () => { const { entries } = await buildAndGetResults({ fixturePath }); const statements = [ - 'const lazyFn = (module, requireFn)=>{}', + 'const lazyFn = (_module, _requireFn)=>{}', "lazyFn('./other.js', require)", ]; diff --git a/tests/integration/require/require-as-expression/index.js b/tests/integration/require/require-as-expression/index.js index 888d1605a..c39baa21a 100644 --- a/tests/integration/require/require-as-expression/index.js +++ b/tests/integration/require/require-as-expression/index.js @@ -1,2 +1,2 @@ -const lazyFn = (module, requireFn) => {}; +const lazyFn = (_module, _requireFn) => {}; lazyFn('./other.js', require); diff --git a/tests/integration/shims/cjs/src/index.ts b/tests/integration/shims/cjs/src/index.ts index bb44b25a3..0211ff87e 100644 --- a/tests/integration/shims/cjs/src/index.ts +++ b/tests/integration/shims/cjs/src/index.ts @@ -1,10 +1,12 @@ import { createRequire } from 'node:module'; + const importMetaUrl = import.meta.url; const require = createRequire(import.meta.url); const requiredModule = require('./ok.cjs'); // https://github.com/web-infra-dev/rslib/issues/425 import { fileURLToPath } from 'url'; + const __filename = fileURLToPath(import.meta.url); console.log(__filename); diff --git a/tests/integration/transform-import/index.test.ts b/tests/integration/transform-import/index.test.ts index dac93d798..0a324cb19 100644 --- a/tests/integration/transform-import/index.test.ts +++ b/tests/integration/transform-import/index.test.ts @@ -1,5 +1,5 @@ import { join } from 'node:path'; -import { type FormatType, buildAndGetResults } from 'test-helper'; +import { buildAndGetResults, type FormatType } from 'test-helper'; import { expect, test } from 'vitest'; test('transformImport with arco-design', async () => { diff --git a/tests/integration/vue/src/Button/Button.vue b/tests/integration/vue/src/Button/Button.vue index f766ca0fc..dfc55bd85 100644 --- a/tests/integration/vue/src/Button/Button.vue +++ b/tests/integration/vue/src/Button/Button.vue @@ -1,6 +1,7 @@ diff --git a/tests/integration/vue/src/Card.vue b/tests/integration/vue/src/Card.vue index 440583947..9f9ae8e83 100644 --- a/tests/integration/vue/src/Card.vue +++ b/tests/integration/vue/src/Card.vue @@ -1,5 +1,6 @@ diff --git a/tests/scripts/helper.ts b/tests/scripts/helper.ts index 22e7e6d3c..dadd413f8 100644 --- a/tests/scripts/helper.ts +++ b/tests/scripts/helper.ts @@ -1,7 +1,7 @@ import { platform } from 'node:os'; import { join } from 'node:path'; import fse from 'fs-extra'; -import { type GlobOptions, convertPathToPattern, glob } from 'tinyglobby'; +import { convertPathToPattern, type GlobOptions, glob } from 'tinyglobby'; // tinyglobby only accepts posix path // https://github.com/SuperchupuDev/tinyglobby?tab=readme-ov-file#api @@ -105,7 +105,7 @@ export const awaitFileChanges = async (file: string, content: string) => { fse.readFileSync(file, 'utf-8') !== oldContent && fse.readFileSync(file, 'utf-8').includes(content) ); - } catch (e) { + } catch (_e) { return false; } }, diff --git a/tests/scripts/rsbuild.ts b/tests/scripts/rsbuild.ts index 4e8dcf305..fb706a1ec 100644 --- a/tests/scripts/rsbuild.ts +++ b/tests/scripts/rsbuild.ts @@ -39,7 +39,7 @@ function isPortAvailable(port: number) { resolve(false); }); }); - } catch (err) { + } catch (_err) { return false; } } diff --git a/website/docs/en/guide/migration/modernjs-module.mdx b/website/docs/en/guide/migration/modernjs-module.mdx index 185e960d0..801cd2236 100644 --- a/website/docs/en/guide/migration/modernjs-module.mdx +++ b/website/docs/en/guide/migration/modernjs-module.mdx @@ -52,7 +52,7 @@ Your `package.json` should look something like this: "test": "vitest run" }, "devDependencies": { - "@biomejs/biome": "^1.9.3", + "@biomejs/biome": "^2.0.0", "@rslib/core": "^0.1.3", "typescript": "^5.6.3", "vitest": "^2.1.8" diff --git a/website/docs/zh/guide/migration/modernjs-module.mdx b/website/docs/zh/guide/migration/modernjs-module.mdx index 41b872f6f..4e3e65e06 100644 --- a/website/docs/zh/guide/migration/modernjs-module.mdx +++ b/website/docs/zh/guide/migration/modernjs-module.mdx @@ -52,7 +52,7 @@ import { PackageManagerTabs } from '@theme'; "test": "vitest run" }, "devDependencies": { - "@biomejs/biome": "^1.9.3", + "@biomejs/biome": "^2.0.0", "@rslib/core": "^0.1.3", "typescript": "^5.6.3", "vitest": "^2.1.8" diff --git a/website/rspress.config.ts b/website/rspress.config.ts index e923ecabf..5435e4a68 100644 --- a/website/rspress.config.ts +++ b/website/rspress.config.ts @@ -9,9 +9,9 @@ import { } from '@shikijs/transformers'; import { pluginGoogleAnalytics } from 'rsbuild-plugin-google-analytics'; import { pluginOpenGraph } from 'rsbuild-plugin-open-graph'; +import { defineConfig } from 'rspress/config'; import { pluginFontOpenSans } from 'rspress-plugin-font-open-sans'; import pluginSitemap from 'rspress-plugin-sitemap'; -import { defineConfig } from 'rspress/config'; const siteUrl = 'https://rslib.rs'; const description = 'The Rsbuild-based library development tool';