Skip to content

Beta incorrectly flags rule valid-template-root for pug templates #165

Closed
@prograhammer

Description

@prograhammer

Tell us about your environment
Ubuntu 16.04 Gnome 3

  • ESLint Version:
    3.19.0
  • eslint-plugin-vue Version:
    beta (v3.12.0)
  • Node Version:
    6.11.0

Please show your full configuration:

// http://eslint.org/docs/user-guide/configuring

module.exports = {
  root: true,
  parserOptions: {
    parser: 'babel-eslint',
    sourceType: 'module'
  },
  env: {
    browser: true,
  },
  // https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style
  // https://github.com/vuejs/eslint-plugin-vue
  extends: [
    'standard',
    'plugin:vue/recommended'
  ],
  // required to lint *.vue files
  plugins: [
    'html'
  ],
  'settings': {
      'html/html-extensions': ['.html'],  // don't include .vue
  },
  // add your custom rules here
  'rules': {
    // allow paren-less arrow functions
    'arrow-parens': 0,
    // allow async-await
    'generator-star-spacing': 0,
    // allow debugger during development
    'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0
  }
}

What did you do? Please include the actual source code causing the issue.

<template lang="pug">
.example
  | blah blah blah
</template>

<script>
export default {
  data () {
    return {

    }
  }
}
</script>

What did you expect to happen?
When I had beta v3.8.0, no linter errors occurred. After beta v3.9.0 and above, the linter error occurs in all pug templates: valid-template-root.

What actually happened? Please include the actual, raw output from ESLint.
I get an valid-template-root error for all my pug templates. It seems the latest beta updates now think that the root element is text when it is actually valid pug markup.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions