diff --git a/src/lang/modifyAst.test.ts b/src/lang/modifyAst.test.ts index 916f0e8e5..86afbe645 100644 --- a/src/lang/modifyAst.test.ts +++ b/src/lang/modifyAst.test.ts @@ -503,7 +503,11 @@ ${!replace1 ? ` |> ${line}\n` : ''} |> angledLine([-65, ${ ` test.each([ ['line', 'line(end = [306.21, 198.85], tag = $a)', ['365.11', '33']], - ['lineTo', 'line(endAbsolute = [306.21, 198.85], tag = $a)', ['110.48', '119.73']], + [ + 'lineTo', + 'line(endAbsolute = [306.21, 198.85], tag = $a)', + ['110.48', '119.73'], + ], ['yLine', 'yLine(198.85, %, $a)', ['198.85', '90']], ['xLine', 'xLine(198.85, %, $a)', ['198.85', '0']], ['yLineTo', 'yLineTo(198.85, %, $a)', ['95.94', '90']], diff --git a/src/lang/modifyAst.ts b/src/lang/modifyAst.ts index 834dcb26b..62200ba1c 100644 --- a/src/lang/modifyAst.ts +++ b/src/lang/modifyAst.ts @@ -1018,10 +1018,7 @@ export function giveSketchFnCallTag( const { node: primaryCallExp } = kwCallNode const existingTag = findKwArg(ARG_TAG, primaryCallExp) const tagDeclarator = - existingTag || - (createTagDeclarator( - tag || findUniqueName(ast, 'seg', 2) - )) + existingTag || createTagDeclarator(tag || findUniqueName(ast, 'seg', 2)) const isTagExisting = !!existingTag kwCallNode.node.arguments.push(createLabeledArg(ARG_TAG, tagDeclarator)) return { tagDeclarator, isTagExisting } diff --git a/src/lang/std/sketch.test.ts b/src/lang/std/sketch.test.ts index 70f3b48e0..53906f7dd 100644 --- a/src/lang/std/sketch.test.ts +++ b/src/lang/std/sketch.test.ts @@ -240,7 +240,9 @@ describe('testing addTagForSketchOnFace', () => { if (err(sketchOnFaceRetVal)) return sketchOnFaceRetVal const { modifiedAst } = sketchOnFaceRetVal - const expectedCode = genCode('line(endAbsolute = [-1.59, -1.54], tag = $seg01)') + const expectedCode = genCode( + 'line(endAbsolute = [-1.59, -1.54], tag = $seg01)' + ) expect(recast(modifiedAst)).toBe(expectedCode) }) const chamferTestCases = [ diff --git a/src/lang/std/sketchcombos.ts b/src/lang/std/sketchcombos.ts index edb98303f..9c0e9575c 100644 --- a/src/lang/std/sketchcombos.ts +++ b/src/lang/std/sketchcombos.ts @@ -1612,7 +1612,7 @@ export function getTransformInfos( const node = nodeMeta.node if (node?.type === 'CallExpression') { - return getTransformInfo(node, constraintType) + return getTransformInfo(node, constraintType) } if (node?.type === 'CallExpressionKw') {