Skip to content

Commit 54ea777

Browse files
Apply suggestions from code review
Co-authored-by: Phil Cohen <[email protected]>
1 parent 611302f commit 54ea777

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

packages/cursorless-vscode/src/migrateSnippets.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,18 +140,15 @@ function parseVariables(
140140
name,
141141
wrapperPhrases: phrase ? [phrase] : undefined,
142142
wrapperScope: variable.wrapperScopeType,
143-
insertionFormatters: getFormatter(variable.formatter),
143+
insertionFormatters: formatter ? getFormatter(variable.formatter) : undefined,
144144
// SKIP: variable.description
145145
};
146146
},
147147
);
148148
}
149149

150150
// Convert Cursorless formatters to Talon community formatters
151-
function getFormatter(formatter?: string): string[] | undefined {
152-
if (!formatter) {
153-
return undefined;
154-
}
151+
function getFormatter(formatter: string): string[] {
155152
switch (formatter) {
156153
case "camelCase":
157154
return ["PRIVATE_CAMEL_CASE"];

0 commit comments

Comments
 (0)