diff --git a/src/reporters/compact.ts b/src/reporters/compact.ts index 4702b65f4..e1f5b2acf 100644 --- a/src/reporters/compact.ts +++ b/src/reporters/compact.ts @@ -18,7 +18,7 @@ export default ({ report, issues, isShowProgress }: ReporterOptions) => { const issuesForType = isSet ? Array.from(issues[reportType] as IssueSet) : reportType === 'duplicates' - ? Object.values(issues[reportType]).map(Object.values).flat() + ? Object.values(issues[reportType]).flatMap(Object.values) : Object.values(issues[reportType] as IssueRecords).map(issues => { const items = Object.values(issues); return { ...items[0], symbols: items.map(issue => issue.symbol) }; diff --git a/src/reporters/json.ts b/src/reporters/json.ts index a6cf86531..2b6cf6d31 100644 --- a/src/reporters/json.ts +++ b/src/reporters/json.ts @@ -40,7 +40,7 @@ export default async ({ report, issues, options }: ReporterOptions) => { const codeownersFilePath = resolve(opts.codeowners ?? '.github/CODEOWNERS'); const codeownersEngine = isFile(codeownersFilePath) && OwnershipEngine.FromCodeownersFile(codeownersFilePath); - const flatten = (issues: IssueRecords): Issue[] => Object.values(issues).map(Object.values).flat(); + const flatten = (issues: IssueRecords): Issue[] => Object.values(issues).flatMap(Object.values); const initRow = (filePath: string) => { const file = relative(filePath);