Skip to content

Commit cf2aca2

Browse files
[autofix.ci] apply automated fixes
1 parent 0051a5e commit cf2aca2

File tree

8 files changed

+9
-14
lines changed

8 files changed

+9
-14
lines changed

packages/mpack/src/metro/getMetroConfig.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@ export async function getMetroConfig({ rootPath }: GetMetroConfig, additionalCon
5959
},
6060
}),
6161
babelTransformerPath:
62-
additionalConfig?.transformer?.babelTransformerPath ||
63-
require.resolve('metro-react-native-babel-transformer'),
62+
additionalConfig?.transformer?.babelTransformerPath || require.resolve('metro-react-native-babel-transformer'),
6463
asyncRequireModulePath: require.resolve('metro-runtime/src/modules/asyncRequire'),
6564
unstable_collectDependenciesPath: resolveVendors('metro/src/ModuleGraph/worker/collectDependencies'),
6665
unstable_allowRequireContext: true,

packages/plugin-radon/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ export { radonCore } from './radonCorePlugin';
44

55
export { radonGraniteRouter } from './radonGraniteRouterPlugin';
66

7-
export { radonCustomMetroPlugin } from './radonCustomMetroPlugin';
7+
export { radonCustomMetroPlugin } from './radonCustomMetroPlugin';

packages/plugin-radon/src/radonCorePlugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export const radonCore = (): GranitePluginCore => {
44
return {
55
name: 'radon-metro-reporter',
66
config: {
7-
metro: {
7+
metro: {
88
reporter: {
99
update(event: any) {
1010
if (Object.prototype.toString.call(event.error) === '[object Error]') {

packages/plugin-radon/src/radonCustomMetroPlugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ function detectRadonIdeExtensionPath(): string | undefined {
1212

1313
// Check VSCode extensions
1414
const vscodeExtPath = path.join(homeDir, '.vscode', 'extensions');
15-
15+
1616
// Check Cursor extensions (multiple possible locations)
1717
const cursorExtPaths = [
1818
path.join(homeDir, '.cursor', 'extensions'),

packages/plugin-radon/src/radonGraniteRouterPlugin.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ const DEFAULT_OPTIONS: Required<RadonGraniteRouterPluginOptions> = {
1010
export const radonGraniteRouter = (options: RadonGraniteRouterPluginOptions = DEFAULT_OPTIONS): GranitePluginCore => {
1111
const mergedOptions = { ...DEFAULT_OPTIONS, ...options };
1212

13-
1413
return {
1514
name: 'radon-metro-reporter',
1615
config: {

packages/plugin-radon/src/radonPlugin.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { radonCustomMetroPlugin } from './radonCustomMetroPlugin.js';
44
import { radonGraniteRouter } from './radonGraniteRouterPlugin.js';
55

66
export const radon = (): GranitePlugin[] => {
7-
87
const plugins: GranitePlugin[] = [];
98

109
plugins.push(radonCustomMetroPlugin());

packages/plugin-radon/src/utils/loadRadonMetroConfig.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,9 @@ export const loadRadonMetroConfig = (): AdditionalMetroConfig => {
3434
const localRequire = ((specifier: string) => {
3535
if (specifier.startsWith('.')) {
3636
const basePath = path.resolve(path.dirname(resolvedFilePath), specifier);
37-
const withExtension =
38-
fs.existsSync(basePath)
39-
? basePath
40-
: ['.js', '.cjs', '.json'].map((ext) => `${basePath}${ext}`).find((candidate) => fs.existsSync(candidate));
37+
const withExtension = fs.existsSync(basePath)
38+
? basePath
39+
: ['.js', '.cjs', '.json'].map((ext) => `${basePath}${ext}`).find((candidate) => fs.existsSync(candidate));
4140

4241
if (!withExtension) {
4342
return nodeRequire(specifier);
@@ -71,8 +70,7 @@ export const loadRadonMetroConfig = (): AdditionalMetroConfig => {
7170
// with its wrapper transformer.
7271
const appRoot = process.cwd();
7372
const originalBabelTransformerPath =
74-
process.env.RADON_IDE_ORIG_BABEL_TRANSFORMER_PATH ??
75-
requireResolve('metro-react-native-babel-transformer');
73+
process.env.RADON_IDE_ORIG_BABEL_TRANSFORMER_PATH ?? requireResolve('metro-react-native-babel-transformer');
7674

7775
const baseConfig: AdditionalMetroConfig = {
7876
projectRoot: appRoot,

packages/plugin-radon/tsdown.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default defineConfig([
1010
{
1111
entry: 'src/routerBabel.js',
1212
outDir: 'dist',
13-
format: ['esm','cjs'],
13+
format: ['esm', 'cjs'],
1414
dts: false,
1515
minify: true,
1616
},

0 commit comments

Comments
 (0)