From 34327302738763181f8ee02c991274ecda758239 Mon Sep 17 00:00:00 2001 From: Corey Pyle Date: Mon, 14 Oct 2024 16:01:13 -0400 Subject: [PATCH] JavaScript (v3): Remove eslint comments. --- javascriptv3/README.md | 14 +++---- javascriptv3/example_code/.gitignore | 3 -- .../tests/cloudwatch-query.unit.test.js | 1 - .../cloudwatch/actions/list-metrics.js | 27 +++++++++---- .../cloudwatch/libs/cloudwatch-helper.js | 1 - .../tests/put-metric-data.integration.test.js | 1 - .../codepipeline/MyCodePipelineFunction.js | 1 - .../frontend-client/src/confirmUserPage.tsx | 1 - .../frontend-client/src/homePage.tsx | 2 - .../src/handlers/get-items-handler.ts | 1 - .../src/handlers/post-items-handler.ts | 1 - .../src/handlers/post-items-report-handler.ts | 1 - .../src/handlers/put-items-archive-handler.ts | 1 - .../aurora-serverless-app/src/index.ts | 1 - .../src/middleware/validate-db.ts | 1 - .../tests/get-items-handler.unit.test.ts | 2 - .../tests/validate-db.unit.test.ts | 2 - .../aurora-serverless-app/watch.js | 1 - .../helper-functions/lambda-function-setup.js | 1 - .../src/helper-functions/populate-table.js | 1 - .../src/libs/dynamoClient.js | 1 - .../src/libs/lambdaClient.js | 1 - .../lambda-api-gateway/src/libs/snsClient.js | 1 - .../src/mylamdbafunction.js | 1 - .../helper-functions/lambda-function-setup.js | 1 - .../src/helper-functions/populate-table.js | 1 - .../src/libs/dynamoClient.js | 1 - .../src/libs/lambdaClient.js | 1 - .../src/libs/snsClient.js | 1 - .../src/mylamdbafunction.js | 1 - .../cross-services/lex-bot/src/index.js | 1 - .../cross-services/textract-react/src/App.js | 1 - .../textract-react/src/ExplorerCard.js | 1 - .../textract-react/src/ExplorerTree.js | 1 - .../textract-react/src/ExtractButtons.js | 1 - .../textract-react/src/ImageDisplay.js | 1 - .../textract-react/src/ImageLoader.js | 1 - .../textract-react/src/LoginCard.js | 1 - .../textract-react/src/TextractModel.js | 1 - .../textract-react/src/__test__/App.test.js | 1 - .../src/__test__/ExplorerCard.test.js | 1 - .../src/__test__/ExplorerTree.test.js | 1 - .../src/__test__/ExtractButtons.test.js | 1 - .../src/__test__/ImageDisplay.test.js | 1 - .../src/__test__/ImageLoader.test.js | 1 - .../src/__test__/LoginCard.test.js | 1 - .../src/__test__/TextractModel.test.js | 1 - .../textract-react/src/index.js | 1 - .../textract-react/src/setupTests.js | 1 - .../tests/TopicsQueuesWkflw.unit.test.js | 38 +++++-------------- .../example_code/glacier/src/createVault.ts | 1 - .../glacier/src/libs/glacierClient.js | 1 - .../example_code/glacier/src/uploadArchive.ts | 1 - .../tests/glue-actions.integration.test.js | 1 - ...reate-delete-datastore.integration.test.js | 1 - .../tests/hlth-img-deploy.unit.test.js | 1 - .../object-locking/repl.steps.unit.test.js | 1 - ...d-bulk-templated-email.integration.test.js | 2 - .../ses/tests/send-email.integration.test.js | 2 - .../send-templated-email.integration.test.js | 2 - 60 files changed, 34 insertions(+), 110 deletions(-) diff --git a/javascriptv3/README.md b/javascriptv3/README.md index f027828e091..79ee3ee82c8 100644 --- a/javascriptv3/README.md +++ b/javascriptv3/README.md @@ -54,10 +54,10 @@ You can run tests for a specific service, or for every service in this repositor If you run tests using the preceding commands, output will be stored in `unit_test.log` or `integration_test.log`. Errors are still logged to the console. ## Linting -You can run ESLint to statically check for errors. +You can run Biome to statically check for errors. -To run ESLint, use the following command: - `npm run ci-lint .` +To run Biome, use the following command: + `npm run ci-lint` ## Docker image (Beta) @@ -87,13 +87,9 @@ run the example and verify that it ran correctly. ## Configure Visual Studio Code (VS Code) -### ESLint +### Biome -To configure ESLint in VS Code, add the following to `settings.json`: - -``` - "eslint.workingDirectories": ["javascriptv3/example_code/reactnative/ReactNativeApp", "javascriptv3"], -``` +To configure Biome in VS Code, follow the instructions here: https://biomejs.dev/guides/getting-started/ ## Additional resources diff --git a/javascriptv3/example_code/.gitignore b/javascriptv3/example_code/.gitignore index 82d9af879ab..206f879931c 100644 --- a/javascriptv3/example_code/.gitignore +++ b/javascriptv3/example_code/.gitignore @@ -64,9 +64,6 @@ jspm_packages/ # Optional npm cache directory .npm -# Optional eslint cache -.eslintcache - # Optional REPL history .node_repl_history diff --git a/javascriptv3/example_code/cloudwatch-logs/tests/cloudwatch-query.unit.test.js b/javascriptv3/example_code/cloudwatch-logs/tests/cloudwatch-query.unit.test.js index c355df1897f..8b6fc039fde 100644 --- a/javascriptv3/example_code/cloudwatch-logs/tests/cloudwatch-query.unit.test.js +++ b/javascriptv3/example_code/cloudwatch-logs/tests/cloudwatch-query.unit.test.js @@ -1,6 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/* eslint-disable -- This file existed pre-eslint configuration. Fix the next time the file is touched. */ import { describe, it, vi, expect } from "vitest"; import { CloudWatchQuery } from "../scenarios/large-query/cloud-watch-query.js"; diff --git a/javascriptv3/example_code/cloudwatch/actions/list-metrics.js b/javascriptv3/example_code/cloudwatch/actions/list-metrics.js index e5760628916..de237c95292 100644 --- a/javascriptv3/example_code/cloudwatch/actions/list-metrics.js +++ b/javascriptv3/example_code/cloudwatch/actions/list-metrics.js @@ -2,10 +2,13 @@ // SPDX-License-Identifier: Apache-2.0 // snippet-start:[javascript.v3.cloudwatch.actions.ListMetrics] -import { ListMetricsCommand } from "@aws-sdk/client-cloudwatch"; +import { + CloudWatchServiceException, + ListMetricsCommand, +} from "@aws-sdk/client-cloudwatch"; import { client } from "../libs/client.js"; -export const main = () => { +export const main = async () => { // Use the AWS console to see available namespaces and metric names. Custom metrics can also be created. // https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/viewing_metrics_with_cloudwatch.html const command = new ListMetricsCommand({ @@ -18,13 +21,23 @@ export const main = () => { Namespace: "AWS/Logs", }); - return client.send(command); + try { + const response = await client.send(command); + console.log(`Metrics count: ${response.Metrics?.length}`); + return response; + } catch (caught) { + if (caught instanceof CloudWatchServiceException) { + console.error(`Error from CloudWatch. ${caught.name}: ${caught.message}`); + } else { + throw caught; + } + } }; // snippet-end:[javascript.v3.cloudwatch.actions.ListMetrics] -// Call a function if this file was run directly. This allows the file -// to be runnable without running on import. -import { fileURLToPath } from "node:url"; -if (process.argv[1] === fileURLToPath(import.meta.url)) { +// Call function if run directly +import { isMain } from "@aws-doc-sdk-examples/lib/utils/util-node.js"; + +if (isMain(import.meta.url)) { main(); } diff --git a/javascriptv3/example_code/cloudwatch/libs/cloudwatch-helper.js b/javascriptv3/example_code/cloudwatch/libs/cloudwatch-helper.js index 0345f3bea53..1807ee90628 100644 --- a/javascriptv3/example_code/cloudwatch/libs/cloudwatch-helper.js +++ b/javascriptv3/example_code/cloudwatch/libs/cloudwatch-helper.js @@ -1,6 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/* eslint-disable -- This file existed pre-eslint configuration. Fix the next time the file is touched. */ import { DeleteAlarmsCommand, diff --git a/javascriptv3/example_code/cloudwatch/tests/put-metric-data.integration.test.js b/javascriptv3/example_code/cloudwatch/tests/put-metric-data.integration.test.js index 0b1bc58df0d..aa8bef8495e 100644 --- a/javascriptv3/example_code/cloudwatch/tests/put-metric-data.integration.test.js +++ b/javascriptv3/example_code/cloudwatch/tests/put-metric-data.integration.test.js @@ -1,6 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/* eslint-disable -- This file existed pre-eslint configuration. Fix the next time the file is touched. */ import { describe, it, expect } from "vitest"; import { v4 as uuidv4 } from "uuid"; diff --git a/javascriptv3/example_code/codepipeline/MyCodePipelineFunction.js b/javascriptv3/example_code/codepipeline/MyCodePipelineFunction.js index 058f5fb070c..80c303211fe 100644 --- a/javascriptv3/example_code/codepipeline/MyCodePipelineFunction.js +++ b/javascriptv3/example_code/codepipeline/MyCodePipelineFunction.js @@ -1,6 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/* eslint-disable -- This file existed pre-eslint configuration. Fix the next time the file is touched. */ // snippet-start:[codepipeline.javascript.MyCodePipelineFunction.complete] diff --git a/javascriptv3/example_code/cognito-identity-provider/scenarios/cognito-developer-guide-react-example/frontend-client/src/confirmUserPage.tsx b/javascriptv3/example_code/cognito-identity-provider/scenarios/cognito-developer-guide-react-example/frontend-client/src/confirmUserPage.tsx index 7613c08e5a5..971b5d9257d 100644 --- a/javascriptv3/example_code/cognito-identity-provider/scenarios/cognito-developer-guide-react-example/frontend-client/src/confirmUserPage.tsx +++ b/javascriptv3/example_code/cognito-identity-provider/scenarios/cognito-developer-guide-react-example/frontend-client/src/confirmUserPage.tsx @@ -9,7 +9,6 @@ import { confirmSignUp } from "./authService"; const ConfirmUserPage = () => { const navigate = useNavigate(); const location = useLocation(); - // eslint-disable-next-line const [email, setEmail] = useState(location.state?.email || ""); const [confirmationCode, setConfirmationCode] = useState(""); diff --git a/javascriptv3/example_code/cognito-identity-provider/scenarios/cognito-developer-guide-react-example/frontend-client/src/homePage.tsx b/javascriptv3/example_code/cognito-identity-provider/scenarios/cognito-developer-guide-react-example/frontend-client/src/homePage.tsx index 2db3101d42b..34690c334b3 100644 --- a/javascriptv3/example_code/cognito-identity-provider/scenarios/cognito-developer-guide-react-example/frontend-client/src/homePage.tsx +++ b/javascriptv3/example_code/cognito-identity-provider/scenarios/cognito-developer-guide-react-example/frontend-client/src/homePage.tsx @@ -3,7 +3,6 @@ import { useNavigate } from "react-router-dom"; -/*eslint-disable*/ function parseJwt(token) { const base64Url = token.split(".")[1]; const base64 = base64Url.replace(/-/g, "+").replace(/_/g, "/"); @@ -40,7 +39,6 @@ const HomePage = () => { sessionStorage.clear(); navigate("/login"); }; - /*eslint-enable*/ return (
diff --git a/javascriptv3/example_code/cross-services/aurora-serverless-app/src/handlers/get-items-handler.ts b/javascriptv3/example_code/cross-services/aurora-serverless-app/src/handlers/get-items-handler.ts index c55208ddb7f..8b0292648f8 100644 --- a/javascriptv3/example_code/cross-services/aurora-serverless-app/src/handlers/get-items-handler.ts +++ b/javascriptv3/example_code/cross-services/aurora-serverless-app/src/handlers/get-items-handler.ts @@ -1,6 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/* eslint-disable -- This file existed pre-eslint configuration. Fix the next time the file is touched. */ import type { Handler } from "src/types/handler.js"; import { command as getAllItemsCommand } from "../statement-commands/get-all-items.js"; diff --git a/javascriptv3/example_code/cross-services/aurora-serverless-app/src/handlers/post-items-handler.ts b/javascriptv3/example_code/cross-services/aurora-serverless-app/src/handlers/post-items-handler.ts index 4aa93a5ecdd..c7cf4bed708 100644 --- a/javascriptv3/example_code/cross-services/aurora-serverless-app/src/handlers/post-items-handler.ts +++ b/javascriptv3/example_code/cross-services/aurora-serverless-app/src/handlers/post-items-handler.ts @@ -1,6 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/* eslint-disable -- This file existed pre-eslint configuration. Fix the next time the file is touched. */ import { v4 as uuidv4 } from "uuid"; import type { Handler } from "src/types/handler.js"; diff --git a/javascriptv3/example_code/cross-services/aurora-serverless-app/src/handlers/post-items-report-handler.ts b/javascriptv3/example_code/cross-services/aurora-serverless-app/src/handlers/post-items-report-handler.ts index a9727d07cc9..cf88a576ba4 100644 --- a/javascriptv3/example_code/cross-services/aurora-serverless-app/src/handlers/post-items-report-handler.ts +++ b/javascriptv3/example_code/cross-services/aurora-serverless-app/src/handlers/post-items-report-handler.ts @@ -1,6 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/* eslint-disable -- This file existed pre-eslint configuration. Fix the next time the file is touched. */ import { SendRawEmailCommand } from "@aws-sdk/client-ses"; import { createMimeMessage, type TextFormat } from "mimetext"; diff --git a/javascriptv3/example_code/cross-services/aurora-serverless-app/src/handlers/put-items-archive-handler.ts b/javascriptv3/example_code/cross-services/aurora-serverless-app/src/handlers/put-items-archive-handler.ts index 37a8ce58282..e40a935efbc 100644 --- a/javascriptv3/example_code/cross-services/aurora-serverless-app/src/handlers/put-items-archive-handler.ts +++ b/javascriptv3/example_code/cross-services/aurora-serverless-app/src/handlers/put-items-archive-handler.ts @@ -1,6 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/* eslint-disable -- This file existed pre-eslint configuration. Fix the next time the file is touched. */ import type { Handler } from "src/types/handler.js"; import { buildStatementCommand } from "../statement-commands/command-helper.js"; diff --git a/javascriptv3/example_code/cross-services/aurora-serverless-app/src/index.ts b/javascriptv3/example_code/cross-services/aurora-serverless-app/src/index.ts index 403349e830d..d866d9fb264 100644 --- a/javascriptv3/example_code/cross-services/aurora-serverless-app/src/index.ts +++ b/javascriptv3/example_code/cross-services/aurora-serverless-app/src/index.ts @@ -1,6 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/* eslint-disable -- This file existed pre-eslint configuration. Fix the next time the file is touched. */ import express from "express"; import cors from "cors"; diff --git a/javascriptv3/example_code/cross-services/aurora-serverless-app/src/middleware/validate-db.ts b/javascriptv3/example_code/cross-services/aurora-serverless-app/src/middleware/validate-db.ts index 61319b45c86..efe50e8a43f 100644 --- a/javascriptv3/example_code/cross-services/aurora-serverless-app/src/middleware/validate-db.ts +++ b/javascriptv3/example_code/cross-services/aurora-serverless-app/src/middleware/validate-db.ts @@ -1,6 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/* eslint-disable -- This file existed pre-eslint configuration. Fix the next time the file is touched. */ import type { RequestHandler } from "express"; import { command as createTableCommand } from "../statement-commands/create-table.js"; diff --git a/javascriptv3/example_code/cross-services/aurora-serverless-app/tests/get-items-handler.unit.test.ts b/javascriptv3/example_code/cross-services/aurora-serverless-app/tests/get-items-handler.unit.test.ts index 102f193e822..68d01ac3e99 100644 --- a/javascriptv3/example_code/cross-services/aurora-serverless-app/tests/get-items-handler.unit.test.ts +++ b/javascriptv3/example_code/cross-services/aurora-serverless-app/tests/get-items-handler.unit.test.ts @@ -8,9 +8,7 @@ import { getItemsHandler } from "../src/handlers/get-items-handler.js"; describe("getItemsHandler", () => { it("should create a request handler that sends a response " + "with the result of the call to the SDK client", async () => { - // eslint-disable-next-line const sendable = { send: async () => ({ records: [] }) as R }; - // eslint-disable-next-line const handler = getItemsHandler.withClient({ rdsDataClient: sendable }); const send: unknown = vi.fn(); diff --git a/javascriptv3/example_code/cross-services/aurora-serverless-app/tests/validate-db.unit.test.ts b/javascriptv3/example_code/cross-services/aurora-serverless-app/tests/validate-db.unit.test.ts index 3b2f6b89a88..0fd75d8bef6 100644 --- a/javascriptv3/example_code/cross-services/aurora-serverless-app/tests/validate-db.unit.test.ts +++ b/javascriptv3/example_code/cross-services/aurora-serverless-app/tests/validate-db.unit.test.ts @@ -11,7 +11,6 @@ describe("validate-db", () => { throw new Error(errorCodes.TABLE_NOT_FOUND); }); const sendable: Sendable = { send }; - // eslint-disable-next-line const handler = validateDb.withClient({ rdsDataClient: sendable }); await handler( {} as Request, @@ -28,7 +27,6 @@ describe("validate-db", () => { const send = vi.fn(async () => {}) as Sendable["send"]; const sendable: Sendable = { send }; const next = vi.fn(); - // eslint-disable-next-line const handler = validateDb.withClient({ rdsDataClient: sendable }); await handler( diff --git a/javascriptv3/example_code/cross-services/aurora-serverless-app/watch.js b/javascriptv3/example_code/cross-services/aurora-serverless-app/watch.js index cae79aa5de1..0694f730968 100755 --- a/javascriptv3/example_code/cross-services/aurora-serverless-app/watch.js +++ b/javascriptv3/example_code/cross-services/aurora-serverless-app/watch.js @@ -1,6 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/* eslint-disable -- This file existed pre-eslint configuration. Fix the next time the file is touched. */ import { spawn } from "node:child_process"; diff --git a/javascriptv3/example_code/cross-services/lambda-api-gateway/src/helper-functions/lambda-function-setup.js b/javascriptv3/example_code/cross-services/lambda-api-gateway/src/helper-functions/lambda-function-setup.js index 45ede5433e5..4f6e94dfaf1 100644 --- a/javascriptv3/example_code/cross-services/lambda-api-gateway/src/helper-functions/lambda-function-setup.js +++ b/javascriptv3/example_code/cross-services/lambda-api-gateway/src/helper-functions/lambda-function-setup.js @@ -1,6 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/* eslint-disable -- This file existed pre-eslint configuration. Fix the next time the file is touched. */ /* ABOUT THIS NODE.JS EXAMPLE: This example works with the AWS SDK for JavaScript version 3 (v3), diff --git a/javascriptv3/example_code/cross-services/lambda-api-gateway/src/helper-functions/populate-table.js b/javascriptv3/example_code/cross-services/lambda-api-gateway/src/helper-functions/populate-table.js index 7f10ac6e4d1..97ffb7254be 100644 --- a/javascriptv3/example_code/cross-services/lambda-api-gateway/src/helper-functions/populate-table.js +++ b/javascriptv3/example_code/cross-services/lambda-api-gateway/src/helper-functions/populate-table.js @@ -1,6 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/* eslint-disable -- This file existed pre-eslint configuration. Fix the next time the file is touched. */ /* ABOUT THIS NODE.JS EXAMPLE: This example works with the AWS SDK for JavaScript version 3 (v3), diff --git a/javascriptv3/example_code/cross-services/lambda-api-gateway/src/libs/dynamoClient.js b/javascriptv3/example_code/cross-services/lambda-api-gateway/src/libs/dynamoClient.js index 9189f43555b..96569fbe917 100644 --- a/javascriptv3/example_code/cross-services/lambda-api-gateway/src/libs/dynamoClient.js +++ b/javascriptv3/example_code/cross-services/lambda-api-gateway/src/libs/dynamoClient.js @@ -1,6 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/* eslint-disable -- This file existed pre-eslint configuration. Fix the next time the file is touched. */ /* ABOUT THIS NODE.JS EXAMPLE: This example works with the AWS SDK for JavaScript version 3 (v3), diff --git a/javascriptv3/example_code/cross-services/lambda-api-gateway/src/libs/lambdaClient.js b/javascriptv3/example_code/cross-services/lambda-api-gateway/src/libs/lambdaClient.js index 2727f626079..6e7c36ec188 100644 --- a/javascriptv3/example_code/cross-services/lambda-api-gateway/src/libs/lambdaClient.js +++ b/javascriptv3/example_code/cross-services/lambda-api-gateway/src/libs/lambdaClient.js @@ -1,6 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/* eslint-disable -- This file existed pre-eslint configuration. Fix the next time the file is touched. */ /* ABOUT THIS NODE.JS EXAMPLE: This example works with the AWS SDK for JavaScript version 3 (v3), diff --git a/javascriptv3/example_code/cross-services/lambda-api-gateway/src/libs/snsClient.js b/javascriptv3/example_code/cross-services/lambda-api-gateway/src/libs/snsClient.js index 8efd18ba006..1a6d4f74f1d 100644 --- a/javascriptv3/example_code/cross-services/lambda-api-gateway/src/libs/snsClient.js +++ b/javascriptv3/example_code/cross-services/lambda-api-gateway/src/libs/snsClient.js @@ -1,6 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/* eslint-disable -- This file existed pre-eslint configuration. Fix the next time the file is touched. */ /* ABOUT THIS NODE.JS EXAMPLE: This example works with the AWS SDK for JavaScript version 3 (v3), diff --git a/javascriptv3/example_code/cross-services/lambda-api-gateway/src/mylamdbafunction.js b/javascriptv3/example_code/cross-services/lambda-api-gateway/src/mylamdbafunction.js index 3f27c548178..177f656dcf0 100644 --- a/javascriptv3/example_code/cross-services/lambda-api-gateway/src/mylamdbafunction.js +++ b/javascriptv3/example_code/cross-services/lambda-api-gateway/src/mylamdbafunction.js @@ -1,6 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/* eslint-disable -- This file existed pre-eslint configuration. Fix the next time the file is touched. */ /* ABOUT THIS NODE.JS EXAMPLE: This example works with the AWS SDK for JavaScript version 3 (v3), diff --git a/javascriptv3/example_code/cross-services/lambda-scheduled-events/src/helper-functions/lambda-function-setup.js b/javascriptv3/example_code/cross-services/lambda-scheduled-events/src/helper-functions/lambda-function-setup.js index 8a8eabc335b..532464f0b7f 100644 --- a/javascriptv3/example_code/cross-services/lambda-scheduled-events/src/helper-functions/lambda-function-setup.js +++ b/javascriptv3/example_code/cross-services/lambda-scheduled-events/src/helper-functions/lambda-function-setup.js @@ -1,6 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/* eslint-disable -- This file existed pre-eslint configuration. Fix the next time the file is touched. */ /* ABOUT THIS NODE.JS EXAMPLE: This example works with the AWS SDK for JavaScript version 3 (v3), diff --git a/javascriptv3/example_code/cross-services/lambda-scheduled-events/src/helper-functions/populate-table.js b/javascriptv3/example_code/cross-services/lambda-scheduled-events/src/helper-functions/populate-table.js index 59bf646a1e2..6d3f528265f 100644 --- a/javascriptv3/example_code/cross-services/lambda-scheduled-events/src/helper-functions/populate-table.js +++ b/javascriptv3/example_code/cross-services/lambda-scheduled-events/src/helper-functions/populate-table.js @@ -1,6 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/* eslint-disable -- This file existed pre-eslint configuration. Fix the next time the file is touched. */ /* ABOUT THIS NODE.JS EXAMPLE: This example works with the AWS SDK for JavaScript version 3 (v3), diff --git a/javascriptv3/example_code/cross-services/lambda-scheduled-events/src/libs/dynamoClient.js b/javascriptv3/example_code/cross-services/lambda-scheduled-events/src/libs/dynamoClient.js index 8dc0760519b..4abe6d28e76 100644 --- a/javascriptv3/example_code/cross-services/lambda-scheduled-events/src/libs/dynamoClient.js +++ b/javascriptv3/example_code/cross-services/lambda-scheduled-events/src/libs/dynamoClient.js @@ -1,6 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/* eslint-disable -- This file existed pre-eslint configuration. Fix the next time the file is touched. */ /* ABOUT THIS NODE.JS EXAMPLE: This example works with the AWS SDK for JavaScript version 3 (v3), diff --git a/javascriptv3/example_code/cross-services/lambda-scheduled-events/src/libs/lambdaClient.js b/javascriptv3/example_code/cross-services/lambda-scheduled-events/src/libs/lambdaClient.js index 932ab94c940..deb5e9feeed 100644 --- a/javascriptv3/example_code/cross-services/lambda-scheduled-events/src/libs/lambdaClient.js +++ b/javascriptv3/example_code/cross-services/lambda-scheduled-events/src/libs/lambdaClient.js @@ -1,6 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/* eslint-disable -- This file existed pre-eslint configuration. Fix the next time the file is touched. */ /* ABOUT THIS NODE.JS EXAMPLE: This example works with the AWS SDK for JavaScript version 3 (v3), diff --git a/javascriptv3/example_code/cross-services/lambda-scheduled-events/src/libs/snsClient.js b/javascriptv3/example_code/cross-services/lambda-scheduled-events/src/libs/snsClient.js index f349fef5a61..c514d656eeb 100644 --- a/javascriptv3/example_code/cross-services/lambda-scheduled-events/src/libs/snsClient.js +++ b/javascriptv3/example_code/cross-services/lambda-scheduled-events/src/libs/snsClient.js @@ -1,6 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/* eslint-disable -- This file existed pre-eslint configuration. Fix the next time the file is touched. */ /* ABOUT THIS NODE.JS EXAMPLE: This example works with the AWS SDK for JavaScript version 3 (v3), diff --git a/javascriptv3/example_code/cross-services/lambda-scheduled-events/src/mylamdbafunction.js b/javascriptv3/example_code/cross-services/lambda-scheduled-events/src/mylamdbafunction.js index 4773597e768..8e8a632252c 100644 --- a/javascriptv3/example_code/cross-services/lambda-scheduled-events/src/mylamdbafunction.js +++ b/javascriptv3/example_code/cross-services/lambda-scheduled-events/src/mylamdbafunction.js @@ -1,6 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/* eslint-disable -- This file existed pre-eslint configuration. Fix the next time the file is touched. */ /* ABOUT THIS NODE.JS EXAMPLE: This example works with the AWS SDK for JavaScript version 3 (v3), diff --git a/javascriptv3/example_code/cross-services/lex-bot/src/index.js b/javascriptv3/example_code/cross-services/lex-bot/src/index.js index a290a4903bf..e2151abdae7 100644 --- a/javascriptv3/example_code/cross-services/lex-bot/src/index.js +++ b/javascriptv3/example_code/cross-services/lex-bot/src/index.js @@ -1,6 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/* eslint-disable -- This file existed pre-eslint configuration. Fix the next time the file is touched. */ /* ABOUT THIS NODE.JS EXAMPLE: This example works with the AWS SDK for JavaScript version 3 (v3), diff --git a/javascriptv3/example_code/cross-services/textract-react/src/App.js b/javascriptv3/example_code/cross-services/textract-react/src/App.js index 697206e1408..f58ed45a27b 100644 --- a/javascriptv3/example_code/cross-services/textract-react/src/App.js +++ b/javascriptv3/example_code/cross-services/textract-react/src/App.js @@ -1,6 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/* eslint-disable -- This file existed pre-eslint configuration. Fix the next time the file is touched. */ import React, { useState, useEffect } from "react"; import { ImageLoader } from "./ImageLoader"; diff --git a/javascriptv3/example_code/cross-services/textract-react/src/ExplorerCard.js b/javascriptv3/example_code/cross-services/textract-react/src/ExplorerCard.js index fbcdc1886ac..85fcae6e84d 100644 --- a/javascriptv3/example_code/cross-services/textract-react/src/ExplorerCard.js +++ b/javascriptv3/example_code/cross-services/textract-react/src/ExplorerCard.js @@ -1,6 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/* eslint-disable -- This file existed pre-eslint configuration. Fix the next time the file is touched. */ import React, { useRef } from "react"; import { ExplorerTree } from "./ExplorerTree"; diff --git a/javascriptv3/example_code/cross-services/textract-react/src/ExplorerTree.js b/javascriptv3/example_code/cross-services/textract-react/src/ExplorerTree.js index 12bc48aa99a..56893435a8c 100644 --- a/javascriptv3/example_code/cross-services/textract-react/src/ExplorerTree.js +++ b/javascriptv3/example_code/cross-services/textract-react/src/ExplorerTree.js @@ -1,6 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/* eslint-disable -- This file existed pre-eslint configuration. Fix the next time the file is touched. */ import React from "react"; import { ColorMap, FilterMap } from "./Utils"; diff --git a/javascriptv3/example_code/cross-services/textract-react/src/ExtractButtons.js b/javascriptv3/example_code/cross-services/textract-react/src/ExtractButtons.js index 1ec0d34cb18..3bc0965ff68 100644 --- a/javascriptv3/example_code/cross-services/textract-react/src/ExtractButtons.js +++ b/javascriptv3/example_code/cross-services/textract-react/src/ExtractButtons.js @@ -1,6 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/* eslint-disable -- This file existed pre-eslint configuration. Fix the next time the file is touched. */ import React, { useState } from "react"; diff --git a/javascriptv3/example_code/cross-services/textract-react/src/ImageDisplay.js b/javascriptv3/example_code/cross-services/textract-react/src/ImageDisplay.js index 0903cd3da39..8dcf75f79f5 100644 --- a/javascriptv3/example_code/cross-services/textract-react/src/ImageDisplay.js +++ b/javascriptv3/example_code/cross-services/textract-react/src/ImageDisplay.js @@ -1,6 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/* eslint-disable -- This file existed pre-eslint configuration. Fix the next time the file is touched. */ import React, { useRef, useLayoutEffect } from "react"; import { ColorMap } from "./Utils"; diff --git a/javascriptv3/example_code/cross-services/textract-react/src/ImageLoader.js b/javascriptv3/example_code/cross-services/textract-react/src/ImageLoader.js index d298a0eece4..f1608b69f10 100644 --- a/javascriptv3/example_code/cross-services/textract-react/src/ImageLoader.js +++ b/javascriptv3/example_code/cross-services/textract-react/src/ImageLoader.js @@ -1,6 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/* eslint-disable -- This file existed pre-eslint configuration. Fix the next time the file is touched. */ import React, { useState } from "react"; diff --git a/javascriptv3/example_code/cross-services/textract-react/src/LoginCard.js b/javascriptv3/example_code/cross-services/textract-react/src/LoginCard.js index a4fc85ccfe8..433c5115f3e 100644 --- a/javascriptv3/example_code/cross-services/textract-react/src/LoginCard.js +++ b/javascriptv3/example_code/cross-services/textract-react/src/LoginCard.js @@ -1,6 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/* eslint-disable -- This file existed pre-eslint configuration. Fix the next time the file is touched. */ import React from "react"; diff --git a/javascriptv3/example_code/cross-services/textract-react/src/TextractModel.js b/javascriptv3/example_code/cross-services/textract-react/src/TextractModel.js index 961e329cd4a..1d300791f36 100644 --- a/javascriptv3/example_code/cross-services/textract-react/src/TextractModel.js +++ b/javascriptv3/example_code/cross-services/textract-react/src/TextractModel.js @@ -1,6 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/* eslint-disable -- This file existed pre-eslint configuration. Fix the next time the file is touched. */ import { DetectDocumentTextCommand, diff --git a/javascriptv3/example_code/cross-services/textract-react/src/__test__/App.test.js b/javascriptv3/example_code/cross-services/textract-react/src/__test__/App.test.js index 5c5f0660955..7b1d691b80d 100644 --- a/javascriptv3/example_code/cross-services/textract-react/src/__test__/App.test.js +++ b/javascriptv3/example_code/cross-services/textract-react/src/__test__/App.test.js @@ -1,6 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/* eslint-disable -- This file existed pre-eslint configuration. Fix the next time the file is touched. */ // Unit tests for the App component. diff --git a/javascriptv3/example_code/cross-services/textract-react/src/__test__/ExplorerCard.test.js b/javascriptv3/example_code/cross-services/textract-react/src/__test__/ExplorerCard.test.js index 78df5decfb0..59aff0d1694 100644 --- a/javascriptv3/example_code/cross-services/textract-react/src/__test__/ExplorerCard.test.js +++ b/javascriptv3/example_code/cross-services/textract-react/src/__test__/ExplorerCard.test.js @@ -1,6 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/* eslint-disable -- This file existed pre-eslint configuration. Fix the next time the file is touched. */ // Unit tests for the ExplorerCard component. diff --git a/javascriptv3/example_code/cross-services/textract-react/src/__test__/ExplorerTree.test.js b/javascriptv3/example_code/cross-services/textract-react/src/__test__/ExplorerTree.test.js index bea95a639eb..2ab9fc25463 100644 --- a/javascriptv3/example_code/cross-services/textract-react/src/__test__/ExplorerTree.test.js +++ b/javascriptv3/example_code/cross-services/textract-react/src/__test__/ExplorerTree.test.js @@ -1,6 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/* eslint-disable -- This file existed pre-eslint configuration. Fix the next time the file is touched. */ // Unit tests for the ExplorerTree component. diff --git a/javascriptv3/example_code/cross-services/textract-react/src/__test__/ExtractButtons.test.js b/javascriptv3/example_code/cross-services/textract-react/src/__test__/ExtractButtons.test.js index 1fe6607af7d..bb184dc1dfb 100644 --- a/javascriptv3/example_code/cross-services/textract-react/src/__test__/ExtractButtons.test.js +++ b/javascriptv3/example_code/cross-services/textract-react/src/__test__/ExtractButtons.test.js @@ -1,6 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/* eslint-disable -- This file existed pre-eslint configuration. Fix the next time the file is touched. */ // Unit tests for the ExtractButtons component. diff --git a/javascriptv3/example_code/cross-services/textract-react/src/__test__/ImageDisplay.test.js b/javascriptv3/example_code/cross-services/textract-react/src/__test__/ImageDisplay.test.js index 3e1552b7307..8a4a3b20418 100644 --- a/javascriptv3/example_code/cross-services/textract-react/src/__test__/ImageDisplay.test.js +++ b/javascriptv3/example_code/cross-services/textract-react/src/__test__/ImageDisplay.test.js @@ -1,6 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/* eslint-disable -- This file existed pre-eslint configuration. Fix the next time the file is touched. */ // Unit tests for the ImageDisplay component. diff --git a/javascriptv3/example_code/cross-services/textract-react/src/__test__/ImageLoader.test.js b/javascriptv3/example_code/cross-services/textract-react/src/__test__/ImageLoader.test.js index 7f72e3e51f7..483dda41b40 100644 --- a/javascriptv3/example_code/cross-services/textract-react/src/__test__/ImageLoader.test.js +++ b/javascriptv3/example_code/cross-services/textract-react/src/__test__/ImageLoader.test.js @@ -1,6 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/* eslint-disable -- This file existed pre-eslint configuration. Fix the next time the file is touched. */ // Unit tests for the ImageLoader component. diff --git a/javascriptv3/example_code/cross-services/textract-react/src/__test__/LoginCard.test.js b/javascriptv3/example_code/cross-services/textract-react/src/__test__/LoginCard.test.js index faa3cf8f8e7..3c4513fa6a8 100644 --- a/javascriptv3/example_code/cross-services/textract-react/src/__test__/LoginCard.test.js +++ b/javascriptv3/example_code/cross-services/textract-react/src/__test__/LoginCard.test.js @@ -1,6 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/* eslint-disable -- This file existed pre-eslint configuration. Fix the next time the file is touched. */ // Unit tests for the LoginCard component. diff --git a/javascriptv3/example_code/cross-services/textract-react/src/__test__/TextractModel.test.js b/javascriptv3/example_code/cross-services/textract-react/src/__test__/TextractModel.test.js index 419317f443b..70b7e8d463e 100644 --- a/javascriptv3/example_code/cross-services/textract-react/src/__test__/TextractModel.test.js +++ b/javascriptv3/example_code/cross-services/textract-react/src/__test__/TextractModel.test.js @@ -1,6 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/* eslint-disable -- This file existed pre-eslint configuration. Fix the next time the file is touched. */ // Unit tests for the TextractModel component. diff --git a/javascriptv3/example_code/cross-services/textract-react/src/index.js b/javascriptv3/example_code/cross-services/textract-react/src/index.js index 1b7772da77d..e26fb2fc989 100644 --- a/javascriptv3/example_code/cross-services/textract-react/src/index.js +++ b/javascriptv3/example_code/cross-services/textract-react/src/index.js @@ -1,6 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/* eslint-disable -- This file existed pre-eslint configuration. Fix the next time the file is touched. */ /** * The main entry point for the React application. diff --git a/javascriptv3/example_code/cross-services/textract-react/src/setupTests.js b/javascriptv3/example_code/cross-services/textract-react/src/setupTests.js index 17508e6909c..7ea7f359a03 100644 --- a/javascriptv3/example_code/cross-services/textract-react/src/setupTests.js +++ b/javascriptv3/example_code/cross-services/textract-react/src/setupTests.js @@ -1,5 +1,4 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/* eslint-disable -- This file existed pre-eslint configuration. Fix the next time the file is touched. */ import "@testing-library/jest-dom"; diff --git a/javascriptv3/example_code/cross-services/wkflw-topics-queues/tests/TopicsQueuesWkflw.unit.test.js b/javascriptv3/example_code/cross-services/wkflw-topics-queues/tests/TopicsQueuesWkflw.unit.test.js index 82422514c3b..9244dedcb4b 100644 --- a/javascriptv3/example_code/cross-services/wkflw-topics-queues/tests/TopicsQueuesWkflw.unit.test.js +++ b/javascriptv3/example_code/cross-services/wkflw-topics-queues/tests/TopicsQueuesWkflw.unit.test.js @@ -156,7 +156,6 @@ describe("TopicsQueuesWkflw", () => { await topicsQueuesWkflw.createTopic(); // Verify the mocked 'send' function was called with an instance of CreateTopicCommand expect(send.mock.calls[0][0]).toBeInstanceOf(CreateTopicCommand); - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access expect(send.mock.calls[0][0].input.Attributes.FifoTopic).toBe("true"); }); }); @@ -178,12 +177,10 @@ describe("TopicsQueuesWkflw", () => { ); await topicsQueuesWkflw.createQueues(); - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access expect(SQSClientMock.send.mock.calls[0][0].input.QueueName).toBe( "queue-one.fifo", ); - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access expect(SQSClientMock.send.mock.calls[2][0].input.QueueName).toBe( "queue-two.fifo", ); @@ -224,7 +221,6 @@ describe("TopicsQueuesWkflw", () => { ).toBe(true); expect( - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access SQSClientMock.send.mock.calls[0][0].input.Attributes.Policy, ).toBeTruthy(); @@ -234,7 +230,6 @@ describe("TopicsQueuesWkflw", () => { ).toBe(true); expect( - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access SQSClientMock.send.mock.calls[1][0].input.Attributes.Policy, ).toBeTruthy(); }); @@ -285,20 +280,17 @@ describe("TopicsQueuesWkflw", () => { SNSClientMock.send.mock.calls[index][0] instanceof SubscribeCommand, ).toBe(true); - expect( - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - SNSClientMock.send.mock.calls[index][0].input.TopicArn, - ).toBe(topicsQueuesWkflw.topicArn); + expect(SNSClientMock.send.mock.calls[index][0].input.TopicArn).toBe( + topicsQueuesWkflw.topicArn, + ); - expect( - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - SNSClientMock.send.mock.calls[index][0].input.Protocol, - ).toBe("sqs"); + expect(SNSClientMock.send.mock.calls[index][0].input.Protocol).toBe( + "sqs", + ); - expect( - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - SNSClientMock.send.mock.calls[index][0].input.Endpoint, - ).toBe(queue.queueArn); + expect(SNSClientMock.send.mock.calls[index][0].input.Endpoint).toBe( + queue.queueArn, + ); }); }); }); @@ -365,12 +357,10 @@ describe("TopicsQueuesWkflw", () => { await topicsQueuesWkflw.publishMessages(); - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access expect(PrompterMock.input.mock.calls[1][0]).toEqual({ message: MESSAGES.groupIdPrompt, }); - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access expect(SNSClientMock.send.mock.calls[0][0].input.MessageGroupId).toBe( "group-id", ); @@ -393,7 +383,6 @@ describe("TopicsQueuesWkflw", () => { await topicsQueuesWkflw.publishMessages(); - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access expect(PrompterMock.input.mock.calls[1]).toBeUndefined(); }); @@ -423,13 +412,11 @@ describe("TopicsQueuesWkflw", () => { await topicsQueuesWkflw.publishMessages(); - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access expect(PrompterMock.input.mock.calls[2][0]).toEqual({ message: MESSAGES.deduplicationIdPrompt, }); expect( - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access SNSClientMock.send.mock.calls[0][0].input.MessageDeduplicationId, ).toBe("dedup-id"); }); @@ -459,11 +446,9 @@ describe("TopicsQueuesWkflw", () => { await topicsQueuesWkflw.publishMessages(); - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access expect(PrompterMock.input.mock.calls[2]).toBeUndefined(); expect( - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access SNSClientMock.send.mock.calls[0][0].input.MessageDeduplicationId, ).toBeUndefined(); }); @@ -492,7 +477,6 @@ describe("TopicsQueuesWkflw", () => { await topicsQueuesWkflw.publishMessages(); - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access expect(PrompterMock.checkbox.mock.calls[0][0]).toEqual({ message: MESSAGES.messageAttributesPrompt, choices: [ @@ -504,7 +488,6 @@ describe("TopicsQueuesWkflw", () => { }); expect( - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access SNSClientMock.send.mock.calls[0][0].input.MessageAttributes, ).toEqual({ tone: { @@ -573,11 +556,9 @@ describe("TopicsQueuesWkflw", () => { await topicsQueuesWkflw.receiveAndDeleteMessages(); expect(LoggerMock.log.mock.calls.length).toBe(2); - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access expect(LoggerMock.log.mock.calls[0][0]).toBe( "The following messages were received by the SQS queue 'queue-1'.", ); - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access expect(LoggerMock.log.mock.calls[1][0]).toBe( "The following messages were received by the SQS queue 'queue-2'.", ); @@ -605,7 +586,6 @@ describe("TopicsQueuesWkflw", () => { await topicsQueuesWkflw.receiveAndDeleteMessages(); expect( - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access SQSClientMock.send.mock.calls[1][0].input.Entries[0].ReceiptHandle, ).toBe("123"); }); diff --git a/javascriptv3/example_code/glacier/src/createVault.ts b/javascriptv3/example_code/glacier/src/createVault.ts index a3b1cd98ca6..3620544065d 100644 --- a/javascriptv3/example_code/glacier/src/createVault.ts +++ b/javascriptv3/example_code/glacier/src/createVault.ts @@ -1,6 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/* eslint-disable -- This file existed pre-eslint configuration. Fix the next time the file is touched. */ /* ABOUT THIS NODE.JS EXAMPLE: This example works with the AWS SDK for JavaScript version 3 (v3), diff --git a/javascriptv3/example_code/glacier/src/libs/glacierClient.js b/javascriptv3/example_code/glacier/src/libs/glacierClient.js index 822bb19be21..806e50016b4 100644 --- a/javascriptv3/example_code/glacier/src/libs/glacierClient.js +++ b/javascriptv3/example_code/glacier/src/libs/glacierClient.js @@ -1,6 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/* eslint-disable -- This file existed pre-eslint configuration. Fix the next time the file is touched. */ /* ABOUT THIS NODE.JS EXAMPLE: This example works with the AWS SDK for JavaScript version 3 (v3), diff --git a/javascriptv3/example_code/glacier/src/uploadArchive.ts b/javascriptv3/example_code/glacier/src/uploadArchive.ts index f9ca2ddb843..ca95bb884bf 100644 --- a/javascriptv3/example_code/glacier/src/uploadArchive.ts +++ b/javascriptv3/example_code/glacier/src/uploadArchive.ts @@ -1,6 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/* eslint-disable -- This file existed pre-eslint configuration. Fix the next time the file is touched. */ /* ABOUT THIS NODE.JS EXAMPLE: This example works with the AWS SDK for JavaScript version 3 (v3), diff --git a/javascriptv3/example_code/glue/tests/glue-actions.integration.test.js b/javascriptv3/example_code/glue/tests/glue-actions.integration.test.js index 9bbe72ad531..930c84fcfac 100644 --- a/javascriptv3/example_code/glue/tests/glue-actions.integration.test.js +++ b/javascriptv3/example_code/glue/tests/glue-actions.integration.test.js @@ -73,7 +73,6 @@ const createStack = async () => { { StackName: stackName }, ); - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access return getResourceNames(response.reason.Stacks[0]); }; diff --git a/javascriptv3/example_code/medical-imaging/tests/create-delete-datastore.integration.test.js b/javascriptv3/example_code/medical-imaging/tests/create-delete-datastore.integration.test.js index fa8b5e4dcde..bf9866c572e 100644 --- a/javascriptv3/example_code/medical-imaging/tests/create-delete-datastore.integration.test.js +++ b/javascriptv3/example_code/medical-imaging/tests/create-delete-datastore.integration.test.js @@ -35,7 +35,6 @@ describe("createDatastore/deleteDatastore", () => { let found = false; for (const datastore of listDatastoresCommandOutput) { if (datastore.datastoreId === datastoreID) { - // eslint-disable-line found = true; break; } diff --git a/javascriptv3/example_code/medical-imaging/tests/hlth-img-deploy.unit.test.js b/javascriptv3/example_code/medical-imaging/tests/hlth-img-deploy.unit.test.js index 2b4c35d254d..9bc209f28fc 100644 --- a/javascriptv3/example_code/medical-imaging/tests/hlth-img-deploy.unit.test.js +++ b/javascriptv3/example_code/medical-imaging/tests/hlth-img-deploy.unit.test.js @@ -23,7 +23,6 @@ vi.doMock("@aws-doc-sdk-examples/lib/scenario/index.js", async () => { ...actual, ScenarioInput: vi.fn().mockImplementation(() => ({ skipWhen(fn) { - // eslint-disable-next-line this.skip = fn; return this; }, diff --git a/javascriptv3/example_code/s3/scenarios/object-locking/repl.steps.unit.test.js b/javascriptv3/example_code/s3/scenarios/object-locking/repl.steps.unit.test.js index 6c6afc82835..c4796bb81a6 100644 --- a/javascriptv3/example_code/s3/scenarios/object-locking/repl.steps.unit.test.js +++ b/javascriptv3/example_code/s3/scenarios/object-locking/repl.steps.unit.test.js @@ -1,6 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/* eslint-disable -- This file existed pre-eslint configuration. Fix the next time the file is touched. */ import { describe, it, expect, vi, beforeEach } from "vitest"; import * as Scenarios from "@aws-doc-sdk-examples/lib/scenario/index.js"; diff --git a/javascriptv3/example_code/ses/tests/send-bulk-templated-email.integration.test.js b/javascriptv3/example_code/ses/tests/send-bulk-templated-email.integration.test.js index 4478b5a69ae..0a87b85887a 100644 --- a/javascriptv3/example_code/ses/tests/send-bulk-templated-email.integration.test.js +++ b/javascriptv3/example_code/ses/tests/send-bulk-templated-email.integration.test.js @@ -27,8 +27,6 @@ describe("ses_sendbulktemplatedemail", () => { const result = await run(); expect(result instanceof MessageRejected).toBe(true); if (result instanceof MessageRejected) { - // TODO: MessageRejected isn't typed properly. Remove eslint-disable if type is fixed. - // eslint-disable-next-line expect(result.Error.Message).toContain("Email address is not verified."); } }); diff --git a/javascriptv3/example_code/ses/tests/send-email.integration.test.js b/javascriptv3/example_code/ses/tests/send-email.integration.test.js index 1781b97116c..1dbfd489ecf 100644 --- a/javascriptv3/example_code/ses/tests/send-email.integration.test.js +++ b/javascriptv3/example_code/ses/tests/send-email.integration.test.js @@ -10,8 +10,6 @@ describe("ses_sendemail", () => { const result = await run(); expect(result instanceof MessageRejected).toBe(true); if (result instanceof MessageRejected) { - // TODO: MessageRejected isn't typed properly. Remove eslint-disable if type is fixed. - // eslint-disable-next-line expect(result.Error.Message).toContain("Email address is not verified."); } }); diff --git a/javascriptv3/example_code/ses/tests/send-templated-email.integration.test.js b/javascriptv3/example_code/ses/tests/send-templated-email.integration.test.js index 8a32e633658..3decf7f7121 100644 --- a/javascriptv3/example_code/ses/tests/send-templated-email.integration.test.js +++ b/javascriptv3/example_code/ses/tests/send-templated-email.integration.test.js @@ -27,8 +27,6 @@ describe("ses_sendbulktemplatedemail", () => { const result = await run(); expect(result instanceof MessageRejected).toBe(true); if (result instanceof MessageRejected) { - // TODO: MessageRejected isn't typed properly. Remove eslint-disable if type is fixed. - // eslint-disable-next-line expect(result.Error.Message).toContain("Email address is not verified."); } });