From bd7200cde89a2d5ad84e6303a667ac72d7d8a4ca Mon Sep 17 00:00:00 2001 From: Michael Kriese Date: Thu, 8 Feb 2024 14:03:56 +0100 Subject: [PATCH] chore: prepare for prettier v3 (#818) --- .prettierrc.json | 3 ++- src/input.ts | 10 +++++----- src/renovate.ts | 6 +++--- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.prettierrc.json b/.prettierrc.json index c1a6f66713..9226685db9 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -1,4 +1,5 @@ { "singleQuote": true, - "trailingComma": "es5" + "trailingComma": "all", + "plugins": ["prettier-plugin-package"] } diff --git a/src/input.ts b/src/input.ts index f048215e48..862175be40 100644 --- a/src/input.ts +++ b/src/input.ts @@ -34,18 +34,18 @@ class Input { this._environmentVariables = new Map( Object.entries(process.env) .filter(([key]) => envRegex.test(key)) - .filter((pair): pair is [string, string] => pair[1] !== undefined) + .filter((pair): pair is [string, string] => pair[1] !== undefined), ); this.token = this.get( this.options.token.input, this.options.token.env, - this.options.token.optional + this.options.token.optional, ); this._configurationFile = this.get( this.options.configurationFile.input, this.options.configurationFile.env, - this.options.configurationFile.optional + this.options.configurationFile.optional, ); } @@ -107,7 +107,7 @@ class Input { private get( input: string, env: string, - optional: boolean + optional: boolean, ): EnvironmentVariable { const fromInput = core.getInput(input); const fromEnv = this._environmentVariables.get(env); @@ -117,7 +117,7 @@ class Input { [ `'${input}' MUST be passed using its input or the '${env}'`, 'environment variable', - ].join(' ') + ].join(' '), ); } diff --git a/src/renovate.ts b/src/renovate.ts index 7f735ddc2b..7573984194 100644 --- a/src/renovate.ts +++ b/src/renovate.ts @@ -28,14 +28,14 @@ class Renovate { const mountPath = path.join(this.configFileMountDir, baseName); dockerArguments.push( `--env ${configurationFile.key}=${mountPath}`, - `--volume ${configurationFile.value}:${mountPath}` + `--volume ${configurationFile.value}:${mountPath}`, ); } if (this.input.mountDockerSocket()) { dockerArguments.push( '--volume /var/run/docker.sock:/var/run/docker.sock', - `--group-add ${this.getDockerGroupId()}` + `--group-add ${this.getDockerGroupId()}`, ); } @@ -109,7 +109,7 @@ class Renovate { !fs.statSync(configurationFile.value).isFile()) ) { throw new Error( - `configuration file '${configurationFile.value}' MUST be an existing file` + `configuration file '${configurationFile.value}' MUST be an existing file`, ); } }