Local Bug Finder
Local Bug Finder is a VS Code extension that detects common JavaScript and TypeScript issues entirely offline using static analysis.
Features
- Real-time diagnostics for JavaScript and TypeScript
- Detects assignment inside conditionals like
if (x = 5)
- Detects empty blocks in
if, loops, and other statements
- Detects duplicate declarations in the same scope
- Detects unused variables
- Detects undefined variables
- Optional
console.log warnings
- Optional strict semicolon checking
- Output channel report for issue details
Project Structure
package.json
tsconfig.json
src/extension.ts
src/diagnosticEngine.ts
src/rules/jsRules.ts
Setup
- Open this folder in VS Code.
- Run
npm install.
- Run
npm run compile.
Run in VS Code
- Open the project in VS Code.
- Press
F5 to launch a development host.
- Open a JavaScript or TypeScript file.
- The extension will analyze the file automatically and show diagnostics.
- Use the
Bug Finder Report output channel to see the issue list.
Package as .vsix
npm install
npm run compile
npx @vscode/vsce package
Publish to Marketplace
- Create a publisher in the Visual Studio Code Marketplace.
- Run
npx @vscode/vsce publish.
- Provide your Personal Access Token when prompted.
Settings
In VS Code settings, search for localBugFinder.
localBugFinder.strictMode: enable stricter analysis rules.
localBugFinder.enableConsoleLogWarning: warn on console.log usage.
localBugFinder.enabledRules.*: enable or disable specific checks.
Monetization Ideas
- Offer paid rule packs for advanced security patterns.
- Provide premium rule sets for team code quality enforcement.
- Bundle Local Bug Finder with developer tooling or refactoring helpers.
Notes
- No external APIs are used.
- All analysis runs locally.
- The rule engine uses AST parsing and custom validation logic.
| |