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

Don't append object name when type is already at the end of the filename #211

Merged
merged 1 commit into from
Mar 2, 2023

Conversation

patocallaghan
Copy link
Contributor

In cases where the object you are migrating has the object name at the end of its filename, this gets duplicated into the classname which looks weird.

For example, a service called my-important-service.js will be transformed to the following JS

export default class MyImportantServiceService extends Service {

This change makes sure not to duplicate the object name if the filename already ends in it. This now looks like:

export default class MyImportantService extends Service {

@gitKrystan gitKrystan force-pushed the patoc/class-bugs branch 2 times, most recently from cae462c to b2cd0d8 Compare March 2, 2023 23:29
@gitKrystan gitKrystan added the bug Something isn't working label Mar 2, 2023
@gitKrystan gitKrystan merged commit f8d8fd2 into ember-codemods:master Mar 2, 2023
@gitKrystan
Copy link
Collaborator

Thanks!

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

Successfully merging this pull request may close these issues.

2 participants