From fede6af8e444e1476f8dd3af19e2b7074d5544a2 Mon Sep 17 00:00:00 2001 From: "Ben Scholzen (DASPRiD)" Date: Wed, 15 May 2024 13:35:05 +0200 Subject: [PATCH] style: fix biome errors --- skeleton/base/update-provider.js | 2 +- skeleton/tsconfig.json | 18 ++++++++---------- src/aws-stack.ts | 4 +++- src/bitbucket.ts | 4 +++- src/cli.ts | 8 ++++---- src/synth.ts | 6 +++--- 6 files changed, 22 insertions(+), 20 deletions(-) diff --git a/skeleton/base/update-provider.js b/skeleton/base/update-provider.js index 96048dc..95f0f11 100644 --- a/skeleton/base/update-provider.js +++ b/skeleton/base/update-provider.js @@ -1,4 +1,4 @@ -import { rmSync } from "fs"; +import { rmSync } from "node:fs"; import { execa } from "execa"; await execa("pnpm", ["exec", "cdktf", "get", "--output=./src/gen"]).pipeStdout(process.stdout); diff --git a/skeleton/tsconfig.json b/skeleton/tsconfig.json index cb654f8..282272e 100644 --- a/skeleton/tsconfig.json +++ b/skeleton/tsconfig.json @@ -1,12 +1,10 @@ { - "extends": ["@tsconfig/node20/tsconfig.json"], - "compilerOptions": { - "strict": true, - "noImplicitAny": true, - "sourceMap": true, - "outDir": "dist" - }, - "include": [ - "src/**/*" - ] + "extends": ["@tsconfig/node20/tsconfig.json"], + "compilerOptions": { + "strict": true, + "noImplicitAny": true, + "sourceMap": true, + "outDir": "dist" + }, + "include": ["src/**/*"] } diff --git a/src/aws-stack.ts b/src/aws-stack.ts index a1482d6..52aa35a 100644 --- a/src/aws-stack.ts +++ b/src/aws-stack.ts @@ -60,7 +60,9 @@ class AwsStack extends cdk.Stack { } class Producer implements ICloudAssemblyDirectoryProducer { - public constructor(private readonly region: string) {} + public constructor(private readonly region: string) { + // Intentionally left empty + } public async produce(context: AppProps["context"]): Promise { const app = new App({ context }); diff --git a/src/bitbucket.ts b/src/bitbucket.ts index f3c591e..e9bc1b3 100644 --- a/src/bitbucket.ts +++ b/src/bitbucket.ts @@ -23,7 +23,9 @@ export class BitBucketClient { private readonly accessToken: string, private readonly workspace: string, private readonly repoSlug: string, - ) {} + ) { + // Intentionally left empty + } public async getRepositoryUuid(): Promise { const response = await fetch( diff --git a/src/cli.ts b/src/cli.ts index f3e41f4..47d6dfb 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -1,8 +1,9 @@ #!/usr/bin/env node -import { randomUUID } from "crypto"; -import path from "path"; -import { fileURLToPath } from "url"; +import { randomUUID } from "node:crypto"; +import { readFile, stat } from "node:fs/promises"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; import { IAM } from "@aws-sdk/client-iam"; import { S3 } from "@aws-sdk/client-s3"; import { STS } from "@aws-sdk/client-sts"; @@ -11,7 +12,6 @@ import { ListrEnquirerPromptAdapter } from "@listr2/prompt-adapter-enquirer"; import { getAccessToken } from "@soliantconsulting/bitbucket-cloud-cli-auth"; import camelcase from "camelcase"; import type { ExecaReturnValue } from "execa"; -import { readFile, stat } from "fs/promises"; import { Listr, ListrLogLevels, ListrLogger } from "listr2"; import meow from "meow"; import semver from "semver/preload.js"; diff --git a/src/synth.ts b/src/synth.ts index b1f9ce5..e9fedb9 100644 --- a/src/synth.ts +++ b/src/synth.ts @@ -1,7 +1,7 @@ -import path from "path"; -import { fileURLToPath } from "url"; +import { cp, mkdir, readFile, rename, writeFile } from "node:fs/promises"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; import merge from "deepmerge"; -import { cp, mkdir, readFile, rename, writeFile } from "fs/promises"; import { glob } from "glob"; import Handlebars from "handlebars"; import type { PackageJson, TSConfig } from "pkg-types";