Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Venefilyn opened this issue Dec 19, 2018 · 1 comment
Closed
Assignees
Labels

Comments

@Venefilyn
Copy link

Venefilyn commented Dec 19, 2018

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
@mysticatea mysticatea added the bug label Dec 30, 2018
@mysticatea
Copy link
Member

Thank you for this report.

Indeed, this is a bug we should fix.

@michalsnik michalsnik self-assigned this Dec 30, 2018
@mysticatea mysticatea assigned mysticatea and unassigned michalsnik Jan 4, 2019
mysticatea added a commit to vuejs/vue-eslint-parser that referenced this issue Jan 4, 2019
mysticatea added a commit that referenced this issue Jan 5, 2019
Fixes #716
Fiees #722
Fixes #733

As a side effect, it gets ignoring expressions on outside of the
template.
michalsnik pushed a commit that referenced this issue Jan 26, 2019
* Chore: update vue-eslint-parser

Fixes #716
Fiees #722
Fixes #733

As a side effect, it gets ignoring expressions on outside of the
template.

* Update tests cases
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants