From 3ec2248d0c57850d5bbc61aa580bd48b8c0574cc Mon Sep 17 00:00:00 2001 From: Nate Bailey Date: Sat, 1 Oct 2016 16:34:50 -0700 Subject: [PATCH] Remove source check, use template literal syntax for message --- src/rules/no-named-default.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/rules/no-named-default.js b/src/rules/no-named-default.js index 6fac381b6..3185157f3 100644 --- a/src/rules/no-named-default.js +++ b/src/rules/no-named-default.js @@ -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}\'.` }) } }) },