ember-native-class-codemod icon indicating copy to clipboard operation
ember-native-class-codemod copied to clipboard

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

Open patocallaghan opened this issue 6 years ago • 0 comments

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 {

patocallaghan avatar Oct 25 '19 16:10 patocallaghan