chore: apply core lint cleanups

This commit is contained in:
Peter Steinberger
2026-04-23 05:28:11 +01:00
parent cc9dcd3d69
commit 596b88986d
41 changed files with 85 additions and 82 deletions

View File

@@ -8,7 +8,7 @@ import {
} from "./routed-command-definitions.js";
export type RouteSpec = {
match: (path: string[]) => boolean;
matches: (path: string[]) => boolean;
loadPlugins?: boolean | ((argv: string[]) => boolean);
run: (argv: string[]) => Promise<boolean>;
};
@@ -25,7 +25,7 @@ function createParsedRoute(params: {
definition: AnyRoutedCommandDefinition;
}): RouteSpec {
return {
match: (path) =>
matches: (path) =>
matchesCommandPath(path, params.entry.commandPath, { exact: params.entry.exact }),
loadPlugins: params.entry.route?.preloadPlugins
? createCommandLoadPlugins(params.entry.commandPath)

View File

@@ -4,7 +4,7 @@ export type { RouteSpec } from "./route-specs.js";
export function findRoutedCommand(path: string[]): RouteSpec | null {
for (const route of routedCommands) {
if (route.match(path)) {
if (route.matches(path)) {
return route;
}
}