Skip to content

Disable expected statement, but got empty on event handler #388

Closed
@donnysim

Description

@donnysim

Tell us about your environment

  • ESLint Version: 4.17.0
  • eslint-plugin-vue Version: 4.2.2
  • Node Version: 8.7.0

Please show your full configuration:

module.exports = {
    parserOptions: {
        parser: 'babel-eslint',
        ecmaVersion: 6,
        sourceType: 'module',
        ecmaFeatures: {
            experimentalObjectRestSpread: true,
        },
    },
    env: {
        browser: true,
    },
    extends: [
        'plugin:vue/base',
    ],
    rules: {
        'vue/no-parsing-error': [2, {
            'missing-attribute-value': false,
        }],
    },
};

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

<template>
    <div @click.stop="" @mousedown.stop="">
    </div>
</template>

What did you expect to happen?
It would not complain about @click not having a value.

What actually happened? Please include the actual, raw output from ESLint.
It throws error Expected to be statements, but got empty. Maybe have a separate config that allows events to have an empty handler?

This is a valid and often encountered use case.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions