Closed jefferson-vieira closed 4 years ago
Honestly, I think using a regexp group gets you 99% there. Use module
for npm modules, then for known internal paths (baseUrl), add them as regexp.
{
"newlinesBetween": "always",
"groups": [
"module",
["/^controllers/", "/^utils/"], // here
["parent", "sibling", "index"]
],
"alphabetize": { "order": "asc", "ignoreCase": true }
}
I'm pretty wary of adding new groups since the regexp can handle almost everything.
closing...
I wondered if there was a way to separate imports from node_modules from other internal imports Is common (and useful) for devs map internal
src
files injsconfig.json
ortsconfig.json
, likebaseUrl
andpaths
This a simple example... but please consider a deep folder structure that benefit a relative import method