TidyModules is a Visual Studio Code extension that helps developers keep their node_modules folder clean and organized. It hides all the packages that are not directly defined in your package.json file, allowing you to focus only on the packages you actually installed. The visibility of these packages can be toggled with a simple command, making it easy to switch between a clutter-free view and a full view of your node_modules.
Features
Hides all packages in the node_modules folder that are not listed in your package.json dependencies (dependencies, devDependencies, peerDependencies).
Toggle between hiding and showing non-directly installed packages with a single command.
Keeps your workspace tidy and easier to navigate by reducing visual noise in the node_modules folder.
How It Works
Toggling Visibility: Use the command palette (Cmd+Shift+P or Ctrl+Shift+P) and run the Toggle Node Modules command.
When active, only the packages listed in your package.json are visible.
You can toggle back anytime to restore the full view of all packages in the node_modules folder.
File System: TidyModules does not delete or modify any packages, it simply hides the ones that are not directly installed. This helps you keep track of what you are working with, without unnecessary clutter.
Commands
Command
Description
TidyModules: Toggle Node Modules
Hides or shows non-direct dependencies in node_modules.
Installation
Open Visual Studio Code.
Go to the Extensions view by clicking on the Extensions icon in the Activity Bar on the side of the window.
Search for "TidyModules" and click Install.
After installation, open your project with a node_modules folder and use the Toggle Node Modules command to start cleaning up!
Use Cases
Cleaner Folder View: When working with large projects, the node_modules folder can become overwhelming. TidyModules gives you a cleaner folder view, so you can focus on the packages you need.
Quick Debugging: Easily identify which packages are directly installed without having to scroll through hundreds of nested dependencies.
Efficient Package Management: TidyModules makes it easier to visualize your project’s direct dependencies and catch any unwanted or missing packages in your package.json.