diff --git a/src/rules/newline-after-import.js b/src/rules/newline-after-import.js index 5e042eb810..f11ddeffd0 100644 --- a/src/rules/newline-after-import.js +++ b/src/rules/newline-after-import.js @@ -76,19 +76,19 @@ module.exports = { create(context) { let level = 0; const requireCalls = []; - let options = setOptions(context); + const options = setOptions(context); function setOptions(context) { if (context.options[0]) { if ('count' in context.options[0] && 'considerComments' in context.options[0] ) { - return context.options[0] + return context.options[0]; } else if ( 'count' in context.options[0] ) { return Object.assign({}, context.options[0], { considerComments: false }); } else { return Object.assign({}, context.options[0], { count: 1 }); } } - return options = { count: 1, considerComments: false }; + return { count: 1, considerComments: false }; } function checkForNewLine(node, nextNode, type) {