Git Product home page Git Product logo

Comments (9)

chemzqm avatar chemzqm commented on May 28, 2024 1

You should install eslint module in your project, or you can add "eslint.enable": false in .vim/coc-settings.json of your project.

from coc-eslint.

fannheyward avatar fannheyward commented on May 28, 2024

This error is caused by coc-eslint while doing textDocument/willSaveWaitUntil request failed. Does your project has .eslintrc.js file? Or any eslint config file?

from coc-eslint.

fannheyward avatar fannheyward commented on May 28, 2024

Try :CocCommand eslint.createConfig or eslint --init to create a config file.

from coc-eslint.

chemzqm avatar chemzqm commented on May 28, 2024

Could be caused by broken eslint module.

from coc-eslint.

fannheyward avatar fannheyward commented on May 28, 2024

This is caused when you are using coc-eslint but haven't installed eslint or no .eslintrc.js found.

@chemzqm Maybe coc-eslint should be disabled when no eslint found.

from coc-eslint.

2jj avatar 2jj commented on May 28, 2024

I have a .eslintrc.yml in my ~/.config/nvim/ which is also found when I edit js files with create-react-app

from coc-eslint.

2jj avatar 2jj commented on May 28, 2024

ok, I tried to yarn add eslint eslint-plugin-react @typescript-eslint/parser @typescript-eslint/eslint-plugin, still get an error that he cannot find @typescript-eslint/parser.

Whatever, I disabled it now with "eslint.enable": false and all is good.

I mean, I actually don't need eslint if "tsserver.formatOnType": true is doing the same job, right?

from coc-eslint.

2jj avatar 2jj commented on May 28, 2024

Edit: "tsserver.formatOnType" does not do the same. Think I still need eslint?!

from coc-eslint.

2jj avatar 2jj commented on May 28, 2024

ok found the solution and for the record:

I remove following lines from my ~/.config/nvim/.eslintrc.yml:

extends:
  - eslint:recommended
  - plugin:react/recommended
parser: '@typescript-eslint/parser'
plugins: ['@typescript-eslint/eslint-plugin']

and added them back to a project-local eslintrc.yml (a project which uses TS)
now everything works with the nextjs project, I just needed to yarn add eslint -D but no local eslintrc.yml is needed if the global one is plain.

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.