diff --git a/lib/rules/html-self-closing.js b/lib/rules/html-self-closing.js index 19fc4b587..6cbbb7a6d 100644 --- a/lib/rules/html-self-closing.js +++ b/lib/rules/html-self-closing.js @@ -131,7 +131,7 @@ module.exports = { context, { VElement(node) { - if (hasInvalidEOF) { + if (hasInvalidEOF || node.parent.type === 'VDocumentFragment') { return } diff --git a/tests/lib/rules/html-self-closing.js b/tests/lib/rules/html-self-closing.js index c600fdaf1..5589c3da1 100644 --- a/tests/lib/rules/html-self-closing.js +++ b/tests/lib/rules/html-self-closing.js @@ -64,6 +64,9 @@ tester.run('html-self-closing', rule, { '