From 016672bc9245f71e3382286f816edf2401a8d413 Mon Sep 17 00:00:00 2001 From: Nate Bailey Date: Fri, 30 Sep 2016 19:55:31 -0700 Subject: [PATCH] Remove unnecessary check for `name` key --- src/rules/no-named-default.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/rules/no-named-default.js b/src/rules/no-named-default.js index db8656112..b38f3ee39 100644 --- a/src/rules/no-named-default.js +++ b/src/rules/no-named-default.js @@ -1,5 +1,3 @@ -import has from 'has' - module.exports = { meta: { docs: {}, @@ -20,10 +18,7 @@ module.exports = { node.specifiers.forEach(function (im) { if (im.type !== type) return - const isDefault = im.imported.name === 'default' - const isNamed = has(im.local, 'name') - - if (isDefault && isNamed) { + if (im.imported.name === 'default') { context.report(im.local, 'Using name \'' + im.local.name + '\' as identifier for default export.')