neoclide / coc-vetur

Vue language server extension for coc.nvim
219 stars 7 forks source link

Eslint disable comment doesn't stop the linting errors #65

Closed ashishbinu closed 3 years ago

ashishbinu commented 3 years ago

In visual studio code putting this/* eslint-disable no-unused-vars */ comment on the top the file stops all the linting error from showing related to unused vars in the file. But using coc-vetur doesn't do that for neovim .I have posted the screenshot below:

image Is there any way to fix it?

chemzqm commented 3 years ago

Should be problem of your language server, checkout https://github.com/neoclide/coc.nvim/wiki/Debug-language-server#using-output-channel

chemzqm commented 3 years ago

Latest coc.nvim can't work with neovim 0.3

yaegassy commented 3 years ago

@ashishbinu Does your VSCode really suppress /* eslint-disable no-unused-vars */ if you put it at the top of the file?

In my environment, even in the case of VSCode's vetur extension, diagnostic message is not suppressed even if there is /* eslint-disable no-unused-vars */ at the top of the file.

coc-vetur-issue-65

I think writing /* eslint-disable no-unused-vars */ in the <script> block is the right way to go.

<template>
// ... snip
</template>

<script>
/* eslint-disable no-unused-vars */
// ... snip
</script>

<style>
// ... snip
</style>
ashishbinu commented 3 years ago

@ashishbinu Does your VSCode really suppress / eslint-disable no-unused-vars / if you put it at the top of the file?

I just checked .I am sorry I might have misremembered vs-code doing it.

I think writing / eslint-disable no-unused-vars / in the Githubissues.

  • Githubissues is a development platform for aggregating issues.