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

Property rules are not supported when using vue-property-decorator #1334

Open
rbclark opened this issue Oct 15, 2020 · 0 comments
Open

Property rules are not supported when using vue-property-decorator #1334

rbclark opened this issue Oct 15, 2020 · 0 comments

Comments

@rbclark
Copy link

@rbclark rbclark commented Oct 15, 2020

Tell us about your environment

  • ESLint version: 6.8.0
  • eslint-plugin-vue version: 7.0.1
  • Node version: v14.9.0

The problem you want to solve.

I have noticed some of the rules do not work properly when using vue-property-decorator, for example:

'vue/require-default-prop': 'warn' does not detect properties decorated in the form

@Prop({type: String}) readonly propA: string;

does not raise any error even though the prop has no default value.

Additionally,

'vue/prop-name-casing': 'warn'

does not detect properties such as

@Prop({required: true}) readonly file_filter!: FileID;

Your take on the correct solution to problem.

These rules should properly analyze properties declared using @Prop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.