neoclide / coc-eslint

Eslint extension for coc.nvim
MIT License
396 stars 24 forks source link

Does no longer run on save #99

Closed pjg closed 3 years ago

pjg commented 3 years ago

Something broke with latest updates and coc-eslint does no longer execute linting on save, even though I have it enabled in the config. I'm using all latest versions.

My config:

  "eslint.autoFixOnSave": true,
  "eslint.filetypes": ["javascript", "javascriptreact", "javascript.jsx", "javascript.tsx"],
  "eslint.validate": ["javascript", "javascriptreact", "javascript.jsx", "javascript.tsx"],
  "eslint.run": "onSave",
  "prettier.eslintIntegration": true,
  "tsserver.formatOnType": false
codejunkienick commented 3 years ago

I have same issue, downgrading to 1.3.2 resolves autoFixOnSave.

For anyone wondering how to downgrade (Linux):

cd ~/.config/coc/extensions
npm install coc-eslint@1.3.2 
pjg commented 3 years ago

Just doing npm install coc-eslint@1.3.2 didn't work for me. I had to do rm -rf ./node_modules/coc-eslint first.

chemzqm commented 3 years ago

"eslint.run": "onSave" works as expected for me, but eslint.autoFixOnSave is broken with it.

iamcco commented 3 years ago

Run CocCommand eslint.showOutputChannel command to select lib, this fix for me.

PS. it only active liner for me. not autofix

pjg commented 3 years ago

https://github.com/neoclide/coc-eslint/commit/b0e4270771797acbebcda2aeab0ee26347418064 fixed it, thanks!