Skip to content

Commit 016672b

Browse files
committed
Remove unnecessary check for name key
1 parent b3bfe56 commit 016672b

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/rules/no-named-default.js

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import has from 'has'
2-
31
module.exports = {
42
meta: {
53
docs: {},
@@ -20,10 +18,7 @@ module.exports = {
2018
node.specifiers.forEach(function (im) {
2119
if (im.type !== type) return
2220

23-
const isDefault = im.imported.name === 'default'
24-
const isNamed = has(im.local, 'name')
25-
26-
if (isDefault && isNamed) {
21+
if (im.imported.name === 'default') {
2722
context.report(im.local,
2823
'Using name \'' + im.local.name +
2924
'\' as identifier for default export.')

0 commit comments

Comments
 (0)