Files
pbakaus_impeccable/tests/fixtures/antipatterns/external-styles.css
T
Paul BakausandClaude Opus 4.6 32a54138bb Add deep detection via jsdom and URL scanning via Puppeteer
Three detection tiers:
- file/dir (default): fast regex scan, zero dependencies
- file + --deep: jsdom computed styles, resolves linked local stylesheets
  by inlining <link rel="stylesheet"> content before parsing
- URL (https://...): auto-launches Puppeteer for full browser rendering,
  handles CDN stylesheets, JS-rendered content, everything

New exports: detectAntiPatternsDeep(), detectAntiPatternsUrl()
jsdom added as devDependency; puppeteer remains optional (npx cache).

TDD: linked-stylesheet fixture demonstrates the gap — regex finds 0
border issues, --deep correctly catches side-tab and top-accent from
the external CSS file.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 11:07:47 -07:00

34 lines
748 B
CSS

/* External stylesheet that applies anti-pattern styles */
/* Side-tab via external class */
.external-side-tab {
background: white;
padding: 1rem;
border-radius: 12px;
border-left: 4px solid #3b82f6;
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
/* Top border accent via external class */
.external-top-accent {
background: white;
padding: 1rem;
border-radius: 12px;
border-top: 3px solid #8b5cf6;
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
/* Overused font from external stylesheet */
.external-inter {
font-family: 'Inter', sans-serif;
}
/* Clean card — should NOT flag */
.external-clean {
background: white;
padding: 1rem;
border-radius: 12px;
border: 1px solid #e5e7eb;
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}