Skip to content

False positive in rule "vue/no-dupe-keys"  #314

@sqal

Description

@sqal

Tell us about your environment

  • ESLint Version: 4.14.0
  • eslint-plugin-vue Version: 4.0.0
  • Node Version: 8.5.0

Please show your full configuration:

// basic configuration
module.exports = {
  root: true,
  extends: [
    'airbnb-base',
    'plugin:vue/recommended',
  ],
  parserOptions: {
    parser: 'babel-eslint'
  },
  plugins: ['vue']
}

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

// @vue/component
export const compA = {
  props: {
    propA: String,
  },
};

// @vue/component
export const compB = {
  props: {
    propA: Boolean, / <-- error line
  },
};

What did you expect to happen?
Should not raise no-dupe-keys error

What actually happened? Please include the actual, raw output from ESLint.
As you can see i export two components in one file. Both components have one prop with the same name and plugin is warning me about duplicated propA.

C:\dev\foobar\src\app.js
  11:5  error  Duplicated key 'propA'  vue/no-dupe-keys

✖ 1 problem (1 error, 0 warnings)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions