Skip to content

Commit

Permalink
when the linter won't run locally....
Browse files Browse the repository at this point in the history
  • Loading branch information
AjaniBilby committed Nov 17, 2023
1 parent 55b7bfa commit 599a398
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/builders/sitemap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ async function IngestRoutes(params: GetSitemapParams) {
return (await Promise.all(entriesPromise)).flat().filter(truthy);
} else {
const entriesPromise = routes.map(route =>
getEntry({ route, config, context, request
}));
getEntry({ route, config, context, request })
);

return (await Promise.all(entriesPromise)).flat().filter(truthy);
}
Expand Down
12 changes: 7 additions & 5 deletions src/utils/__tests__/rate-limiter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ describe('RateLimiter', () => {
};

const tasks = Array(5)
.fill(null).map(async () => {
.fill(null)
.map(async () => {
await limit.allocate();

increaseActive();
Expand All @@ -36,7 +37,7 @@ describe('RateLimiter', () => {
await limit.allocate();

// Make each task successively longer to ensure execution completion order
await new Promise(resolve => setTimeout(resolve, 100 + 500 * id));
await new Promise(resolve => setTimeout(resolve, 100));

taskOrder.push(id);
limit.free();
Expand Down Expand Up @@ -64,9 +65,10 @@ describe('RateLimiter', () => {

limit.free();
};
await Promise.all(Array(100)
.fill(0)
.map(_ => mockTask())
await Promise.all(
Array(100)
.fill(0)
.map(_ => mockTask())

Check warning on line 71 in src/utils/__tests__/rate-limiter.test.ts

View workflow job for this annotation

GitHub Actions / Lint

'_' is defined but never used
);

expect(limit.getProcessing()).toEqual(0);
Expand Down

0 comments on commit 599a398

Please sign in to comment.