Git Product home page Git Product logo

Comments (3)

bartels avatar bartels commented on September 26, 2024 6

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

Error detected while processing BufWritePre Autocommands for "*"..function coc#rpc#request[4]..<SNR>45_request[34]..BufWritePre Autocommands for "*"..function coc#rpc#request[4]..<SNR>45_request:
line   31:
E605: Exception not caught: Error on request: Vim(return):Error invoking 'doAutocmd' on channel 3 (coc):^@Request textDocument/codeAction failed with message: No ESLint configuration found in /home/mrmelve/.dotfiles/vim/.vim.

Maybe there is a way to catch and show the warning message but still allow the autocmd to finish successfully?

from coc-eslint.

ic-768 avatar ic-768 commented on September 26, 2024

Same issue

from coc-eslint.

ensia96 avatar ensia96 commented on September 26, 2024

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" and add "coc.preferences.formatOnSaveFileTypes": ["*"]

{
  "_eslint.autoFixOnSave": true,
  ...
  "coc.preferences.formatOnSaveFileTypes": ["*"],
  ...
}

from coc-eslint.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.