Skip to content

Commit f895032

Browse files
[autofix.ci] apply automated fixes
1 parent 7fae16a commit f895032

File tree

3 files changed

+14
-22
lines changed

3 files changed

+14
-22
lines changed

src/plugins/react-navigation-versions.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,7 @@ export default function reactNavigationVersionsPlugin(
9292
): Plugin {
9393
return {
9494
name: 'react-navigation-versions',
95-
async contentLoaded({
96-
actions,
97-
}: {
98-
actions: PluginContentLoadedActions;
99-
}) {
95+
async contentLoaded({ actions }: { actions: PluginContentLoadedActions }) {
10096
const queries: Record<string, VersionQuery> = {
10197
'7.x': {
10298
tag: 'latest',

src/plugins/rehype-static-to-dynamic.ts

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,9 @@ function getMeta(data: Element['data'] | undefined): string | undefined {
124124
return typeof data.meta === 'string' ? data.meta : undefined;
125125
}
126126

127-
function getDataObject(data: Element['data'] | undefined): Record<string, unknown> {
127+
function getDataObject(
128+
data: Element['data'] | undefined
129+
): Record<string, unknown> {
128130
return isRecord(data) ? data : {};
129131
}
130132

@@ -271,7 +273,9 @@ async function convertStaticToDynamic(code: string): Promise<string> {
271273
if (hasCreateStaticNavigation) {
272274
path.node.specifiers = specifiers.filter((spec) => {
273275
if (!t.isImportSpecifier(spec)) return true;
274-
return getPropertyKeyName(spec.imported) !== 'createStaticNavigation';
276+
return (
277+
getPropertyKeyName(spec.imported) !== 'createStaticNavigation'
278+
);
275279
});
276280

277281
if (!hasNavigationContainer) {
@@ -406,14 +410,8 @@ async function convertStaticToDynamic(code: string): Promise<string> {
406410
const navigatorConstNames = new Map(); // Track usage of navigator constant names
407411

408412
navigatorInfos.forEach((navigatorInfo) => {
409-
const {
410-
componentName,
411-
type,
412-
config,
413-
comments,
414-
trailingComments,
415-
index,
416-
} = navigatorInfo;
413+
const { componentName, type, config, comments, trailingComments, index } =
414+
navigatorInfo;
417415

418416
const baseNavigatorConstName = deriveNavigatorConstName(type);
419417
const navigatorConstName = getUniqueNavigatorConstName(
@@ -428,10 +426,10 @@ async function convertStaticToDynamic(code: string): Promise<string> {
428426
const navigatorConstDeclaration: CommentedNode = t.variableDeclaration(
429427
'const',
430428
[
431-
t.variableDeclarator(
432-
t.identifier(navigatorConstName),
433-
t.callExpression(t.identifier(type), [])
434-
),
429+
t.variableDeclarator(
430+
t.identifier(navigatorConstName),
431+
t.callExpression(t.identifier(type), [])
432+
),
435433
]
436434
);
437435

src/plugins/remark-npm2yarn.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,7 @@ function createImportNode(): MdxNode {
120120
};
121121
}
122122

123-
export default function remarkNpm2Yarn(
124-
options: RemarkNpm2YarnOptions = {}
125-
) {
123+
export default function remarkNpm2Yarn(options: RemarkNpm2YarnOptions = {}) {
126124
const { sync = false, converters = defaultConverters } = options;
127125

128126
return async (root: MdxNode) => {

0 commit comments

Comments
 (0)