-
Notifications
You must be signed in to change notification settings - Fork 31
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
@required vs required #146
Comments
Ya, we should fix this. We can build in assumptions about Ember's built-in components, but we cannot make any assumptions about the others. tldr; IMHO, this codemod should not be migrating away from arguments to attributes in non-built-in components. |
@rwjblue how do you feel about |
It depends on what level of "safety" we are shooting for. |
I had similar thoughts but then couldn't come up with a realistic scenario where it actually mattered for the class attribute. But I'm fine either way. the safest way is definitely to pass it as an argument instead of attribute. |
SO as an example, it should not do: {{foo-bar class="baz"}} to <FooBar class="baz"/> but rather <FooBar @class="baz"/> correct? |
@tylerturdenpants yeah, exactly. except maybe for builtin components like input and textarea. |
Ok. Crystal clear now. Thanks. |
The codemod is currently converting
required
arguments torequired
attributes, instead of@required
arguments. This might be fine for<Input>
(is it?), but certainly not for all components.The same applies for
placeholder
vs.@placeholder
.The codemod also does something similar for
class
, but I suspect in that case it should be fine.The text was updated successfully, but these errors were encountered: