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 Font Awesome's faSparkles and fa-sparkles in sparkle-icon (#270)
Papito0849c774630fb46
diff --git a/skills/unslop-anything/scripts/detect.js b/skills/unslop-anything/scripts/detect.jsindex cc543bd..b8840a4 100644--- a/skills/unslop-anything/scripts/detect.js+++ b/skills/unslop-anything/scripts/detect.js@@ -1044,7 +1044,7 @@ const rules = [// when the literal is exactly that symbol; substrings and apostrophes// inside longer text stay quiet.const symbol = /^(?:sparkles?(?:\.[a-z0-9._-]+)?|wand\.and\.(?:stars|sparkles)(?:\.[a-z0-9._-]+)?|[a-z0-9-]+:sparkles?|i-[a-z0-9-]+-sparkles?|wand-magic-sparkles)$/;- const re = /\bauto_awesome\b|\bAutoAwesome(?:Outlined|Rounded|Sharp|TwoTone)?(?:Icon)?\b|\bSparkles\b|\bSparklesIcon\b|\bSparkle\b|\bSparkleIcon\b|\bIconSparkles\b|\bWandSparkles\b|\bWandSparklesIcon\b|✨|\b(?:Hi(?:Outline|Mini)?|Lu|Tb|Pi|Bs|Io|Ri)Sparkles?(?:Fill|Line|Outline|Sharp|Bold|Duotone|Light|Thin)?\b|\bRiSparkling(?:2)?(?:Fill|Line)?\b|\bMd(?:Outline|Round|Sharp|TwoTone)?AutoAwesome\b|\bfaWandMagicSparkles\b|(?<![\w-])fa-wand-magic-sparkles(?![\w-])|(?<![\w-])ri-sparkling(?:-2)?-(?:line|fill)(?![\w-])/;+ const re = /\bauto_awesome\b|\bAutoAwesome(?:Outlined|Rounded|Sharp|TwoTone)?(?:Icon)?\b|\bSparkles\b|\bSparklesIcon\b|\bSparkle\b|\bSparkleIcon\b|\bIconSparkles\b|\bWandSparkles\b|\bWandSparklesIcon\b|✨|\b(?:Hi(?:Outline|Mini)?|Lu|Tb|Pi|Bs|Io|Ri)Sparkles?(?:Fill|Line|Outline|Sharp|Bold|Duotone|Light|Thin)?\b|\bRiSparkling(?:2)?(?:Fill|Line)?\b|\bMd(?:Outline|Round|Sharp|TwoTone)?AutoAwesome\b|\bfa(?:WandMagic)?Sparkles\b|(?<![\w-])fa-(?:wand-magic-)?sparkles(?![\w-])|(?<![\w-])ri-sparkling(?:-2)?-(?:line|fill)(?![\w-])/;const hits = [...matches(re, code)].map((m) => m.index);for (const literal of stringLiterals(code, stack)) {diff --git a/test/detect.test.js b/test/detect.test.jsindex d21e5d0..a426ef9 100644--- a/test/detect.test.js+++ b/test/detect.test.js@@ -1982,6 +1982,17 @@ test("sparkle-icon flags Font Awesome's wand-magic-sparkles, not the plain wand"assert.deepStrictEqual(sparkleLines('<FontAwesomeIcon icon="wand-magic" />\n'), []);});+test("sparkle-icon flags Font Awesome's faSparkles and fa-sparkles (issue #267)", () => {+ const sparkleLines = (src) => scanSource(src, "Ai.tsx").filter((f) => f.rule === "sparkle-icon").map((f) => f.line);+ assert.deepStrictEqual(sparkleLines('import { faSparkles } from "@fortawesome/pro-solid-svg-icons";\n'), [1]);+ assert.deepStrictEqual(sparkleLines('<i className="fa-solid fa-sparkles" />\n'), [1]);+ assert.deepStrictEqual(sparkleLines('<i class="fa-sparkles text-lg"></i>\n'), [1]);+ assert.deepStrictEqual(sparkleLines('import { faStar } from "@fortawesome/free-solid-svg-icons";\n'), []);+ assert.deepStrictEqual(sparkleLines('<i className="fa-solid fa-star" />\n'), []);+ assert.deepStrictEqual(sparkleLines('const copy = "magic sparkles in the sky";\n'), []);+ assert.deepStrictEqual(sparkleLines('<i className="fa-solid fa-wand-magic-sparkles" />\n'), [1]);+});+test("blankComments keeps slashes inside Swift raw strings and still finds later symbols", () => {const src = ['let label = #"A "// B"#',