Closed richardaum closed 4 years ago
Thank you for fast response. I've taken a double look here and by using process.cwd()
it has a problem, when running with VSCode Prettier extension. It isn't able to properly point to the where the config file is localted.
So rather than that, I'm using the original file path, available on opts.filepath
. It happens that import-sort-config
knows how to solve by using it.
It happens that import-sort-config knows how to solve by using it.
Using a recursive strategy from cosmiconfig, import-sort-config is able to recursively find the nearest config file. Since this plugin uses import-sort-config, it is also able to do it.
This line where we add a dummy
string could also be change to make use of the original file name. But since it isn't directly related to the issue probably a later PR would make more sense.
OK now that the npmjs login is working again, v0.0.5 is published. Sorry it took so long.
Thank you! =)
It allows to use the plugin even on a monorepo, where
node_modules
folder couldn't be at the same level as the config file.