Skip to content

vue/mustache-interpolation-spacing still running if v-pre is set on node #733

Closed
@Venefilyn

Description

@Venefilyn

Tell us about your environment

  • ESLint version: v5.6.0
  • eslint-plugin-vue version: v4.7.1
  • Node version: v10.13.0

Please show your full configuration:

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

module.exports = {
    root: true,
    parserOptions: {
        parser: 'babel-eslint'
    },
    env: {
        browser: true,
    },
    extends: [
        // https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention
        'plugin:vue/recommended',
    ],
    // required to lint *.vue files
    plugins: [
        'vue'
    ],
    // add your custom rules here
    rules: {
        "indent": ["error", 4],
        "quotes": ["error", "double"],
        "semi": ["error", "always"],
        "comma-dangle": ["error", "only-multiline"],
        // allow async-await
        'generator-star-spacing': 'off',
        // allow debugger during development
        'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
        "vue/html-indent": ["error", 4, {
            "attribute": 1,
            "closeBracket": 0,
            "alignAttributesVertically": true,
            "ignores": []
        }],
        "vue/html-self-closing": ["error", {
            "html": {
                "void": "never",
                "normal": "any",
                "component": "always"
            },
            "svg": "always",
            "math": "always"
        }]
    }
};

What did you do?
I ran ESLint with no parameters on the following code within a .vue file:

<b>Response message</b> - You can use <code v-pre>{{sender}}</code> or <code v-pre>{{mentioned}}</code> variables.

What did you expect to happen?
ESLint passes

What actually happened?
ESLint gives error. It failed on vue/mustache-interpolation-spacing despite v-pre being on the element.

  28:71   error  Expected 1 space after '{{', but not found   vue/mustache-interpolation-spacing
  28:79   error  Expected 1 space before '}}', but not found  vue/mustache-interpolation-spacing
  28:104  error  Expected 1 space after '{{', but not found   vue/mustache-interpolation-spacing
  28:115  error  Expected 1 space before '}}', but not found  vue/mustache-interpolation-spacing

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions