Skip to content

Commit

Permalink
add fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pri1311 committed Mar 23, 2022
1 parent 2464a9e commit 9d64c39
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/rules/newline-after-import.js
Expand Up @@ -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) {
Expand Down

0 comments on commit 9d64c39

Please sign in to comment.