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

upgrading to version 1.0.X causing errors with camel cased properties #1965

Closed
rathax opened this issue Oct 9, 2022 · 3 comments
Closed
Labels
bug Something isn't working

Comments

@rathax
Copy link

rathax commented Oct 9, 2022

some Props written as camel case now break the typing when referred to with hyphens inside the components.

to reproduce: create a new app with create-vue and update vue-tsc/vscode and use dataCamelCase for defining a component property like below:

image

using the hyphen syntax for defining the prop in a vue template will cause a type error since version 1.0.x
image

seems to work as intended when not using 'data' as the first word when defining a property

@johnsoncodehk
Copy link
Member

You can try config vueCompilerOptions.dataAttributes = [] in tsconfig.

@rathax
Copy link
Author

rathax commented Oct 9, 2022

You can try config vueCompilerOptions.dataAttributes = [] in tsconfig.

yes, this might resolve the issue. Thank you. It's not marked as a breaking change in the changelogs and I guess many people are using data attributes like data-test, data-cy, data-test-id, and so on and gonna see quite a lot of errors when they update their volar extension tomorrow.

@johnsoncodehk johnsoncodehk added the bug Something isn't working label Oct 11, 2022
@johnsoncodehk
Copy link
Member

johnsoncodehk commented Oct 11, 2022

Causing break change is not in expected, I will revert dataAttributes default value to [].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants