Closed kalpeshsingh closed 3 years ago
is there a way to automate this for every file. I guess there are some VS code extensions or npm package that can format code to rearrange the import statements. If not, we will do it manually, but better if there is a tool for it.
is there a way to automate this for every file. I guess there are some VS code extensions or npm package that can format code to rearrange the import statements. If not, we will do it manually, but better if there is a tool for it.
A quick Google search showed that there are couple of import re-order npm packages and VS Code extensions. They usually do sorting of modules, arrange them in alphabetical order etc.
Our purpose to re-order imports based on categories which is yet to be in mainstream. Also, we want to keep comment on each import category for quick search.
We should always go for automation whenever possible but seems like we don't have much here. I have posted on Twitter and see if we can helpful response.
Ok thanks Kalpesh. In that case, let me merge this PR. Will wait for if we can find any solution to automate this. If not we will manually fix all files as per sample here.
Fixes https://github.com/shoonyatech/frontend.social/issues/510