Skip to content

Commit

Permalink
fix(scripts): lint/style/noUnusedTemplateLiteral
Browse files Browse the repository at this point in the history
  • Loading branch information
trivikr committed Jul 27, 2024
1 parent 78f25b5 commit 12a3498
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 14 deletions.
8 changes: 4 additions & 4 deletions scripts/generateClientTypesMap/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { writeFile } from "fs/promises";
import { join } from "path";
import { writeFile } from "fs/promises";
import { format } from "prettier";

import {
Expand All @@ -24,8 +24,8 @@ const codegenComment = `// This file is generated by scripts/generateClientTypes

let fileContent = codegenComment;

fileContent += `\n\n/* eslint-disable @typescript-eslint/naming-convention */`;
fileContent += `\nexport const ${mapName}: Record<string, Record<string, string>> = `;
fileContent += "\n\n\n";
fileContent += `export const ${mapName}: Record<string, Record<string, string>> = `;

const clientTypesMap = {};

Expand All @@ -37,7 +37,7 @@ const codegenComment = `// This file is generated by scripts/generateClientTypes
}

fileContent += JSON.stringify(clientTypesMap);
fileContent += `;\n`;
fileContent += ";\n";

await writeFile(
relativeFilePath,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const getGlobalImportEqualsInput = () => {
let content = "";

content += `import AWS = require("aws-sdk");\n\n`;
content += getV2ClientsNewExpressionCode(CLIENTS_TO_TEST, `AWS.`);
content += getV2ClientsNewExpressionCode(CLIENTS_TO_TEST, "AWS.");

return content;
};
2 changes: 1 addition & 1 deletion scripts/generateNewClientTests/getGlobalImportInput.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const getGlobalImportInput = () => {
let content = "";

content += `import AWS from "aws-sdk";\n\n`;
content += getV2ClientsNewExpressionCode(CLIENT_NAMES, `AWS.`);
content += getV2ClientsNewExpressionCode(CLIENT_NAMES, "AWS.");

return content;
};
2 changes: 1 addition & 1 deletion scripts/generateNewClientTests/getGlobalImportStarInput.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const getGlobalImportStarInput = () => {
let content = "";

content += `import * as AWS from "aws-sdk";\n\n`;
content += getV2ClientsNewExpressionCode(CLIENTS_TO_TEST, `AWS.`);
content += getV2ClientsNewExpressionCode(CLIENTS_TO_TEST, "AWS.");

return content;
};
2 changes: 1 addition & 1 deletion scripts/generateNewClientTests/getGlobalRequireInput.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const getGlobalRequireInput = () => {
let content = "";

content += `const AWS = require("aws-sdk");\n\n`;
content += getV2ClientsNewExpressionCode(CLIENTS_TO_TEST, `AWS.`);
content += getV2ClientsNewExpressionCode(CLIENTS_TO_TEST, "AWS.");

return content;
};
2 changes: 1 addition & 1 deletion scripts/generateNewClientTests/getGlobalRequireOutput.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { getV3ClientsNewExpressionCode } from "./getV3ClientsNewExpressionCode";
import { getV3PackageRequiresCode } from "./getV3PackageRequiresCode";

export const getGlobalRequireOutput = () => {
let content = `\n\n`;
let content = "\n\n";

content += getV3PackageRequiresCode(getClientNamesSortedByPackageName(CLIENTS_TO_TEST));
content += "\n";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const getServiceImportWithNameInput = () => {

content += `import { \n${CLIENTS_TO_TEST.map(
(clientName) => ` ${clientName} as ${getClientNameWithLocalSuffix(clientName)}`
).join(`,\n`)}\n} from "aws-sdk";\n`;
).join(",\n")}\n} from "aws-sdk";\n`;
content += "\n";
content += getV2ClientsNewExpressionCode(CLIENTS_TO_TEST.map(getClientNameWithLocalSuffix));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { getV3ClientsNewExpressionCode } from "./getV3ClientsNewExpressionCode";
import { getV3PackageRequiresCode } from "./getV3PackageRequiresCode";

export const getServiceRequireDeepOutput = () => {
let content = `\n\n`;
let content = "\n\n";

content += getV3PackageRequiresCode(getClientNamesSortedByPackageName(CLIENTS_TO_TEST));
content += "\n";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { getV3ClientsNewExpressionCode } from "./getV3ClientsNewExpressionCode";
import { getV3PackageRequiresCode } from "./getV3PackageRequiresCode";

export const getServiceRequireDeepWithNameOutput = () => {
let content = `\n\n`;
let content = "\n\n";

content += getV3PackageRequiresCode(getClientNamesSortedByPackageName(CLIENTS_TO_TEST), {
useLocalSuffix: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const getServiceRequireWithNameInput = () => {

content += `const { \n${CLIENTS_TO_TEST.map(
(clientName) => ` ${clientName}: ${getClientNameWithLocalSuffix(clientName)}`
).join(`,\n`)}\n} = require("aws-sdk");\n`;
).join(",\n")}\n} = require("aws-sdk");\n`;
content += "\n";
content += getV2ClientsNewExpressionCode(CLIENTS_TO_TEST.map(getClientNameWithLocalSuffix));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { getV3ClientsNewExpressionCode } from "./getV3ClientsNewExpressionCode";
import { getV3PackageRequiresCode } from "./getV3PackageRequiresCode";

export const getServiceRequireWithNameOutput = () => {
let content = `\n\n`;
let content = "\n\n";

content += getV3PackageRequiresCode(getClientNamesSortedByPackageName(CLIENTS_TO_TEST), {
useLocalSuffix: true,
Expand Down

0 comments on commit 12a3498

Please sign in to comment.