-
-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
when autoFixOnSave fails, the file can't be saved #144
Comments
This is a problem for me as well. I have autoFixOnSave enabled since I usually do want to use it. But some projects do not have an eslint configuration because they don't use eslint at all. In these cases not only do I get a loud error message but the file cannot be saved. I understand that this feature does require an eslint configuration to work, since that's what eslint itself requires. But it should probably not prevent writing files altogether
Maybe there is a way to catch and show the warning message but still allow the autocmd to finish successfully? |
Same issue |
To avoid this error, I think coc-eslint needs default eslint config that can be used when there is no config files in project. I changed my formatter to prettier to temporarily fix this issue for my own. I added _ to my old config property {
"_eslint.autoFixOnSave": true,
...
"coc.preferences.formatOnSaveFileTypes": ["*"],
...
} |
I vote the file to be saved even if i have thrown an error, less disturbing to the flow
The text was updated successfully, but these errors were encountered: