r5n-labs/vscode-react-javascript-snippets

Add functionality to automatically rename "index" files to match folder names

Pedro77h opened this issue · 4 comments

Context:
In many cases, it's a common practice to name the main file in a directory as "index." However, for the sake of easier identification and organization, it would be helpful if the "index" file is automatically renamed to match the name of the folder it resides in.

Objective:
The objective of this issue is to implement a script or functionality that detects if a file is named "index" and, if so, automatically renames it to match the name of the folder it's located in.

may i do it ?

Nice feature, @Pedro77h . I, too, think it is going to be useful to many, many users.

The rise of file-based routing makes this feature rather necessary.