Your app looks AI-generated. Vincent Van Gogh noticed. An agent skill that finds and fixes AI-looking UI and UX in mobile apps, web apps, and websites.
JavaScript accessibilityagent-skillsagent-skills-toolsagentsagentskillsai-slopclaudeclaude-codeclaude-skillsexpoflutterfrontendionicjetpack-composemobilereact-nativeswiftuiuiuxvibe-coding
fix(detect): catch Heroicons Bars3Icon and Tabler IconMenu2 in drawer-nav (#211)
susheelg1197cca46210b6e6
diff --git a/skills/unslop-anything/scripts/detect.js b/skills/unslop-anything/scripts/detect.jsindex a39fd93..5f77506 100644--- a/skills/unslop-anything/scripts/detect.js+++ b/skills/unslop-anything/scripts/detect.js@@ -1175,7 +1175,7 @@ const rules = [message: "Hamburger menu or navigation drawer. It hides the top destinations behind a tap.",fix: "Ask first. Use tabs for three to five peer destinations; keep a drawer only for many destinations or a large-screen rail.",find({ code }) {- const re = /["']line\.(?:3\.horizontal|horizontal\.3)["']|\bIcons\.(?:Default\.|Filled\.|Outlined\.|Rounded\.|Sharp\.)?Menu\b|\bIcons\.menu(?:_rounded|_outlined|_sharp)?\b|name=["']menu(?:-outline|-sharp)?["']|\bcreateDrawerNavigator\b|from\s+["']expo-router\/drawer["']|\bModalNavigationDrawer\b|\bdrawer:\s*(?:const\s+)?\w*Drawer\b|<ion-menu\b/;+ const re = /["']line\.(?:3\.horizontal|horizontal\.3)["']|\bIcons\.(?:Default\.|Filled\.|Outlined\.|Rounded\.|Sharp\.)?Menu\b|\bIcons\.menu(?:_rounded|_outlined|_sharp)?\b|name=["']menu(?:-outline|-sharp)?["']|\bcreateDrawerNavigator\b|from\s+["']expo-router\/drawer["']|\bModalNavigationDrawer\b|\bdrawer:\s*(?:const\s+)?\w*Drawer\b|<ion-menu\b|\bBars3(?:BottomLeft|BottomRight|CenterLeft)?Icon\b|\bIconMenu2\b/;const first = matches(re, code).next();return first.done ? [] : [first.value.index];},diff --git a/test/detect.test.js b/test/detect.test.jsindex dbc07c7..b3d631b 100644--- a/test/detect.test.js+++ b/test/detect.test.js@@ -1799,6 +1799,18 @@ test("drawer-nav catches every style of the hamburger icon (issue #146)", () =>assert.deepStrictEqual(lines('<Ionicons name="menu-sharp-outline" />\n', "Header.tsx"), []);});+test("drawer-nav catches Heroicons Bars3Icon and Tabler IconMenu2, not dropdown menus or overflow icons", () => {+ const lines = (src, file = "Header.tsx") => scanSource(src, file).filter((f) => f.rule === "drawer-nav").map((f) => [f.line, f.severity]);+ // Issue #204: the repro. The rule reports the first hit in a file.+ const repro = 'import { Bars3Icon } from "react-native-heroicons/outline";\nimport { IconMenu2 } from "@tabler/icons-react-native";\n\nexport function Header() {\n return <Bars3Icon size={24} />;\n}\n';+ assert.deepStrictEqual(lines(repro), [[1, "noticeable"]]);+ for (const icon of ["Bars3Icon", "Bars3BottomLeftIcon", "IconMenu2"]) {+ assert.deepStrictEqual(lines(`<${icon} size={24} />\n`).map(([line]) => line), [1], icon);+ }+ assert.deepStrictEqual(lines('import Menu from "@mui/material/Menu";\n<Menu open={open} />\n'), []);+ assert.deepStrictEqual(lines("<EllipsisVerticalIcon size={24} />\n"), []);+});+test("clickable-div flags Angular (click) and Alpine x-on:click handlers", () => {const rulesFor = (src) => scanSource(src, "a.html").map((f) => f.rule);assert.deepStrictEqual(rulesFor('<div class="card" (click)="open()">Details</div>\n'), ["clickable-div"]);