Closed jamesmortensen closed 9 years ago
You probably have a global version of esformatter (or a local in that repository). Can you please check its version? It should be at least 0.5
I'll try and fix it regardless of what version you have installed
BTW, I just released v0.6.0 which will try to locate a locally installed version of esformatter if available (so you can have multiple projects each one using a different version of esformatter)
important to note that the local version search is based on the path of the config file (if you pass the --config
option on the cli) or fallback to process.cwd()
Thanks, I'll start using 0.6.0 soon.
However I believe the current version of sublime esformatter is already using any local version, because it's doing a simple require('esformatter')
thus relying on node's internal resolve mechanism.
Anyway this issue should now be fixed
Okay, you're right. I had version 0.4.7 installed globally. I removed both it and the one I installed locally and then reinstalled 0.6.0 globally. I then had to remove the EsFormatter Sublime plugin and reinstall it. Afterwards, the code formatted.
However, it's not formatted as per the .esformatter
rules. I have this file in the Node.js project folder in the same directory as package.json. Where does that have to be for the system to read it? Thanks.
I wasn't able to get esformatter working in Sublime, but after seeing the plugin has recently been updated, I tried installing it again.
Setting the format on save option in User settings did not do anything, but when I try changing the setting in defaults, I get the following error message:
I do have a configuration file called
.esformatter
in the same directory as my package.json for a Node.js app.