Skip to content

Commit

Permalink
Remove unnecessary check for name key
Browse files Browse the repository at this point in the history
  • Loading branch information
ntdb committed Oct 1, 2016
1 parent b3bfe56 commit 016672b
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/rules/no-named-default.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import has from 'has'

module.exports = {
meta: {
docs: {},
Expand All @@ -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.')
Expand Down

0 comments on commit 016672b

Please sign in to comment.