Skip to content

Commit 0750d20

Browse files
committed
Fix two lint errors introduced by biome 2.4.10 → 2.4.11 upgrade
biome 2.4.11 (bumped via Dependabot in 5eaae30) promoted two rules in its recommended ruleset: 1. lint/suspicious/noConfusingVoidType (warning → error): `Promise<void[]>` is now an error in generic position. Fixed by returning `undefined` explicitly from the async lambda so `Promise.all` resolves to `Promise<undefined[]>`. 2. assist/source/organizeImports (implicit): Import order in definitionServiceTest.ts was out of alphabetical order after adding memoryQueueConfig and recomputeHandler imports during the recompute refactor. Fixed by running `biome check --write`.
1 parent 9b2c3fd commit 0750d20

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

business/definitionService.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,13 +470,14 @@ export class DefinitionService {
470470
* Invalidate the definition for the identified component. This flushes any caches and pre-computed
471471
* results. The definition will be recomputed on or before the next use.
472472
*/
473-
invalidate(coordinates: EntityCoordinates | EntityCoordinates[]): Promise<void[]> {
473+
invalidate(coordinates: EntityCoordinates | EntityCoordinates[]): Promise<undefined[]> {
474474
const coordinateList = Array.isArray(coordinates) ? coordinates : [coordinates]
475475
return Promise.all(
476476
coordinateList.map(
477477
throat(10, async (coordinates: EntityCoordinates) => {
478478
await this.definitionStore.delete(coordinates)
479479
await this.cache.delete(this._getCacheKey(coordinates))
480+
return undefined
480481
})
481482
)
482483
)

test/business/definitionServiceTest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ import SummaryService from '../../business/summarizer.ts'
1111
import Curation from '../../lib/curation.ts'
1212
import EntityCoordinates from '../../lib/entityCoordinates.ts'
1313
import { setIfValue } from '../../lib/utils.ts'
14-
import FileHarvestStore from '../../providers/stores/fileHarvestStore.ts'
1514
import memoryQueue from '../../providers/recompute/memoryQueueConfig.ts'
1615
import { defaultFactory, delayedFactory } from '../../providers/recompute/recomputeHandler.ts'
16+
import FileHarvestStore from '../../providers/stores/fileHarvestStore.ts'
1717
import validator from '../../schemas/validator.ts'
1818
import { createMockLogger, createSilentLogger } from '../helpers/mockLogger.ts'
1919

0 commit comments

Comments
 (0)