chore(lint): enable unnecessary type parameter rule

This commit is contained in:
Peter Steinberger
2026-04-18 18:28:20 +01:00
parent 630f2bcabe
commit df525b90f2
94 changed files with 186 additions and 152 deletions

View File

@@ -1,8 +1,4 @@
export function defineCachedValue<T extends object, K extends PropertyKey>(
target: T,
key: K,
create: () => unknown,
): void {
export function defineCachedValue(target: object, key: PropertyKey, create: () => unknown): void {
let cached: unknown;
let ready = false;
Object.defineProperty(target, key, {

View File

@@ -314,6 +314,7 @@ export function createRuntimeChannel(): PluginRuntime["channel"] {
});
return { dispose };
},
// oxlint-disable-next-line typescript/no-unnecessary-type-parameters -- Runtime context values are caller-typed by key.
get: <T = unknown>(params: PluginRuntimeChannelContextKey) => {
const normalized = normalizeRuntimeContextKey(params);
if (!normalized) {

View File

@@ -127,6 +127,7 @@ export function getPluginBoundaryJiti(modulePath: string, loaders: PluginJitiLoa
});
}
// oxlint-disable-next-line typescript/no-unnecessary-type-parameters -- Dynamic plugin boundary loaders use caller-supplied module types.
export function loadPluginBoundaryModuleWithJiti<TModule>(
modulePath: string,
loaders: PluginJitiLoaderCache,
@@ -134,6 +135,7 @@ export function loadPluginBoundaryModuleWithJiti<TModule>(
return getPluginBoundaryJiti(modulePath, loaders)(modulePath) as TModule;
}
// oxlint-disable-next-line typescript/no-unnecessary-type-parameters -- Dynamic plugin boundary loaders use caller-supplied module types.
export function createCachedPluginBoundaryModuleLoader<TModule>(
params: CachedPluginBoundaryLoaderParams,
): () => TModule | null {

View File

@@ -60,6 +60,7 @@ export type PluginRuntimeChannelContextRegistry = {
abortSignal?: AbortSignal;
},
) => { dispose: () => void };
// oxlint-disable-next-line typescript/no-unnecessary-type-parameters -- Runtime context values are caller-typed by key.
get: <T = unknown>(params: PluginRuntimeChannelContextKey) => T | undefined;
watch: (params: {
channelId?: string;