Skip to content

MJ16MJ/Quick-Create-Missing-File-VS-Code-Extension

Repository files navigation

Quick Create Missing File

Quick fix to create missing files for unresolved imports in JS/TS projects.
Shows a lightbulb/hover action like “Create file for './utils/api'…” that creates folders and the file (e.g., api.ts, api.js, or index.ts in a directory).


Features

  • Detects “Cannot find module …” on relative imports (./ or ../).
  • Offers a Quick Fix to create the file (and parent folders) instantly.
  • Lets you pick the extension if the import has no extension (configurable).

Works out of the box for TypeScript

Just write your imports; when a module is missing, VS Code/TS server produces a diagnostic and the Quick Fix appears.


JavaScript / JSX users (Enable diagnostics)

VS Code only shows Quick Fixes when there’s a diagnostic. For JS/JSX, enable type checking so the “Cannot find module …” diagnostic appears:

{ "compilerOptions": { "checkJs": true, "allowJs": true, "jsx": "react-jsx" }, "include": ["src"] }

Option A — Per file

// @ts-check
import api from './utils/api'

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors