Skip to content

Commit

Permalink
chore: fix typo and remove useless eslint disable
Browse files Browse the repository at this point in the history
  • Loading branch information
adriencaccia committed Sep 18, 2024
1 parent 63cdb16 commit e141567
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/bundleVisualizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,14 @@ async function bundleVisualizer(

const fullZipPath = slsFunction.package?.artifact;
if (fullZipPath === undefined) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
throw new this.serverless.classes.Error(
`🤯 Analyze failed: function ${functionName} was not found`,
);
}
const functionZipName = parse(fullZipPath).base;

options.logging.log.notice(
`⏳ Analyzing function ${functionName} POUWQEPOQUWEPOQUWEOWUE`,
`⏳ Analyzing function ${functionName}`,
'ServerlessAnalyzeBundlePlugin',
);

Expand All @@ -66,7 +65,6 @@ async function bundleVisualizer(
)[0];

if (!metafileName) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
throw new this.serverless.classes.Error(
`🤯 Analyze failed: function ${functionName} metadata was not found`,
);
Expand All @@ -76,7 +74,7 @@ async function bundleVisualizer(
const jsonContent = JSON.parse(textContent) as Metadata;

const fileContent = await visualizer(jsonContent, {
title: `${functionName} function bundle visualizer `,
title: `${functionName} function bundle visualizer`,
template: options.template,
});

Expand Down

0 comments on commit e141567

Please sign in to comment.