Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
snewcomer committed Jul 24, 2019
1 parent a054750 commit 7e14528
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions transforms/globals-to-ember-data-imports.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function transform(file, api /*, options*/) {
// We'll use a regular expression to try to improve the situation (courtesy of @rwjblue).
const lineTerminator = source.indexOf('\r\n') > -1 ? '\r\n' : '\n';

source = root.toSource(Object.assign({}, OPTS, { lineTerminator }))
source = root.toSource(Object.assign({}, OPTS, { lineTerminator }));
} catch (e) {
if (process.env.EMBER_DATA_CODEMOD) {
warnings.push([ERROR_WARNING, file.path, source, e.stack]);
Expand Down Expand Up @@ -166,16 +166,17 @@ function transform(file, api /*, options*/) {
if (foundMapping) {
let newSource = foundMapping.source;
if (module.source !== newSource) {
root.find(j.ImportDeclaration, {
source: {
type: 'Literal',
value: module.source
}
})
.find(j.Literal)
.forEach((importLiteral) => {
j(importLiteral).replaceWith(j.literal(newSource))
});
root
.find(j.ImportDeclaration, {
source: {
type: 'Literal',
value: module.source
}
})
.find(j.Literal)
.forEach(importLiteral => {
j(importLiteral).replaceWith(j.literal(newSource));
});
}
}
}
Expand Down Expand Up @@ -495,7 +496,7 @@ function transform(file, api /*, options*/) {
}
} else {
// Update literal paths based on mappings from 'ember-data/model' to '@ember-data/model'
updateLiteralPaths(root, mod, mappings)
updateLiteralPaths(root, mod, mappings);
}
});
}
Expand Down

0 comments on commit 7e14528

Please sign in to comment.