Skip to content

Commit

Permalink
chore: prepare for prettier v3 (#818)
Browse files Browse the repository at this point in the history
  • Loading branch information
viceice committed Feb 8, 2024
1 parent 316f92f commit bd7200c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
3 changes: 2 additions & 1 deletion .prettierrc.json
@@ -1,4 +1,5 @@
{
"singleQuote": true,
"trailingComma": "es5"
"trailingComma": "all",
"plugins": ["prettier-plugin-package"]
}
10 changes: 5 additions & 5 deletions src/input.ts
Expand Up @@ -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,
);
}

Expand Down Expand Up @@ -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);
Expand All @@ -117,7 +117,7 @@ class Input {
[
`'${input}' MUST be passed using its input or the '${env}'`,
'environment variable',
].join(' ')
].join(' '),
);
}

Expand Down
6 changes: 3 additions & 3 deletions src/renovate.ts
Expand Up @@ -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()}`,
);
}

Expand Down Expand Up @@ -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`,
);
}
}
Expand Down

0 comments on commit bd7200c

Please sign in to comment.