Skip to content

Commit 99277c8

Browse files
committed
refactor: Simplify display name formatting and enhance menu title styling in interactive menu
1 parent cce3e49 commit 99277c8

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

cli/utils/interactive-menu.mjs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export const prepareMenu = (rules) => {
2020
path: rule.path,
2121
fullPath: rule.fullPath,
2222
category: /** @type {"standards" | "test" | "utils"} */ (category),
23-
displayName: `[${category}] ${rule.name}`,
23+
displayName: `${rule.name}`,
2424
selected: false
2525
});
2626
}
@@ -39,8 +39,7 @@ export const prepareMenu = (rules) => {
3939
export const createMenu = ({ title, items, currentIndex, footerLines = [] }) => {
4040
process.stdout.write('\x1B[2J\x1B[0f');
4141
if (title) {
42-
console.info(styleText("white", title));
43-
console.info(styleText("white", '='.repeat(title.length) + '\n'));
42+
console.info(styleText("italic", title + '\n'));
4443
}
4544
items.forEach((item, idx) => {
4645
const isCurrent = idx === currentIndex;
@@ -62,7 +61,7 @@ export const createMenu = ({ title, items, currentIndex, footerLines = [] }) =>
6261
const renderCategoryMenu = (categories, currentIndex) => {
6362
const items = categories.concat(['🌈 Save Rules']);
6463
createMenu({
65-
title: 'Select rules by category',
64+
title: styleText('underline', 'Select rules by category'),
6665
items,
6766
currentIndex,
6867
footerLines: [

0 commit comments

Comments
 (0)