Skip to content

Commit

Permalink
Update TypeScript code formatting for Prettier 3.x compliance
Browse files Browse the repository at this point in the history
This project uses the default Prettier code style for TypeScript code.

The default value for the `trailingComma` configuration setting has been changed from `es5` to `all` in the Prettier
3.0.0 release. This caused the code to no longer be compliant with the new default Prettier code formatting style. The
formatting is hereby updated to the new Prettier style.
  • Loading branch information
per1234 committed Jul 6, 2023
1 parent 4c1a3d1 commit 5ad05be
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ async function fetchVersions(repoToken: string): Promise<string[]> {
const tags: ITaskRef[] =
(
await rest.get<ITaskRef[]>(
"https://api.github.com/repos/go-task/task/git/refs/tags"
"https://api.github.com/repos/go-task/task/git/refs/tags",
)
).result || [];

Expand Down Expand Up @@ -92,7 +92,7 @@ function normalizeVersion(version: string): string {
// Compute an actual version starting from the `version` configuration param.
async function computeVersion(
version: string,
repoToken: string
repoToken: string,
): Promise<string> {
// return if passed version is a valid semver
if (semver.valid(version)) {
Expand All @@ -113,7 +113,7 @@ async function computeVersion(

const allVersions = await fetchVersions(repoToken);
const possibleVersions = allVersions.filter((v) =>
v.startsWith(versionPrefix)
v.startsWith(versionPrefix),
);

const versionMap = new Map();
Expand Down Expand Up @@ -155,7 +155,7 @@ async function downloadRelease(version: string): Promise<string> {
const downloadUrl: string = util.format(
"https://github.com/go-task/task/releases/download/%s/%s",
version,
fileName
fileName,
);
let downloadPath: string | null = null;
try {
Expand Down

0 comments on commit 5ad05be

Please sign in to comment.