move doDefaultExportInterop to default module formatter
This commit is contained in:
parent
b449dbe891
commit
59e3eb2bd1
@ -27,6 +27,10 @@ function DefaultFormatter(file) {
|
||||
this.remapAssignments();
|
||||
}
|
||||
|
||||
DefaultFormatter.prototype.doDefaultExportInterop = function (node) {
|
||||
return node.default && !this.noInteropRequire && !this.hasNonDefaultExports;
|
||||
};
|
||||
|
||||
DefaultFormatter.prototype.bumpImportOccurences = function (node) {
|
||||
var source = node.source.value;
|
||||
var occurs = this.localImportOccurences;
|
||||
|
||||
@ -60,10 +60,6 @@ CommonJSFormatter.prototype.importDeclaration = function (node, nodes) {
|
||||
}, true));
|
||||
};
|
||||
|
||||
CommonJSFormatter.prototype.doDefaultExportInterop = function (node) {
|
||||
return node.default && !this.noInteropRequire && !this.hasNonDefaultExports;
|
||||
};
|
||||
|
||||
CommonJSFormatter.prototype.exportDeclaration = function (node, nodes) {
|
||||
if (this.doDefaultExportInterop(node)) {
|
||||
var declar = node.declaration;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user