Skip to content

Commit 3ec2248

Browse files
committed
Remove source check, use template literal syntax for message
1 parent 0ec1789 commit 3ec2248

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/rules/no-named-default.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,11 @@ module.exports = {
66
create: function (context) {
77
return {
88
'ImportDeclaration': function (node) {
9-
if (node.source == null) return
10-
119
node.specifiers.forEach(function (im) {
1210
if (im.type === 'ImportSpecifier' && im.imported.name === 'default') {
1311
context.report({
1412
node: im.local,
15-
message: 'Use default import syntax to ' +
16-
'import \'' + im.local.name + '\'.' })
13+
message: `Use default import syntax to import \'${im.local.name}\'.` })
1714
}
1815
})
1916
},

0 commit comments

Comments
 (0)