Skip to content

Commit 253ff48

Browse files
committed
fix(plugin-typescript): remove useless async from refs helpers
1 parent 93bbd7a commit 253ff48

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

e2e/plugin-typescript-e2e/mocks/fixtures/default-setup/code-pushup.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default {
1010
{
1111
slug: 'typescript-quality',
1212
title: 'Typescript',
13-
refs: await getCategoryRefsFromGroups(),
13+
refs: getCategoryRefsFromGroups(),
1414
},
1515
],
1616
} satisfies CoreConfig;

packages/plugin-typescript/src/lib/utils.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ export function getAudits(
7878
* @param opt TSPluginOptions
7979
* @returns The array of category references
8080
*/
81-
export async function getCategoryRefsFromGroups(
81+
export function getCategoryRefsFromGroups(
8282
opt?: TypescriptPluginOptions,
83-
): Promise<CategoryRef[]> {
83+
): CategoryRef[] {
8484
return getGroups(opt).map(({ slug }) => ({
8585
plugin: TYPESCRIPT_PLUGIN_SLUG,
8686
slug,
@@ -94,9 +94,9 @@ export async function getCategoryRefsFromGroups(
9494
* @param opt TSPluginOptions
9595
* @returns The array of category references
9696
*/
97-
export async function getCategoryRefsFromAudits(
97+
export function getCategoryRefsFromAudits(
9898
opt?: TypescriptPluginOptions,
99-
): Promise<CategoryRef[]> {
99+
): CategoryRef[] {
100100
return AUDITS.filter(filterAuditsBySlug(opt?.onlyAudits)).map(({ slug }) => ({
101101
plugin: TYPESCRIPT_PLUGIN_SLUG,
102102
slug,
@@ -110,13 +110,13 @@ export const CATEGORY_MAP: Record<string, CategoryConfig> = {
110110
slug: 'type-safety',
111111
title: 'Type Safety',
112112
description: 'TypeScript diagnostics and type-checking errors',
113-
refs: await getCategoryRefsFromGroups(),
113+
refs: getCategoryRefsFromGroups(),
114114
},
115115
'bug-prevention': {
116116
slug: 'bug-prevention',
117117
title: 'Bug prevention',
118118
description: 'Type checks that find **potential bugs** in your code.',
119-
refs: await getCategoryRefsFromGroups({
119+
refs: getCategoryRefsFromGroups({
120120
onlyAudits: [
121121
'syntax-errors',
122122
'semantic-errors',
@@ -131,7 +131,7 @@ export const CATEGORY_MAP: Record<string, CategoryConfig> = {
131131
title: 'Miscellaneous',
132132
description:
133133
'Errors that do not bring any specific value to the developer, but are still useful to know.',
134-
refs: await getCategoryRefsFromGroups({
134+
refs: getCategoryRefsFromGroups({
135135
onlyAudits: ['unknown-codes', 'declaration-and-language-service-errors'],
136136
}),
137137
},

0 commit comments

Comments
 (0)