Skip to content

Commit

Permalink
docs(cli): create issues even if empty in file-size example
Browse files Browse the repository at this point in the history
  • Loading branch information
matejchalk committed May 23, 2024
1 parent 984efb9 commit 87b5983
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions packages/cli/docs/custom-plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -504,15 +504,13 @@ async function runnerFunction(options: Options): Promise<AuditOutputs> {
// assert file size information with budget
const issues = data.map(({ file, size }) => assertFileSizeInfo(file, size, options.budget));

// add details if issues given
if (issues.length) {
fileSizeAuditOutput = {
...fileSizeAuditOutput,
details: {
issues,
},
};
}
// add issues to details
fileSizeAuditOutput = {
...fileSizeAuditOutput,
details: {
issues,
},
};

return [fileSizeAuditOutput];
}
Expand Down Expand Up @@ -585,7 +583,7 @@ The `report.md` file should contain a similar content like the following:
## Groups

As an optional property a plugin can maintain `groups` as an array of [`Group`s](@TODO).
While [categories](#plugins-and-categories) can score audits across plugins, groups are only targeting audits within a plugin.
While [categories](#categories) can score audits across plugins, groups are only targeting audits within a plugin.
For simple plugins this is not needed but it is beneficial in bigger plugins as audit groups also simplify the configuration.

An audit group maintains:
Expand Down

0 comments on commit 87b5983

Please sign in to comment.