Skip to content

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.

fix(sparkle-icon): recognize Iconoir Sparks variants (#347)

CloudGPU9a439131796c
diff --git a/skills/unslop-anything/scripts/detect.js b/skills/unslop-anything/scripts/detect.js
index 3e550e9..19efab1 100644
--- a/skills/unslop-anything/scripts/detect.js
+++ b/skills/unslop-anything/scripts/detect.js
@@ -1064,7 +1064,7 @@ const rules = [
// 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)$/;
// Fluent UI names its sparkle SparkleRegular, SparkleFilled, or sized like Sparkle24Regular (#324).
- const re = /\bauto_awesome\b|\bAutoAwesome(?:Outlined|Rounded|Sharp|TwoTone)?(?:Icon)?\b|\bSparkles\b|\bSparklesIcon\b|\bSparkle\b|\bSparkleIcon\b|\bSparkles?FillIcon\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-])|\bBsStars\b|(?<![\w-])bi-stars(?![\w-])|\bSparkle(?:\d{2})?(?:Regular|Filled)\b/;
+ const re = /\bauto_awesome\b|\bAutoAwesome(?:Outlined|Rounded|Sharp|TwoTone)?(?:Icon)?\b|\bSparkles\b|\bSparklesIcon\b|\bSparkle\b|\bSparkleIcon\b|\bSparkles?FillIcon\b|\bSparks(?:Solid)?\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-])|\bBsStars\b|(?<![\w-])bi-stars(?![\w-])|\bSparkle(?:\d{2})?(?:Regular|Filled)\b/;
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.js
index 62e0e6c..e697d83 100644
--- a/test/detect.test.js
+++ b/test/detect.test.js
@@ -2413,6 +2413,20 @@ test("sparkle-icon flags Fluent UI's SparkleRegular, SparkleFilled and their siz
assert.deepStrictEqual(sparkleLines("const Sparkle24 = 24;\n"), []);
});
+test("sparkle-icon recognizes Iconoir's Sparks variants (issue #344)", () => {
+ const source = [
+ 'import { Sparks, SparksSolid } from "iconoir-react";',
+ "",
+ "export const Ask = () => <button><Sparks /> Ask</button>;",
+ "export const Draft = () => <button><SparksSolid /> Draft</button>;",
+ "export const Chart = () => <><Sparkline /><SparksCounter /></>;",
+ ].join("\n");
+ const lines = scanSource(source, "Ask.tsx", { kind: "web" })
+ .filter((finding) => finding.rule === "sparkle-icon")
+ .map((finding) => finding.line);
+ assert.deepStrictEqual([...new Set(lines)], [1, 3, 4]);
+});
+
test("blankComments keeps slashes inside Swift raw strings and still finds later symbols", () => {
const src = [
'let label = #"A "// B"#',