Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Release (1.2.4) Breaks SFC Integration #68

Closed
phobetron opened this issue Mar 8, 2021 · 8 comments
Closed

New Release (1.2.4) Breaks SFC Integration #68

phobetron opened this issue Mar 8, 2021 · 8 comments

Comments

@phobetron
Copy link

phobetron commented Mar 8, 2021

After upgrading to the latest release of coc-vetur, I've started receiving errors such as:

[vetur 6133] [H] 'name' is declared but its value is never read.

This error is displayed for props, computed properties, and watcher methods, while using vue-property-decorator in a SFC.

This issue can be mitigated by downgrading coc-vetur to version 1.2.3.

Edit: I am also using a local eslint configuration for my project, which works as expected on 1.2.3.

@yaegassy
Copy link
Contributor

yaegassy commented Mar 8, 2021

@phobetron It is a diagnostic message at the "hint level" ([Vetur] [H] ...). It is not an Error message.

The same will be displayed in VSCode's vetur.

coc-vetur-issue68

This is a feature added in this release of vetur v0.32.0 and vls v0.7.0. https://github.com/vuejs/vetur/releases/tag/v0.32.0

Show deprecated hint in script block.

If you want to hide this message, set diagnostic.showDeprecated or diagnostic.showUnused to false in coc-settings.json.

{
  // ...snip
  "diagnostic.showDeprecated": false,
  "diagnostic.showUnused": false,
  // ...snip
}

@yaegassy
Copy link
Contributor

yaegassy commented Mar 8, 2021

Alternatively, it can be suppressed by setting diagnostic.level (default: "hint") to a value higher than infomation.

{
  // ...snip
  "diagnostic.level": "information",
  // ...snip
}

@phobetron
Copy link
Author

phobetron commented Mar 9, 2021

@yaegassy Do you know why those messages are displayed, even for props and computed properties that are verifiably referenced within the template? They are not deprecated, and the hints do not disappear when deprecation diagnostics are disabled.

I would like to see hints for unused variables, but these are not unused.

@yaegassy
Copy link
Contributor

yaegassy commented Mar 9, 2021

@phobetron If the problem is also reproduced in VSCode, it would be better to ask the question in vetur's itself issue.

@phobetron
Copy link
Author

I use coc-vetur because I do not use VSCode, so I can not verify in VSCode. In the screen-shot you had posted, it is unclear whether the variable in question is actually referenced.

I'd be shocked if I'm the only one with this issue, unless I'm the only person who uses Vue, TS, vue-property-decorator, and NeoVim together.

@chemzqm
Copy link
Member

chemzqm commented Mar 9, 2021

I'd be shocked if I'm the only one with this issue, unless I'm the only person who uses Vue, TS, vue-property-decorator, and NeoVim together.

Most vue users use VSCode without TS I think.

You can check the output https://github.com/neoclide/coc.nvim/wiki/Debug-language-server#using-output-channel

@yaegassy
Copy link
Contributor

yaegassy commented Mar 9, 2021

@phobetron I have also tried other LSP client plugins.

The situation is the same for "vim-lsp" and "Neovim built-in lsp" with the latest version of vls.

You may find something related to the "vetur" issue. For example, this issue. vuejs/vetur#2646

Since you seem to think it is a big issue, I still think you should ask the question in the vetur's issue.

@phobetron
Copy link
Author

False positives triggered by default are a pretty big issue, especially if the solution to remove them may also remove meaningful messages. I'll ask the vetur maintainers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants