vuejs / language-tools

⚡ High-performance Vue language tooling based-on Volar.js
https://marketplace.visualstudio.com/items?itemName=Vue.volar
MIT License
5.56k stars 373 forks source link

Deprecated HTML attributes are highlighted in red #4510

Open iamandrewluca opened 4 days ago

iamandrewluca commented 4 days ago

Vue - Official extension or vue-tsc version

v2.0.22

VSCode version

v1.90.2

Vue version

v3.4.30

TypeScript version

v5.5.2

System Info

System:
    OS: macOS 14.5
    CPU: (8) arm64 Apple M1
    Memory: 244.86 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.15.0 - ~/.nvm/versions/node/v20.15.0/bin/node
    npm: 10.8.1 - ~/.nvm/versions/node/v20.15.0/bin/npm
  Browsers:
    Brave Browser: 126.1.67.119
    Chrome: 126.0.6478.127
    Safari: 17.5

Steps to reproduce

Creating an SFC Vue component, in the template when using any HTML deprecated attributes will be highlighted in red, even if that component has that prop.

Link to minimal reproduction

https://github.com/iamandrewluca/issue-volar-deprecated-highlight/blob/main/src/App.vue

Any additional comments?

https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/align

image

These are all my enabled extensions

image
davidmatter commented 14 hours ago

@iamandrewluca the vscode extension doesn't know yet which attributes are HTML attributes and which ones are valid component props. That's why this is marked as a deprecated tag/prop. This capability could be added in the future.