neoclide / coc-tslint-plugin

coc.nvim extension that provides TSLint support using the typescript-tslint-plugin
47 stars 6 forks source link

Plugin fails to use local tslint configuration. #1

Open vsviridov opened 5 years ago

vsviridov commented 5 years ago

In the coc-nvim-tsc.log I see following

  Info 26   [11:19:54.279] [typescript-tslint-plugin] "Computing tslint semantic diagnostics for '/home/vsviridov/projects/tessa-front-end/src/app/+scope-sheet/asset-details/asset-attributes/asset-attributes.comp  onent.ts'"
  Info 27   [11:19:54.279] [typescript-tslint-plugin] "start validateTextDocument"
  Info 28   [11:19:54.279] [typescript-tslint-plugin] "validateTextDocument: about to load tslint library"
  Info 29   [11:19:54.279] [typescript-tslint-plugin] "loadLibrary for /home/vsviridov/projects/tessa-front-end/src/app/+scope-sheet/asset-details/asset-attributes/asset-attributes.component.ts"                  
  Info 30   [11:19:54.426] [typescript-tslint-plugin] "Begin - Resolve Global Package Manager Path for: npm"
  Info 31   [11:19:54.801] [typescript-tslint-plugin] "'npm config get prefix' value is: /usr"
  Info 32   [11:19:54.802] [typescript-tslint-plugin] "Done - Resolve Global Package Manager Path for: npm"                                                                                                         
  Info 33   [11:19:54.802] [typescript-tslint-plugin] "NODE_PATH value is: /usr/lib/node_modules:/home/vsviridov/projects/tessa-front-end/node_modules"
  Info 34   [11:19:54.924] [typescript-tslint-plugin] "validateTextDocument: loaded tslint library"
  Info 35   [11:19:54.925] [typescript-tslint-plugin] "[tslint] Failed to load the TSLint library for the document /home/vsviridov/projects/tessa-front-end/src/app/+scope-sheet/asset-details/asset-attributes/asse  t-attributes.component.ts\nTo use TSLint for single file install tslint globally using 'npm install -g tslint'.\nTSLint has a peer dependency on `typescript`, make sure that `typescript` is installed as well.\n  You need to reopen VS Code after installing tslint." 

I have local tslint.json file and tslint is installed in the projects as a dev dependency, but the plugin attempts to load a global install. is there any way to make it load the local instance first?

chemzqm commented 5 years ago

Need full log to know what happened, looks like project root is wrong.

vsviridov commented 5 years ago

Worked it out down to here: https://github.com/Microsoft/typescript-tslint-plugin/issues/69

chemzqm commented 5 years ago

Thanks for reporting, there would be no more binary release for coc.nvim. Use

Plug 'neoclide/coc.nvim', {'do': { -> coc#util#install()}}

to download latest released javascript bundle with vim-plug.

jyurek commented 5 years ago

I have reinstalled coc.nvim as per the config above and it does not fix the problem -- my local tslint.json is still being ignored.

chemzqm commented 5 years ago

Please provide verbose log of tsserver: https://github.com/neoclide/coc-tsserver#trouble-shooting

chemzqm commented 5 years ago

Should be fixed be new release.