r5n-dev / vscode-react-javascript-snippets

Extension for React/Javascript snippets with search supporting ES7+ and babel features
MIT License
1.7k stars 434 forks source link

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

Open Pedro77h opened 9 months ago

Pedro77h commented 9 months ago

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.

Pedro77h commented 9 months ago

may i do it ?

rishiraj88 commented 9 months ago

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