Skip to content

Commit

Permalink
style: format
Browse files Browse the repository at this point in the history
  • Loading branch information
pd4d10 committed Jun 4, 2024
1 parent bd06e4a commit 2907155
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions codemods/src/v4/default-export/default-export.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = function (file, api) {

if (importPath.endsWith(".svg")) {
const hasDefaultSpecifier = path.node.specifiers.some((specifier) =>
jscodeshift.ImportDefaultSpecifier.check(specifier)
jscodeshift.ImportDefaultSpecifier.check(specifier),
);

// Skip transformation if there is a default import specifier
Expand All @@ -18,7 +18,7 @@ module.exports = function (file, api) {
if (jscodeshift.ImportSpecifier.check(specifier)) {
// Convert named import to default import
const newSpecifier = jscodeshift.importDefaultSpecifier(
jscodeshift.identifier(specifier.local.name)
jscodeshift.identifier(specifier.local.name),
);
specifier.type = "ImportDefaultSpecifier";
specifier.local = newSpecifier.local;
Expand Down

0 comments on commit 2907155

Please sign in to comment.