Fix bug where you weren't able to use both the -q and -j flags at the same time #227

Merged
Vylpes merged 17 commits from feature/181-q-json-flags into develop 2024-12-07 22:21:43 +00:00
Showing only changes of commit 3b284484c2 - Show all commits

View file

@ -23,7 +23,8 @@ export default class OutputHelper {
/* eslint-disable @typescript-eslint/no-explicit-any */
private static GetFriendlyObjectText(object: any, output: string, prefix: string = ""): string {
Vylpes marked this conversation as resolved Outdated

[nitpick] The use of 'any' for the object parameter is not ideal. Consider using a more specific type.

[nitpick] The use of 'any' for the object parameter is not ideal. Consider using a more specific type.
for (const key in object) {
Vylpes marked this conversation as resolved Outdated

I don't think I like the way this is done, I think it should be how it was before, but when its actually printed to the terminal it should remove the appended new line

I don't think I like the way this is done, I think it should be how it was before, but when its actually printed to the terminal it should remove the appended new line

Not exactly sure what this means? It appears to be working fine and looks like that to me

Not exactly sure what this means? It appears to be working fine and looks like that to me
if (typeof(object[key]) == "object") return this.GetFriendlyObjectText(object[key], output, `${key}.`);
if (typeof(object[key]) == "object")
return this.GetFriendlyObjectText(object[key], output, `${key}.`);
Vylpes marked this conversation as resolved Outdated

This will add an additional new line at the end of the output which might not look right

This will add an additional new line at the end of the output which might not look right
output += `${prefix}${key} = ${object[key]}\n`;
}
@ -33,7 +34,6 @@ export default class OutputHelper {
private static AppendObject(a: any, b: any, target: string): any {
a[target] = { ...b };
return a;
}
/* eslint-enable @typescript-eslint/no-explicit-any */
}