Comments (22)
Same issue for me with coc-prettier and coc-eslint
After manually install dependencies on dev folder work like as expected
npm install --save-dev eslint prettier eslint-config-prettier eslint-plugin-prettier
(Node.js 14)
from coc-eslint.
Checkout your npm global module folder by npm root -g
and make sure your have eslint inside that folder.
from coc-eslint.
@kevindashgit Then you need to specify eslint.nodePath
from coc-eslint.
For me the problem was that I've installed eslint
using Yarn, and so I have to set:
"eslint.nodePath": "/home/user/.config/yarn/global/node_modules"
from coc-eslint.
Make sure eslint can be resolve from your workspaceFolder https://github.com/neoclide/coc.nvim/wiki/Using-workspaceFolders or global npm modules.
You can disable suggest actions from tsserver https://github.com/neoclide/coc-tsserver#configuration-options.
from coc-eslint.
I am having the same issue no matter where I open a script file.
Not sure how to see if eslint can resolve.
from coc-eslint.
@chemzqm you've spotted a recurring issue with my regular workflow - which is that I regularly switch node versions via nvm
and so some versions I've properly installed eslint while others not so much. π π
Bonus Points: I'd still prefer not to have to move cursor over "underlined" section to see the warning as reflected by the vim "sign" (marker indicating an issue on this line. Is there a setting to reveal the issue just by moving cursor to the erroneous line?
from coc-eslint.
Same issue when opening Yarn 2 Berry PnP project.
from coc-eslint.
@dzintars When using coc-eslint
with yarn2 project, follow this:
yarn add @yarnpkg/pnpify
add to your projectyarn pnpify --sdk
Now coc-eslint
will find eslint automatically.
from coc-eslint.
@fannheyward Tnx. I already did that, but no luck. Will update this issue when will get into something. BTW... which is recommended method today to install plugins? :CocInstall coc-eslint
or Plug 'neoclide/coc-eslint', {'do': 'yarn install --frozen-lockfile'}
?
from coc-eslint.
:CocInstall coc-eslint
, extensions installed with :CocInstall
can do auto-updating.
from coc-eslint.
I have had the same issue with eslint without success, I am unable to get coc working with either eslint or prettier, sadly I have to revert to another method until there is a solution for this.
from coc-eslint.
I'm also experiencing the same issue. After installing with :CocInstall coc-eslint
, I have eslint
installed under the path reported by npm root -g
. I only got eslint working after installing it locally for the project as suggested by @emmtte using the command npm install --save-dev eslint
. My setup is:
- coc-eslint 1.2.7
- coc.nvim version: 0.0.78-42353685a1
- vim version: NVIM v0.4.3
- node version: v12.16.3
from coc-eslint.
Can I skip the error?
If I have a random js file somewhere not in project, then this error always happens.
I think this is supposed to be, but I want to skip the error if there is no eslint configuration.
from coc-eslint.
You can create .vim/coc-setings.json
at any parent folder of your file.
from coc-eslint.
Oh.... I see.
So I need to create config file everytime I open random js file.
Um well, it can't be helped.
thanks
from coc-eslint.
Or you can create a global eslint config file.
from coc-eslint.
@chemzqm
I tried that!
In that case even if I'm in some project, coc will look to global eslint.
prettierrc.js behavior is good.
https://prettier.io/docs/en/configuration.html
The configuration file will be resolved starting from the location of the file being formatted, and searching up the file tree until a config file is (or isnβt) found.
from coc-eslint.
You can use "root": true
to make eslint not look up.
from coc-eslint.
@chemzqm
Ah, thank you for reply, but no, in that case if there's no config in that workspace it causes the error,,,,,
οΌIt would be great if this error goes to CocInfoLog. Not error in status line. But as you stated there is an way to handle this, so it's not critical. This is still great plugin.οΌ
from coc-eslint.
Checkout your npm global module folder by
npm root -g
and make sure your have eslint inside that folder.
This worked wonders! cd into that folder and do sudo npm install -g eslint and eslint should be where it needs to be
from coc-eslint.
Checkout your npm global module folder by
npm root -g
and make sure your have eslint inside that folder.This worked wonders! cd into that folder and do sudo npm install -g eslint and eslint should be where it needs to be
Super helpful!
from coc-eslint.
Related Issues (20)
- Eslint 8 support HOT 1
- Coc-eslint doesn't work with eslint@8 HOT 10
- undeprecate `eslint.enable`
- coc-eslint does not detect eslintrc unless it is placed in the root folder HOT 4
- Connection to server got closed. Server will not be restarted. HOT 1
- Usage with XO
- Is there any configuration for easily opening a recommendation link? HOT 1
- The "initializing eslint" notification never disappears HOT 2
- [bug] Diagnostic level hard-coded to Unnecessary/Warning/1 for no-unused-vars rule HOT 3
- UnhandledRejection opening markdown files HOT 22
- Stuck as "Initializing eslint" popup
- ESLint 8 flat config support HOT 3
- Parsing error: ESLint was configured to run on .... However that TSConfig does not include this file HOT 1
- how does eslint work
- shoudFix parameter was false HOT 4
- Need some clarification
- Coc-eslint not working with yarn Plug'n'Play HOT 2
- Setting `useFlatConfig` to true breaks ESLint integration for projects that use the older config style HOT 1
- when autoFixOnSave fails, the file can't be saved HOT 2
- is coc-eslint still maintained? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from coc-eslint.