Skip to content

Commit

Permalink
Remove source check, use template literal syntax for message
Browse files Browse the repository at this point in the history
  • Loading branch information
ntdb committed Oct 1, 2016
1 parent 0ec1789 commit 3ec2248
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/rules/no-named-default.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,11 @@ module.exports = {
create: function (context) {
return {
'ImportDeclaration': function (node) {
if (node.source == null) return

node.specifiers.forEach(function (im) {
if (im.type === 'ImportSpecifier' && im.imported.name === 'default') {
context.report({
node: im.local,
message: 'Use default import syntax to ' +
'import \'' + im.local.name + '\'.' })
message: `Use default import syntax to import \'${im.local.name}\'.` })
}
})
},
Expand Down

0 comments on commit 3ec2248

Please sign in to comment.