-
Notifications
You must be signed in to change notification settings - Fork 38
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
Make codemod target classes generically #3
Comments
Thanks @pzuraq ! @scalvert and I were discussing about this. We were thinking about making this configurable to make it easier to roll out on a large codebase. Specifically we were thinking to have an ability transform only specific object like Additionally we were thinking about having options to exclude/include certain objects - like target objects which does not have any decorators. Would love to hear your thoughts! |
Hmm, I wonder if we should have it be scoped by identifier, or by file path. Would it make sense to want to convert half of a file? For instance, if we ran the codemod on just const UtilityClass = EmberObject.extend({
// ...
});
export default Controller.extend({
// ...uses utility class
}); Would that be more desirable, or would it be better to convert the entire file at once and allow users to scope by saying For decorators vs. not-decorators, completely agree. This would essentially be the difference between stage-3+ and stage-2+, and could probably be a command line option (with the default being stage-3+). |
Currently the codemod targets only calls to
EmberObject.extend
specifically, which excludes any subclasses ofEmberObject
including Ember concepts (Services, Routes, Components, etc).We should be able to target any calls to
.extend
, but to be safe we can also scope it CapitalCased elements:The text was updated successfully, but these errors were encountered: