Html-Js-Css-Analyzer is a lightweight Visual Studio Code extension that analyzes class and id usage across HTML, CSS/SCSS and JavaScript/TypeScript files. It reports undefined classes/ids, highlights unused selectors, provides completion and go-to-definition, and integrates HTMLHint and JSHint diagnostics with Quick Fixes.
Key features 🔎
⚠️ Undefined class/id warnings (Problems panel)
🔍 Unused CSS/SCSS selectors highlighted (grayed as Unnecessary)
✨ Completion for class/id and Go to Definition (F12)
🛠️ HTMLHint and JSHint diagnostics with context-aware Quick Fixes
🔗 Parses embedded <style> blocks, linked stylesheets (local and remote), and workspace CSS/SCSS files (scan capped at 500 files)
🗄️ Style cache with a command to clear it
Installation ⬇️
⬇️ Install from the Visual Studio Code Marketplace: Html-Js-Css-Analyzer
▶️ Activate by opening or editing HTML/CSS/SCSS/LESS/JavaScript/TypeScript files. Validation runs automatically on open/save/change (250ms debounce, adaptive up to 1s under rapid edits).
🛠️ Commands (Command Palette):
Html-Js-Css-Analyzer: Validate Current Document — revalidate the active document
Html-Js-Css-Analyzer: Clear Style Cache — clear cached style data
⌨️ Shortcuts: F12 (Go to Definition), Ctrl+Space (Completion)