eslint-plugin-vue
eslint-plugin-vue copied to clipboard
Property rules are not supported when using vue-property-decorator
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.
Vue Class Component is no longer actively maintained and not recommended for Vue 3: https://class-component.vuejs.org/
This library is no longer actively maintained. It is no longer recommend to use Class-based components in Vue 3. The recommended way to use Vue 3 in large applications is Single-File Components, Composition API, and
<script setup>.
So I suggest to not invest time in eslint-plugin-vue to start supporting this.