Skip to content

Commit

Permalink
Fix: no-useless-rename false positive in babel-eslint (fixes #6266)
Browse files Browse the repository at this point in the history
  • Loading branch information
alberto committed May 31, 2016
1 parent c22cb29 commit d603085
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/rules/no-useless-rename.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@

"use strict";

//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------

var lodash = require("lodash");

//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
Expand Down Expand Up @@ -109,7 +115,7 @@ module.exports = {
}

if (node.imported.name === node.local.name &&
node.imported !== node.local) {
!lodash.isEqual(node.imported, node.local)) {
reportError(node, node.imported, node.local, "Import");
}
}
Expand All @@ -125,7 +131,7 @@ module.exports = {
}

if (node.local.name === node.exported.name &&
node.local !== node.exported) {
!lodash.isEqual(node.local, node.exported)) {
reportError(node, node.local, node.exported, "Export");
}

Expand Down

0 comments on commit d603085

Please sign in to comment.