Currently the no-strict transform blindly resets the leading comment.
This can cause the root comment to be duplicated, when use strict
is inside a closure i.e.
/**
* My comment here
*/
define(function(require) {
'use strict';
})
/**
* My comment here
*/
/**
* My comment here
*/
define(function(require) {});
This patch only resets the leading comment if the use strict is at the
root level of the file.
Currently the
no-strict
transform blindly resets the leading comment. This can cause the root comment to be duplicated, whenuse strict
is inside a closure i.e.This patch only resets the leading comment if the
use strict
is at the root level of the file.