Closed ppp-12 closed 1 year ago
It's eslint.autoFixOnSave
, not eslint.autoFixOnsave
, upper S
.
oops, I just checked again, in my CocConfig it is eslint.autoFixOnSave
like you've mentioned instead of eslint.autoFixOnsave
, I made a mistake in the original post, and I still haven't figured out how to get it to work
edit: if it is helpful, here's my CocConfig:
{
"coc.preferences.jumpCommand": "vsplit",
"languageserver": {
"golang": {
"command": "gopls",
"rootPatterns": ["go.mod"],
"filetypes": ["go"]
}
},
"eslint.autoFixOnSave": true,
"suggest.noselect": true,
"suggest.enablePreselect": false,
"typescript.suggest.autoImports": true
}
the fixes being applied momentarily in the buffer, but then it reverts to the unfixed version
Looks like this isn't coc-eslint's issue, cause the fixes already work, try minimal vimrc, only coc+coc-eslint only.
thanks for your time @fannheyward , I will treat this as closed then
I have the settings of CocConfig
eslint.autoFixOnsave: true
, when I do:w
, I can see the fixes being applied momentarily in the buffer, but then it reverts to the unfixed version.however when I run the
CocCommand eslint.executeAutoFix
the fixes are applied and not reverted.in the
CocCommand eslint.showOutputChannel
, I have got the following:for vscode, there seem to be somewhere it can be set, not sure where this
shouldFix
param can be set in coc-eslint thougheslint version: "8.28.0" coc-eslint version: 1.6.0