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
Simple prop declaration replaces "" with nothing when auto-fixing #993
Comments
I'd say this rule isn't really be |
Would that be possible? Or maybe rather assume that |
Since the developer intent can't be properly inferred, silently assuming null when he developer may expect the prop validation to fail when something besides a string is passed would be dangerous. The developer appearantly wanted to define the prop (likely to be a String), but failed to do so in the correct way/syntax, so it should simply fail and not be corrected, leaving that to the developer. |
Yeah, I agree on that. But why is |
Thank you for this issue. I think it is a bug that the code is deleted. |
Tell us about your environment
Please show your full configuration:
What did you do?
Running
eslint test.vue
gives me the following:And then after running
eslint --fix test.vue
What did you expect to happen?
Not sure what I expected, but did not expect it to just replace
""
with nothing, leaving the JS invalid.What actually happened?
was turned into
The text was updated successfully, but these errors were encountered: