Skip to content

Commit fb26501

Browse files
committed
chore: upgrade @biomejs/biome to 2.x
- migrate biome.jsonc to the v2 schema; replace the removed useImportExtensions 'suggestedExtensions' option with 'forceJsExtensions', and carry the organizeImports ignore list over as assist.includes - exclude the ESM redirect stubs in packages/repack/client and packages/repack/mf from biome, since v2 infers module type from package.json and refuses to parse them as modules - disable noSvgWithoutTitle for static .svg assets and noUnknownAtRules for tailwind at-rules in CSS - apply safe fixes: new import sort order, @ts-ignore -> @ts-expect-error conversions - give forEach callbacks block bodies and make map returns explicit to satisfy useIterableCallbackReturn; convert a side-effect-only map to forEach in the rspack Compiler - drop biome-ignore suppressions that v2 reports as unused - remove the write-only timer field in WebSocketServer and the unused config constructor property on JsonConsoleReporter; keep runtime-exposed ModuleFederationPlugin fields with suppressions - replace non-null-asserted optional chains in babelSwcLoader
1 parent 376c996 commit fb26501

72 files changed

Lines changed: 263 additions & 194 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎apps/tester-app/__tests__/bundle.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ describe('bundle command', () => {
144144
webpackConfig: path.join(__dirname, 'configs', configFile),
145145
};
146146

147-
// @ts-ignore
147+
// @ts-expect-error
148148
await bundleCommand.func([''], config, args);
149149

150150
const files = await globby(['**/*'], { cwd: TMP_DIR, dot: true });

‎apps/tester-app/__tests__/start.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ describe('start command', () => {
110110
webpackConfig: path.join(__dirname, 'configs', configFile),
111111
};
112112

113-
// @ts-ignore
113+
// @ts-expect-error
114114
const { stop } = await startCommand.func([], config, args);
115115
stopServer = stop;
116116
});

‎apps/tester-app/src/nativewind/ui/Button.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { type VariantProps, cva } from 'class-variance-authority';
1+
import { cva, type VariantProps } from 'class-variance-authority';
22
import * as React from 'react';
33
import { Pressable } from 'react-native';
44
import { TextClassContext } from './Text';
@@ -88,5 +88,5 @@ const Button = React.forwardRef<
8888
});
8989
Button.displayName = 'Button';
9090

91-
export { Button, buttonTextVariants, buttonVariants };
9291
export type { ButtonProps };
92+
export { Button, buttonTextVariants, buttonVariants };

‎apps/tester-app/src/ui/Section.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { StyleSheet, View } from 'react-native';
2-
import { Text } from './Text';
32
import { Colors } from './colors';
3+
import { Text } from './Text';
44
import type { WithChildren } from './types';
55

66
type SectionProps = WithChildren<{

‎apps/tester-federation-v2/configs/rspack.host-app.mts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as Repack from '@callstack/repack';
22
import rspack from '@rspack/core';
3-
import reactNativePkg from 'react-native/package.json' with { type: 'json' };
43
import reactPkg from 'react/package.json' with { type: 'json' };
4+
import reactNativePkg from 'react-native/package.json' with { type: 'json' };
55
import pkg from '../package.json' with { type: 'json' };
66

77
export default Repack.defineRspackConfig((env) => {

‎apps/tester-federation-v2/configs/rspack.mini-app.mts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as Repack from '@callstack/repack';
22
import rspack from '@rspack/core';
3-
import reactNativePkg from 'react-native/package.json' with { type: 'json' };
43
import reactPkg from 'react/package.json' with { type: 'json' };
4+
import reactNativePkg from 'react-native/package.json' with { type: 'json' };
55
import pkg from '../package.json' with { type: 'json' };
66

77
export default Repack.defineRspackConfig((env) => {

‎apps/tester-federation-v2/configs/webpack.host-app.mts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// @ts-check
22
import * as Repack from '@callstack/repack';
3-
import reactNativePkg from 'react-native/package.json' with { type: 'json' };
43
import reactPkg from 'react/package.json' with { type: 'json' };
4+
import reactNativePkg from 'react-native/package.json' with { type: 'json' };
55
import webpack from 'webpack';
66
import pkg from '../package.json' with { type: 'json' };
77

@@ -30,7 +30,7 @@ export default Repack.defineWebpackConfig((env) => {
3030
],
3131
},
3232
plugins: [
33-
// @ts-ignore
33+
// @ts-expect-error
3434
new Repack.RepackPlugin({
3535
extraChunks: [
3636
{
@@ -40,7 +40,7 @@ export default Repack.defineWebpackConfig((env) => {
4040
},
4141
],
4242
}),
43-
// @ts-ignore
43+
// @ts-expect-error
4444
new Repack.plugins.ModuleFederationPluginV2({
4545
name: 'HostApp',
4646
filename: 'HostApp.container.js.bundle',

‎apps/tester-federation-v2/configs/webpack.mini-app.mts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as Repack from '@callstack/repack';
2-
import reactNativePkg from 'react-native/package.json' with { type: 'json' };
32
import reactPkg from 'react/package.json' with { type: 'json' };
3+
import reactNativePkg from 'react-native/package.json' with { type: 'json' };
44
import webpack from 'webpack';
55
import pkg from '../package.json' with { type: 'json' };
66

@@ -29,7 +29,7 @@ export default Repack.defineWebpackConfig((env) => {
2929
],
3030
},
3131
plugins: [
32-
// @ts-ignore
32+
// @ts-expect-error
3333
new Repack.RepackPlugin({
3434
extraChunks: [
3535
{
@@ -39,7 +39,7 @@ export default Repack.defineWebpackConfig((env) => {
3939
},
4040
],
4141
}),
42-
// @ts-ignore
42+
// @ts-expect-error
4343
new Repack.plugins.ModuleFederationPluginV2({
4444
name: 'MiniApp',
4545
filename: 'MiniApp.container.js.bundle',

‎apps/tester-federation-v2/src/host/navigation/MainNavigator.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {
2-
type NativeStackNavigationProp,
32
createNativeStackNavigator,
3+
type NativeStackNavigationProp,
44
} from '@react-navigation/native-stack';
55
import { StyleSheet } from 'react-native';
66

‎apps/tester-federation-v2/src/mini/navigation/MainNavigator.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {
2-
type NativeStackNavigationProp,
32
createNativeStackNavigator,
3+
type NativeStackNavigationProp,
44
} from '@react-navigation/native-stack';
55
import { StyleSheet } from 'react-native';
66

0 commit comments

Comments
 (0)