Code Health Scanner

Inspiration

Developers often struggle with messy, risky code and cross-browser compatibility issues. Debugging takes hours, and current tools either miss dangerous patterns or are too complex for beginners. I wanted to create a lightweight, beginner-friendly tool that instantly highlights risky JavaScript/HTML patterns and shows modern feature support using Baseline data.

What it Does

  • Scans JavaScript/HTML files for risky patterns like eval(), innerHTML, document.write, and unused variables.
  • Checks modern web feature support (e.g., Fetch API, CSS Grid, IntersectionObserver) using Baseline data.
  • Provides a clear CLI report highlighting risky patterns and compatibility status.

How We Built It

  • Built a Node.js CLI tool (check.js) to scan files.
  • Integrated web-features npm package and Web Platform Dashboard API for feature compatibility data.
  • Implemented pattern detection for risky or deprecated JavaScript practices.
  • Tested the tool with multiple demo files using modern features and risky patterns.

Challenges We Ran Into

  • Mapping Baseline feature IDs to actual code patterns sometimes caused ⚠️ warnings due to missing entries.
  • Ensuring the CLI worked cross-platform (Windows/Mac/Linux) and handled different HTML/JS structures.
  • Explaining results clearly in the output without overwhelming beginners.

Accomplishments

  • Created a working CLI tool that scans files and reports risky patterns and feature adoption.
  • Successfully integrated Baseline data for browser support.
  • Documented the project and prepared demo files for submission.

What We Learned

  • Learned how to integrate Baseline data into developer tooling.
  • Improved understanding of modern JavaScript features and risky coding practices.
  • Gained hands-on experience building a cross-platform Node.js CLI tool.

What's Next

  • Add a web UI version for drag-and-drop file scanning.
  • Expand pattern detection to cover more security risks and anti-patterns.
  • Integrate the tool with VS Code or CI pipelines for real-time feedback.
Share this project:

Updates