ember-cli-migrator icon indicating copy to clipboard operation
ember-cli-migrator copied to clipboard

Preverse comments/'use strict'/variable assignments on top of file

Open hefox opened this issue 7 years ago • 0 comments

Hiya!

When I run the migrator, files that are in the format of

'use strict';

// Code comment

const SOME_DEFINE = 10;

var WhateverController = Ember.Controller.extend({});

End up in the form:

import Ember from 'ember';
var WhateverController = Ember.Controller.extend({});

'use strict';

// Code comment

const SOME_DEFINE = 10;

export default FlagAndRefundModalController;

The ideal I believe is:

'use strict';

import Ember from 'ember';

// Code comment

const SOME_DEFINE = 10;

var WhateverController = Ember.Controller.extend({});
export default FlagAndRefundModalController;

The 'use strict' must end up at the top of a file I believe, and it'd be nice having the code that was on top there also.

hefox avatar Jan 16 '18 22:01 hefox