Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Phil Cohen <phillip@phillip.io>
  • Loading branch information
AndreasArvidsson and phillco authored Feb 4, 2025
1 parent 611302f commit 54ea777
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions packages/cursorless-vscode/src/migrateSnippets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,18 +140,15 @@ function parseVariables(
name,
wrapperPhrases: phrase ? [phrase] : undefined,
wrapperScope: variable.wrapperScopeType,
insertionFormatters: getFormatter(variable.formatter),
insertionFormatters: formatter ? getFormatter(variable.formatter) : undefined,

Check failure on line 143 in packages/cursorless-vscode/src/migrateSnippets.ts

View workflow job for this annotation

GitHub Actions / test-docs-build

Cannot find name 'formatter'. Did you mean 'getFormatter'?

Check failure on line 143 in packages/cursorless-vscode/src/migrateSnippets.ts

View workflow job for this annotation

GitHub Actions / test-docs-build

Argument of type 'string | undefined' is not assignable to parameter of type 'string'.

Check failure on line 143 in packages/cursorless-vscode/src/migrateSnippets.ts

View workflow job for this annotation

GitHub Actions / Test (macos-latest, stable)

Cannot find name 'formatter'. Did you mean 'getFormatter'?

Check failure on line 143 in packages/cursorless-vscode/src/migrateSnippets.ts

View workflow job for this annotation

GitHub Actions / Test (macos-latest, stable)

Argument of type 'string | undefined' is not assignable to parameter of type 'string'.

Check failure on line 143 in packages/cursorless-vscode/src/migrateSnippets.ts

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest, stable)

Cannot find name 'formatter'. Did you mean 'getFormatter'?

Check failure on line 143 in packages/cursorless-vscode/src/migrateSnippets.ts

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest, stable)

Argument of type 'string | undefined' is not assignable to parameter of type 'string'.

Check failure on line 143 in packages/cursorless-vscode/src/migrateSnippets.ts

View workflow job for this annotation

GitHub Actions / Test (windows-latest, stable)

Cannot find name 'formatter'. Did you mean 'getFormatter'?

Check failure on line 143 in packages/cursorless-vscode/src/migrateSnippets.ts

View workflow job for this annotation

GitHub Actions / Test (windows-latest, stable)

Argument of type 'string | undefined' is not assignable to parameter of type 'string'.

Check failure on line 143 in packages/cursorless-vscode/src/migrateSnippets.ts

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest, legacy)

Cannot find name 'formatter'. Did you mean 'getFormatter'?

Check failure on line 143 in packages/cursorless-vscode/src/migrateSnippets.ts

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest, legacy)

Argument of type 'string | undefined' is not assignable to parameter of type 'string'.
// SKIP: variable.description
};
},
);
}

// Convert Cursorless formatters to Talon community formatters
function getFormatter(formatter?: string): string[] | undefined {
if (!formatter) {
return undefined;
}
function getFormatter(formatter: string): string[] {
switch (formatter) {
case "camelCase":
return ["PRIVATE_CAMEL_CASE"];
Expand Down

0 comments on commit 54ea777

Please sign in to comment.