Skip to content

Commit

Permalink
chore: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
harlan-zw committed Jan 23, 2024
1 parent 6149d89 commit a2102d5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
11 changes: 6 additions & 5 deletions packages/core/src/puppeteer/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,12 +183,13 @@ export async function createUnlighthouseWorker(tasks: Record<UnlighthouseTask, T
// remove duplicates, less sorting
routes = uniqBy(routes, 'path')

const sortedRoutes = sortBy(routes, // we're sort all routes by their route name if provided, otherwise use the path (r) => {
if (resolvedConfig.discovery && r.definition)
return get(r, resolvedConfig.client.groupRoutesKey.replace('route.', ''))
// we're sort all routes by their route name if provided, otherwise use the path
const sortedRoutes = sortBy(routes, (r) => {
if (resolvedConfig.discovery && r.definition)
return get(r, resolvedConfig.client.groupRoutesKey.replace('route.', ''))

return r.path
}, )
return r.path
})
sortedRoutes.forEach(route => queueRoute(route))
}

Expand Down
1 change: 1 addition & 0 deletions packages/core/test/robots.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ Allow: /wiki/
"/mod/.*",
],
"include": [
"/*",
"/$.*",
"/wiki/.*",
],
Expand Down

0 comments on commit a2102d5

Please sign in to comment.