diff --git a/src/rules/newline-after-import.js b/src/rules/newline-after-import.js index 8255b189cc..b6af0b9528 100644 --- a/src/rules/newline-after-import.js +++ b/src/rules/newline-after-import.js @@ -119,6 +119,12 @@ after ${type} statement not followed by another ${type}.`, const { parent } = node const nodePosition = parent.body.indexOf(node) const nextNode = parent.body[nodePosition + 1] + + // skip object imports + if (node.type === 'TSImportEqualsDeclaration' && + (!node.moduleReference || node.moduleReference.type !== 'TSExternalModuleReference')) { + return + } if (nextNode && nextNode.type !== 'ImportDeclaration' && nextNode.type !== 'TSImportEqualsDeclaration') { checkForNewLine(node, nextNode, 'import')