diff --git a/lib/rules/valid-template-root.js b/lib/rules/valid-template-root.js index 2f511d31e..7984443a7 100644 --- a/lib/rules/valid-template-root.js +++ b/lib/rules/valid-template-root.js @@ -31,6 +31,11 @@ function create (context) { return } + const lang = utils.getAttribute(element, 'lang') + if (lang && lang.value.value !== 'html') { + return // Ignore pug and .... + } + const hasSrc = utils.hasAttribute(element, 'src') const rootElements = [] let extraText = null diff --git a/tests/lib/rules/valid-template-root.js b/tests/lib/rules/valid-template-root.js index 0aef8cbc5..e5676ccb3 100644 --- a/tests/lib/rules/valid-template-root.js +++ b/tests/lib/rules/valid-template-root.js @@ -31,6 +31,10 @@ tester.run('valid-template-root', rule, { filename: 'test.vue', code: '' }, + { + filename: 'test.vue', + code: '' + }, { filename: 'test.vue', code: ''