From 5062d0253717561c7b8dd8d2faa477cb7b86783f Mon Sep 17 00:00:00 2001 From: Piers Karsenbarg Date: Wed, 31 Jul 2024 16:50:33 +0100 Subject: [PATCH] Fixing linting errors --- aws-ts-multi-language-lambda/config.ts | 10 ++++++---- aws-ts-multi-language-lambda/index.ts | 13 +++++++------ 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/aws-ts-multi-language-lambda/config.ts b/aws-ts-multi-language-lambda/config.ts index 3e0629101..d266c7e9a 100644 --- a/aws-ts-multi-language-lambda/config.ts +++ b/aws-ts-multi-language-lambda/config.ts @@ -1,3 +1,5 @@ +// Copyright 2016-2024, Pulumi Corporation. All rights reserved. + import { Runtime } from "@pulumi/aws/lambda"; interface Config { @@ -15,16 +17,16 @@ export const lambdaSetup: Config[] = [ { language: "go", handler: "bootstrap", - runtime: Runtime.CustomAL2023 + runtime: Runtime.CustomAL2023, }, { language: "typescript", handler: "index.handler", - runtime: Runtime.NodeJS20dX + runtime: Runtime.NodeJS20dX, }, { language: "python", handler: "lambda.handler", - runtime: Runtime.Python3d12 - } + runtime: Runtime.Python3d12, + }, ]; diff --git a/aws-ts-multi-language-lambda/index.ts b/aws-ts-multi-language-lambda/index.ts index 99c607ac0..bb8ee34f6 100644 --- a/aws-ts-multi-language-lambda/index.ts +++ b/aws-ts-multi-language-lambda/index.ts @@ -1,7 +1,9 @@ -import * as pulumi from "@pulumi/pulumi"; +// Copyright 2016-2024, Pulumi Corporation. All rights reserved. + import * as aws from "@pulumi/aws"; import * as dockerBuild from "@pulumi/docker-build"; import { lambdaSetup } from "./config"; +import * as pulumi from "@pulumi/pulumi"; export = async () => { const role = new aws.iam.Role("lambdarole", { @@ -14,8 +16,7 @@ export = async () => { }); const languages = ["dotnet", "go", "python", "typescript"]; - let lambdaNames: {[key: string]: pulumi.Output} = {}; - // let lambdaNames: pulumi.Output[] = []; + const lambdaNames: {[key: string]: pulumi.Output} = {}; lambdaSetup.map((lambda) => { const buildLambdaCode = new dockerBuild.Image( @@ -38,7 +39,7 @@ export = async () => { labels: { created: new Date().getTime().toString(), }, - } + }, ); const fn = new aws.lambda.Function( @@ -53,11 +54,11 @@ export = async () => { runtime: lambda.runtime, handler: lambda.handler, }, - { dependsOn: [buildLambdaCode] } + { dependsOn: [buildLambdaCode] }, ); lambdaNames[`lambdaNames.${lambda.language}`] = fn.name; }); - return lambdaNames + return lambdaNames; };