A VS Code extension that automatically detects and validates CDN URLs and asset links in your code. It shows warnings for broken links directly in the editor.
Features
Automatic URL Detection: Scans your code for CDN URLs and asset file links
Non-blocking Validation: Validates links in the background without interrupting your typing
Smart Caching: Caches validation results for 5 minutes to avoid redundant requests
Inline Warnings: Shows warnings directly in the editor for broken links
Debouncing: The extension waits 500ms after you stop typing before scanning
URL Scanning: Regex-based detection of URLs matching CDN patterns or asset extensions
HEAD Requests: Uses lightweight HTTP HEAD requests to check link validity
Caching: Results are cached for 5 minutes to improve performance
Diagnostics: Broken links appear as warnings in VS Code's Problems panel
Example
// This URL will be validated
const logo = 'https://d1ioice0blp2od.cloudfront.net/fmtapp/asset/logo.png';
// This will show a warning if the image doesn't exist
const brokenImage = 'https://example.com/missing-image.jpg';
Installation
From VSIX (Local Development)
Clone this repository
Run npm install
Run npm run compile
Package with vsce package
Install the generated .vsix file in VS Code
Development
# Install dependencies
npm install
# Compile TypeScript
npm run compile
# Watch for changes
npm run watch
Requirements
VS Code 1.85.0 or higher
Known Limitations
Only HTTP/HTTPS URLs are supported
Some CDN URLs may require authentication and will show as broken
Rate limiting from CDN providers may cause false positives