Skip to content

Commit

Permalink
lint: toString in template expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
legobeat committed Sep 29, 2023
1 parent 00ec011 commit 84b5d51
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/release-specification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,9 @@ export async function validateReleaseSpecification(
`${JSON.stringify(
versionSpecifierOrDirective,
)} is not a valid version specifier for package "${packageName}"`,
`("${packageName}" is at a greater version "${project.workspacePackages[packageName].validatedManifest.version}")`,
`("${packageName}" is at a greater version "${project.workspacePackages[
packageName
].validatedManifest.version.toString()}")`,
],
lineNumber,
});
Expand All @@ -312,7 +314,9 @@ export async function validateReleaseSpecification(
const itemPrefix = '* ';

if (error.lineNumber === undefined) {
return `${itemPrefix}${error.message}`;
return Array.isArray(error.message)
? `${itemPrefix}${error.message.toString()}`
: `${itemPrefix}${error.message}`;
}

const lineNumberPrefix = `Line ${error.lineNumber}: `;
Expand Down

0 comments on commit 84b5d51

Please sign in to comment.