Git Product home page Git Product logo

Comments (18)

chemzqm avatar chemzqm commented on May 24, 2024 10

Did you confugure eslint.filetypes settings?

from coc-eslint.

utrumo avatar utrumo commented on May 24, 2024 8

Did you confugure eslint.filetypes settings?

Here, what is necessary! I registered this line in coc-settings.json:
"eslint.filetypes": ["javascript", "javascriptreact", "typescript"]
and now everything works. Thanks! :)

from coc-eslint.

chemzqm avatar chemzqm commented on May 24, 2024

You can't run eslint.executeAutofix before client ready.

from coc-eslint.

utrumo avatar utrumo commented on May 24, 2024

This plug-in does not work for me at all. it is normal?
it for the present is not ready at all?

from coc-eslint.

chemzqm avatar chemzqm commented on May 24, 2024

This plug-in does not work for me at all

You need provide result from :CocInfo and output from eslint, checkout https://github.com/neoclide/coc.nvim/wiki/Debug-language-server#using-output-channel

I can't reproduce your problem.

from coc-eslint.

utrumo avatar utrumo commented on May 24, 2024

how can I make more detailed and useful the log?

coc-settings.json
{
  "eslint.trace.server": "verbose",
}

cocinfo:

## versions

vim version: NVIM v0.4.0-dev
node version: v10.15.3
coc.nvim version: 0.0.64-615c4b2d9d
term: xterm-256color
platform: linux

## Error messages

## Output channel: tsserver
[Info  - 3:26:02 PM] Forking TSServer
PATH: /home/user/.yarn/bin:/home/user/.config/yarn/global/node_modules/.bin:/home/user/.yarn/bin:/home/user/.config/yarn/global/node_modules/.bin:/home/user/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/user/.config/composer/vendor/bin 
[Info  - 3:26:02 PM] Started TSServer
{
  "path": "/home/user/myProject/node_modules/typescript/lib",
  "_api": {
    "versionString": "3.3.1",
    "version": "3.3.1"
  }
}

from coc-eslint.

chemzqm avatar chemzqm commented on May 24, 2024

Try :CocCommand workspace.showOutput eslint.

from coc-eslint.

utrumo avatar utrumo commented on May 24, 2024

Try :CocCommand workspace.showOutput eslint.

I received such error:
[coc.nvim] Channel "eslint" not found

from coc-eslint.

chemzqm avatar chemzqm commented on May 24, 2024

You need to edit some javascript file to make the server start.

from coc-eslint.

utrumo avatar utrumo commented on May 24, 2024

You need to edit some javascript file to make the server start.

I am ready. What to begin with?

from coc-eslint.

chemzqm avatar chemzqm commented on May 24, 2024

Try edit and save javascript file, then paste result from :CocInfo

from coc-eslint.

utrumo avatar utrumo commented on May 24, 2024

Tried with .js the file - works!

## versions

vim version: NVIM v0.4.0-dev
node version: v10.15.3
coc.nvim version: 0.0.64-615c4b2d9d
term: screen-256color
platform: linux

## Error messages

## Output channel: tsserver[Info  - 6:49:00 PM] Forking TSServer
PATH: /home/user/.yarn/bin:/home/user/.config/yarn/global/node_modules/.bin:/home/user/.yarn/bin:/home/user/.config/yarn/global/node_modules/.bin:/home/user/.yarn/bin:/home/user/.config/yarn/global/node_modules/.bin:/home/user/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/user/.config/composer/vendor/bin 
[Info  - 6:49:00 PM] Started TSServer
{
  "path": "/home/user/myProject/node_modules/typescript/lib",
  "_api": {
    "versionString": "3.3.1",
    "version": "3.3.1"
  }
}


## Output channel: eslint[Info  - 6:49:00 PM] ESLint server running in node v10.15.3
[Info  - 6:49:01 PM] ESLint library loaded from: /home/user/myProject/node_modules/eslint/lib/api.js

The problem with .ts files turns out.
For .ts with eslint i use:

"@typescript-eslint/eslint-plugin": "^1.3.0",
"@typescript-eslint/parser": "^1.3.0",

My eslint config for ts is .eslintrc.yml:

parser: '@typescript-eslint/parser'
plugins: ['@typescript-eslint']

parserOptions:
  project: 'tsconfig.json'

env:
  browser: true
  node: false

extends: 'plugin:@typescript-eslint/recommended'

rules: {
  'indent': 'off',
  '@typescript-eslint/indent': ['error', 2]
}

from coc-eslint.

chemzqm avatar chemzqm commented on May 24, 2024

It does work for typescript files, you need https://github.com/neoclide/coc-tslint-plugin

from coc-eslint.

utrumo avatar utrumo commented on May 24, 2024

tslint not now, but in future will depricated.
palantir/tslint#4534

I think that the possibility of processing .ts files by this plug-in with eslint is necessary...

from coc-eslint.

livdevan avatar livdevan commented on May 24, 2024

I've got the same problem but "eslint.filetypes" does not solve it, the plugin works only for js types in my case, when I edit a js files tsserver and eslint channel start automatically, but ts files simply are not recognized, if I try to run eslint I see "Language Client is not ready yet"

from coc-eslint.

livdevan avatar livdevan commented on May 24, 2024

Got it finally, I missed typescript syntax support.
coc-slint and coc-tsserver start working after I Installed yats.vim

from coc-eslint.

chemzqm avatar chemzqm commented on May 24, 2024

Not syntax, but filetype.

from coc-eslint.

ahayman avatar ahayman commented on May 24, 2024

FYI - coc-eslint does not support eslint v8.x (as of the the time this was written). Latest you can use is v7.x. Took me a while to figure this out.

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.