diff --git a/.changeset/shaggy-rocks-melt.md b/.changeset/shaggy-rocks-melt.md new file mode 100644 index 000000000..d3ba15a5a --- /dev/null +++ b/.changeset/shaggy-rocks-melt.md @@ -0,0 +1,5 @@ +--- +"aws-sdk-js-codemod": patch +--- + +Prefer template literals over string concatenation diff --git a/biome.json b/biome.json index b770c2e61..0b17378ed 100644 --- a/biome.json +++ b/biome.json @@ -26,8 +26,7 @@ "useConsistentArrayType": { "level": "error", "options": { "syntax": "shorthand" } - }, - "useTemplate": "off" + } }, "suspicious": { "noEmptyBlockStatements": "error" diff --git a/src/cli.ts b/src/cli.ts index 16aadd66f..03377387e 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -58,6 +58,7 @@ try { ({ options, positionalArguments } = parser.parse()); if (positionalArguments.length === 0 && !options.stdin) { process.stderr.write( + // biome-ignore lint/style/useTemplate: This is a multiline string "Error: You have to provide at least one file/directory to transform." + "\n\n---\n\n" + parser.getHelpText() diff --git a/src/transforms/v2-to-v3/apis/removePromiseForCallExpression.ts b/src/transforms/v2-to-v3/apis/removePromiseForCallExpression.ts index c0e83944f..ec9bb56d6 100644 --- a/src/transforms/v2-to-v3/apis/removePromiseForCallExpression.ts +++ b/src/transforms/v2-to-v3/apis/removePromiseForCallExpression.ts @@ -32,6 +32,7 @@ export const removePromiseForCallExpression = ( } default: { emitWarning( + // biome-ignore lint/style/useTemplate: This is a multiline string `Removal of .promise() not implemented for parentPath: ${callExpression.parentPath.value.type}\n` + `Code processed: ${j(callExpression.parentPath).toSource()}\n\n` + "Please report your use case on https://github.com/aws/aws-sdk-js-codemod\n" diff --git a/src/utils/getTransformDescription.ts b/src/utils/getTransformDescription.ts index 149a7bf35..7b6cf968d 100644 --- a/src/utils/getTransformDescription.ts +++ b/src/utils/getTransformDescription.ts @@ -15,7 +15,7 @@ const getWrappedBlocks = (sentence: string, blockLength: number): string[] => { } // add the word to the current block - currentBlock += word + " "; + currentBlock += `${word} `; } // add the final block to the list of blocks