Switch to double quotes and reformat codebase with Biome

This commit is contained in:
Mohamed Boudra
2026-03-21 20:22:15 +07:00
parent ab40786882
commit f6579dbeb4
805 changed files with 38132 additions and 40175 deletions
+8 -11
View File
@@ -4,24 +4,21 @@
* Outputs only ID fields, one per line. Useful for scripting and pipelines.
*/
import type { AnyCommandResult, OutputOptions } from './types.js'
import type { AnyCommandResult, OutputOptions } from "./types.js";
/** Extract ID from item using schema definition */
function getId<T>(item: T, idField: keyof T | ((item: T) => string)): string {
if (typeof idField === 'function') {
return idField(item)
if (typeof idField === "function") {
return idField(item);
}
return String(item[idField])
return String(item[idField]);
}
/** Render command result in quiet mode (IDs only) */
export function renderQuiet<T>(
result: AnyCommandResult<T>,
_options: OutputOptions
): string {
if (result.type === 'single') {
return getId(result.data, result.schema.idField)
export function renderQuiet<T>(result: AnyCommandResult<T>, _options: OutputOptions): string {
if (result.type === "single") {
return getId(result.data, result.schema.idField);
} else {
return result.data.map((item) => getId(item, result.schema.idField)).join('\n')
return result.data.map((item) => getId(item, result.schema.idField)).join("\n");
}
}