Skip to content

require-prop-type-constructor doesn't handle null type #560

Closed
@sqal

Description

@sqal

Tell us about your environment

  • ESLint Version: 5.3.0
  • eslint-plugin-vue Version: 5.0.0-beta.3
  • Node Version: 10.4.1

Please show your full configuration:

module.exports = {
  root: true,
  extends: [
    'airbnb-base',
    'plugin:vue/strongly-recommended',
  ],
  parserOptions: {
    parser: 'babel-eslint',
  },
  plugins: ['vue'],
  rules: {
    'vue/require-default-prop': 0
  }
};

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

// @vue/component
export default {
  name: 'Textfield',
  props: {
    value: null,
  },
};

What did you expect to happen?
When I define prop type as null (this mean value accepts any type) I expect that plugin won't report error mentioned below.

What actually happened? Please include the actual, raw output from ESLint.

5:12  error  The "value" property should be a constructor. (vue/require-prop-type-constructor)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions